Simple beacon for nRF51822

Dependencies:   BLE_API mbed nRF51822Copy

Fork of BLE_iBeacon by Bluetooth Low Energy

This is the demo beacon for ARM TechCon 2014.

Based on the original library, this demo reads the onboard switches and temperature sensor and beacons them out as a BLE advertisment.

Revision:
24:9bcd0dbf0f41
Parent:
23:b66fa312e926
Child:
25:a56462536345
--- a/main.cpp	Fri May 23 17:04:34 2014 +0100
+++ b/main.cpp	Fri May 23 17:50:10 2014 +0100
@@ -50,8 +50,19 @@
     0xC8        // 2's complement of the Tx power (-56dB)
 };
 
-static void setupAppHardware(void);
-static void tickerCallback(void);
+void tickerCallback(void)
+{
+    tickerLED = !tickerLED;
+}
+
+void setupAppHardware(void)
+{
+    /* Setup blinkies: mainloopLED is toggled in main, tickerLED is
+     * toggled via Ticker */
+    mainloopLED = 1;
+    tickerLED   = 1;
+    flipper.attach(&tickerCallback, 1.0);
+}
 
 int main(void)
 {
@@ -77,17 +88,3 @@
         wait(1);
     }
 }
-
-void setupAppHardware(void)
-{
-    /* Setup blinkies: mainloopLED is toggled in main, tickerLED is
-     * toggled via Ticker */
-    mainloopLED = 1;
-    tickerLED   = 1;
-    flipper.attach(&tickerCallback, 1.0);
-}
-
-void tickerCallback(void)
-{
-    tickerLED = !tickerLED;
-}