Tin Pham / Mbed 2 deprecated BLE_iBeaconTin

Dependencies:   BLE_API mbed nRF51822

Fork of BLE_iBeacon by Bluetooth Low Energy

Files at this revision

API Documentation at this revision

Comitter:
rgrover1
Date:
Fri Nov 06 13:24:28 2015 +0000
Parent:
74:7754bf460f52
Child:
76:776e4ef44177
Commit message:
oops. had forgotten to put in the spin loop during initialization(). This isn't necessary for nRF, but could be necessary for other controllers.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Nov 06 13:12:00 2015 +0000
+++ b/main.cpp	Fri Nov 06 13:24:28 2015 +0000
@@ -50,6 +50,10 @@
 int main(void)
 {
     ble.init(bleInitComplete);
+    
+    /* SpinWait for initialization to complete. This is necessary because the
+     * BLE object is used in the main loop below. */
+    while (ble.hasInitialized()) { /* spin loop */ }
 
     while (true) {
         ble.waitForEvent(); // allows or low power operation