![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Runlock POC code
Dependencies: BLE_API mbed nRF51822
Fork of BLE_GATT_Example by
Diff: main.cpp
- Revision:
- 4:7ef90665b399
- Parent:
- 3:0fb60f81f693
- Child:
- 5:d0548c64e2e7
--- a/main.cpp Sat Feb 14 15:25:00 2015 +0000 +++ b/main.cpp Sat Feb 14 15:27:51 2015 +0000 @@ -34,7 +34,7 @@ } // This function is called whenever someone writes something to the writeCharacteristic -void writeCharCallback(//TODO, fill this in) +void writeCharCallback(const GattCharacteristicWriteCBParams *params) { //TODO: when character is written here change the LED, update the read characteristic, and print out to console } @@ -45,7 +45,7 @@ led = 0; // turn LED off ble.init(); ble.onDisconnection(disconnectionCallback); - ble.onDataWritten(customService.writeChar,writeCharCallback); //TODO: this is not correct, figure out correct syntax + ble.onDataWritten(writeCharCallback); //TODO: this is not correct, figure out correct syntax /* setup advertising */ ble.accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED);