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:
57:9782cb35c494
Parent:
56:56bc0cab3916
Child:
58:ea344155a388
diff -r 56bc0cab3916 -r 9782cb35c494 main.cpp
--- a/main.cpp	Sat Feb 14 04:53:29 2015 +0000
+++ b/main.cpp	Mon Feb 16 09:33:34 2015 +0000
@@ -36,9 +36,9 @@
  * Note: please remember to calibrate your beacons
  * TX Power for more accurate results.
  */
-uint8_t uuid[] = {0xE2, 0x0A, 0x39, 0xF4, 0x73, 0xF5, 0x4B, 0xC4,
-                  0xA1, 0x2F, 0x17, 0xD1, 0xAD, 0x07, 0xA9, 0x61
-                 };
+const uint8_t uuid[] = {0xE2, 0x0A, 0x39, 0xF4, 0x73, 0xF5, 0x4B, 0xC4,
+                        0xA1, 0x2F, 0x17, 0xD1, 0xAD, 0x07, 0xA9, 0x61
+                       };
 uint16_t majorNumber = 1122;
 uint16_t minorNumber = 3344;
 uint16_t txPower = 0xC8;
@@ -52,7 +52,7 @@
     iBeaconService ibeacon(ble, uuid, majorNumber, minorNumber, txPower);
 
     // Set advertising time
-    ble.setAdvertisingInterval(160); /* 100ms; in multiples of 0.625ms. */
+    ble.setAdvertisingInterval(Gap::MSEC_TO_ADVERTISEMENT_DURATION_UNITS(100)); /* 100ms. */
     ble.startAdvertising();
 
     while(1) {