Beacon demo for the BLE API using the nRF51822 native mode drivers

Dependencies:   BLE_API mbed nRF51822

Fork of BLE_iBeacon by Bluetooth Low Energy

Revision:
75:b0385b4fdc3e
Parent:
74:7754bf460f52
Child:
77:7674b63f8aea
diff -r 7754bf460f52 -r b0385b4fdc3e main.cpp
--- 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