Jonas Gartmann
/
Heap_Test
Test program to fill up the heap
Fork of BLE_BatteryLevel by
Diff: main.cpp
- Revision:
- 15:60e095fe4b45
- Parent:
- 14:4024aa3f72b0
- Child:
- 16:abab51f6db64
diff -r 4024aa3f72b0 -r 60e095fe4b45 main.cpp --- a/main.cpp Mon Dec 15 08:10:46 2014 +0000 +++ b/main.cpp Tue Dec 16 09:12:25 2014 +0000 @@ -45,14 +45,14 @@ ble.init(); ble.onDisconnection(disconnectionCallback); + BatteryService batteryService(ble, batteryLevel); + /* setup advertising */ ble.accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED); ble.setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED); ble.setAdvertisingInterval(Gap::MSEC_TO_ADVERTISEMENT_DURATION_UNITS(1000)); /* 1000ms; in multiples of 0.625ms. */ ble.startAdvertising(); - BatteryService batteryService(ble, batteryLevel); - while (true) { ble.waitForEvent(); // this will return upon any system event (such as an interrupt or a ticker wakeup)