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

Dependencies:   BLE_API mbed nRF51822 X_NUCLEO_IDB0XA1

Fork of BLE_iBeacon by Bluetooth Low Energy

Revision:
5:97ce285ff00a
Parent:
4:0ce8d2dd62f9
Child:
6:26eab6ee6df4
--- a/main.cpp	Fri Apr 04 09:51:19 2014 +0000
+++ b/main.cpp	Tue May 20 17:56:47 2014 +0100
@@ -45,7 +45,8 @@
     pc.printf("Initialising the nRF51822\n\r");
     nrf.init();
     
-    GapAdvertisingParams advParams ( GapAdvertisingParams::ADV_NON_CONNECTABLE_UNDIRECTED );
+    GapAdvertisingParams advParams (
+        GapAdvertisingParams::ADV_NON_CONNECTABLE_UNDIRECTED );
     GapAdvertisingData   advData;
     GapAdvertisingData   scanResponse;
 
@@ -62,15 +63,16 @@
 
     /* Beacon includes the FLAG and MSD fields */
     advData.addFlags(GapAdvertisingData::BREDR_NOT_SUPPORTED);
-    advData.addData(GapAdvertisingData::MANUFACTURER_SPECIFIC_DATA, beaconPayload, sizeof(beaconPayload));
+    advData.addData(GapAdvertisingData::MANUFACTURER_SPECIFIC_DATA,
+                    beaconPayload,
+                    sizeof(beaconPayload));
 
     /* Start advertising! */
     nrf.getGap().setAdvertisingData(advData, scanResponse);
     nrf.getGap().startAdvertising(advParams);
 
     /* Do blinky on LED1 while we're waiting for BLE events */
-    for (;;)
-    {
+    for (;; ) {
       led1 = !led1;
       wait(1);
     }