Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
card10
firmware
Commits
15f99475
Commit
15f99475
authored
4 years ago
by
schneider
Browse files
Options
Downloads
Patches
Plain Diff
feat(mp-ble): Allow to check if module is initialized
parent
fe64723f
No related branches found
No related tags found
1 merge request
!446
Initial MicroPython BLE support (GATTS)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pycardium/modules/modbluetooth_card10.c
+5
-2
5 additions, 2 deletions
pycardium/modules/modbluetooth_card10.c
with
5 additions
and
2 deletions
pycardium/modules/modbluetooth_card10.c
+
5
−
2
View file @
15f99475
...
...
@@ -151,6 +151,8 @@ typedef struct {
enum
notification_status
notification_status
;
}
gatts_status_entry_t
;
static
bool
active
=
false
;
static
void
gatts_status_create_entry
(
mp_gatts_db_t
db
,
uint16_t
handle
)
{
mp_map_elem_t
*
elem
=
mp_map_lookup
(
...
...
@@ -305,20 +307,21 @@ int mp_bluetooth_init(void)
);
clear_events
();
epic_interrupt_enable
(
EPIC_INT_BLE
);
active
=
true
;
return
0
;
}
// Disables the Bluetooth stack. Is a no-op when not enabled.
void
mp_bluetooth_deinit
(
void
)
{
//raise();
epic_interrupt_disable
(
EPIC_INT_BLE
);
active
=
false
;
}
// Returns true when the Bluetooth stack is enabled.
bool
mp_bluetooth_is_active
(
void
)
{
return
tru
e
;
return
activ
e
;
}
// Gets the MAC addr of this device in big-endian format.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment