Solution for Bluetooth SIG hands-on training course
Dependencies: BLE_API mbed-dev-bin nRF51822-bluetooth-mdw
Fork of microbit-dal-bluetooth-mdw_starter by
Diff: source/bluetooth/MicroBitBLEManager.cpp
- Revision:
- 22:23d7b9a4b082
- Parent:
- 21:cab56b701601
- Child:
- 23:6055f6c19fa6
--- a/source/bluetooth/MicroBitBLEManager.cpp Wed Jul 13 12:17:53 2016 +0100 +++ b/source/bluetooth/MicroBitBLEManager.cpp Wed Jul 13 12:17:54 2016 +0100 @@ -109,8 +109,6 @@ */ static void bleDisconnectionCallback(const Gap::DisconnectionCallbackParams_t *reason) { - MicroBitEvent(MICROBIT_ID_BLE,MICROBIT_BLE_DISCONNECTED); - storeSystemAttributes(reason->handle); if (manager) @@ -118,14 +116,6 @@ } /** - * Callback when a BLE connection is established. - */ -static void bleConnectionCallback(const Gap::ConnectionCallbackParams_t *params) -{ - MicroBitEvent(MICROBIT_ID_BLE,MICROBIT_BLE_CONNECTED); -} - -/** * Callback when a BLE SYS_ATTR_MISSING. */ static void bleSysAttrMissingCallback(const GattSysAttrMissingCallbackParams *params) @@ -277,9 +267,6 @@ // automatically restart advertising after a device disconnects. ble->gap().onDisconnection(bleDisconnectionCallback); ble->gattServer().onSysAttrMissing(bleSysAttrMissingCallback); - - // generate an event when a Bluetooth connection is lost - ble->gap().onConnection(bleConnectionCallback); // Configure the stack to hold onto the CPU during critical timing events. // mbed-classic performs __disable_irq() calls in its timers that can cause