Beacon demo for the BLE API using the nRF51822 native mode drivers
Dependencies: BLE_API mbed nRF51822
Fork of BLE_iBeacon by
Diff: main.cpp
- 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; -}