Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BLE_API mbed nRF51822
Diff: main.cpp
- Revision:
- 7:61e2224ec9a0
- Parent:
- 6:1730f66fb14d
- Child:
- 8:b433a261072f
diff -r 1730f66fb14d -r 61e2224ec9a0 main.cpp
--- 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);