Dependencies: BLE_API mbed nRF51822
Fork of nRF51822_SimpleChat by
Diff: BTDevice.cpp
- Revision:
- 5:fca87573ed92
- Parent:
- 3:b6e4e5529a52
- Child:
- 7:806b08205b25
--- a/BTDevice.cpp Mon May 08 13:17:49 2017 +0000 +++ b/BTDevice.cpp Mon May 08 21:57:59 2017 +0000 @@ -55,7 +55,7 @@ /* set callbacks */ this->ble.onDataWritten(this, &BTDevice::dataWriteCallback); - // this->ble.onDisconnection(this, disconnectionCallback); + this->ble.onDisconnection(this, &BTDevice::disconnectionCallback); this->pc.baud(9600); this->pc.attach(this, &BTDevice::uartCallback, pc.RxIrq); @@ -97,6 +97,10 @@ } } +void BTDevice::disconnectionCallback(const Gap::DisconnectionCallbackParams_t *params) { + //TODO +} + void BTDevice::uartCallback(void) { while(pc.readable()) {