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
Fork of BLE_GATT_Example by
Diff: main.cpp
- Revision:
- 13:62b1d32745ac
- Parent:
- 12:6d1f77d0cb37
- Child:
- 16:feee85aefb34
diff -r 6d1f77d0cb37 -r 62b1d32745ac main.cpp
--- a/main.cpp Tue Mar 17 20:38:40 2015 +0000
+++ b/main.cpp Tue Mar 17 20:40:52 2015 +0000
@@ -4,7 +4,7 @@
BLEDevice ble;
DigitalOut led(LED1);
uint16_t customServiceUUID = 0xA000;
-uint16_t readCharUUID = 0xA001;
+uint16_t readCharUUID = 0xA001;
uint16_t writeCharUUID = 0xA002;
const static char DEVICE_NAME[] = "ChangeMe!!"; // change this
@@ -74,9 +74,10 @@
ble.setAdvertisingInterval(160); /* 100ms; in multiples of 0.625ms. */
// add our custom service
- ble.addService(customService); // Add our custom service to device
+ ble.addService(customService);
- ble.startAdvertising(); // start advertising
+ // start advertising
+ ble.startAdvertising();
// infinite loop waiting for BLE interrupt events
while (true) {
