DV \E
Dependencies: BLE_API EthernetInterface mbed nRF51822
Fork of BLE_HeartRate by
Diff: main.cpp
- Revision:
- 13:3ca2045597e7
- Parent:
- 11:1d9aafee4984
- Child:
- 15:7ba28817e31e
diff -r 1d9aafee4984 -r 3ca2045597e7 main.cpp --- a/main.cpp Tue Jun 10 14:22:01 2014 +0100 +++ b/main.cpp Tue Jun 10 14:36:25 2014 +0100 @@ -103,6 +103,10 @@ } } +/** + * Runs once a second in interrupt context triggered by the 'ticker'; updates + * battery level and hrmCounter if there is a connection. + */ void periodicCallback(void) { led1 = !led1; /* Do blinky on LED1 while we're waiting for BLE events */ @@ -128,11 +132,6 @@ } } -/**************************************************************************/ -/*! - @brief Program entry point -*/ -/**************************************************************************/ int main(void) { led1 = 1; @@ -146,7 +145,6 @@ ble.onUpdatesEnabled(updatesEnabledCallback); ble.onUpdatesDisabled(updatesDisabledCallback); - /* Initialise the nRF51822 */ DEBUG("Initialising the nRF51822\n\r"); ble.init();