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 X_NUCLEO_IDB0XA1
Fork of BLE_iBeacon by
Revision 57:9782cb35c494, committed 2015-02-16
- Comitter:
- rgrover1
- Date:
- Mon Feb 16 09:33:34 2015 +0000
- Parent:
- 56:56bc0cab3916
- Child:
- 58:ea344155a388
- Commit message:
- adding a const qualifier to a global variable.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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) {
