diff --git a/pycardium/modules/modbluetooth_card10.c b/pycardium/modules/modbluetooth_card10.c index 25b9e2e4289c558f8b4eca4be0970685206b1992..f9852382e66657e25e1bcc789fc4a3128e47f334 100644 --- a/pycardium/modules/modbluetooth_card10.c +++ b/pycardium/modules/modbluetooth_card10.c @@ -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 true; + return active; } // Gets the MAC addr of this device in big-endian format.