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 TMP_nrf51
Fork of BLE_Observer by
Revision 5:103717ce54e5, committed 2015-06-20
- Comitter:
- rgrover1
- Date:
- Sat Jun 20 23:40:04 2015 +0000
- Parent:
- 4:dd8231564124
- Child:
- 6:850f44146c9f
- Commit message:
- switch to new APIs; rename BLEDevice to BLE
Changed in this revision
| BLE_API.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/BLE_API.lib Fri Jun 19 23:41:09 2015 +0000 +++ b/BLE_API.lib Sat Jun 20 23:40:04 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/#b04b5db36865 +http://mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/#9f4251b3355c
--- a/main.cpp Fri Jun 19 23:41:09 2015 +0000
+++ b/main.cpp Sat Jun 20 23:40:04 2015 +0000
@@ -17,7 +17,7 @@
#include "mbed.h"
#include "BLE.h"
-BLEDevice ble;
+BLE ble;
DigitalOut led1(LED1);
void periodicCallback(void)
@@ -46,8 +46,8 @@
ble.init();
- ble.setScanParams(500 /* scan interval */, 200 /* scan window */);
- ble.startScan(advertisementCallback);
+ ble.gap().setScanParams(500 /* scan interval */, 200 /* scan window */);
+ ble.gap().startScan(advertisementCallback);
while (true) {
ble.waitForEvent();
