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_notifications_with_orig_mbed by
Diff: main.cpp
- Revision:
- 12:e38bb61023ed
- Parent:
- 11:fd1cf9dbf3a4
- Child:
- 13:d4448d59ab69
--- a/main.cpp Tue Apr 18 17:05:04 2017 +0000
+++ b/main.cpp Tue Apr 18 21:11:05 2017 +0000
@@ -87,7 +87,6 @@
ble.gap().setAdvertisingInterval(1000); /* 1000ms. */
pc.printf("start advertising now \r\n");
ble.gap().startAdvertising();
-
}
int main(void)
@@ -98,7 +97,7 @@
BLE &ble = BLE::Instance();
ble.init(bleInitComplete);
- pc.printf("entereing spin loop\r\n");
+ pc.printf("entering spin loop\r\n");
/* SpinWait for initialization to complete. This is necessary because the
* BLE object is used in the main loop below. */
while (ble.hasInitialized() == false) { /* spin loop */ }
@@ -110,10 +109,10 @@
pc.printf("sending Notification\r\n");
buttonServicePtr->updateButtonState(counter);
counter++;
- //sleep(1000);
} else {
//
}
- ble.waitForEvent();
+ //ble.waitForEvent();
+ sleep(1000);
}
}
