skaner
Dependencies: BLE_API TextLCD mbed nRF51822
Fork of BLE_LEDBlinker by
Diff: main.cpp
- Revision:
- 7:61e2224ec9a0
- Parent:
- 6:1730f66fb14d
- Child:
- 8:b433a261072f
--- a/main.cpp Mon Jun 29 06:23:09 2015 +0000 +++ b/main.cpp Thu Jul 02 08:39:04 2015 +0000 @@ -18,6 +18,7 @@ #include "ble/BLE.h" #include "ble/DiscoveredCharacteristic.h" #include "ble/DiscoveredService.h" +#include "ble/services/UARTService.h" BLE ble; @@ -107,8 +108,8 @@ /* Request for comments: should setupOnDataRead() be a static for DiscoveredCharacteristic? * Or should it be passed in as a parameter to read()? */ - DiscoveredCharacteristic::setupOnDataRead(triggerToggledWrite); - DiscoveredCharacteristic::setupOnDataWrite(triggerRead); + ble.gattClient().onDataRead(triggerToggledWrite); + ble.gattClient().onDataWrite(triggerRead); ble.gap().setScanParams(500, 400); ble.gap().startScan(advertisementCallback);