For Blood Pressure Demo
BLE_BloodPressure_demo implements Blood Pressure Service which enables a collector device to connect and interact with it. the service spec can be found here. User can download the APP 'nRF Connect' or 'nRF Toolbox' available in both App Store and Google Play to scan the adverting and connect to the module.
Diff: main.cpp
- Revision:
- 2:64cead334a4c
- Parent:
- 1:fc03791a9842
--- a/main.cpp Fri Aug 14 10:41:46 2015 +0000 +++ b/main.cpp Thu Apr 20 10:25:42 2017 +0000 @@ -3,8 +3,6 @@ #include "DeviceInformationService.h" #include "BloodPressureService.h" -#define UPDATE_PARAMS_FOR_LONGER_CONNECTION_INTERVAL 0 - BLEDevice ble; DigitalOut led01(LED1); @@ -13,7 +11,7 @@ GattService::UUID_DEVICE_INFORMATION_SERVICE}; static volatile bool triggerSensorPolling = false; -void disconnectionCallback(Gap::Handle_t handle, Gap::DisconnectionReason_t reason) +void disconnectionCallback(const Gap::DisconnectionCallbackParams_t *params) { ble.startAdvertising(); // restart advertising } @@ -34,7 +32,7 @@ ticker.attach(periodicCallback, 1); // blink LED every second ble.init(); - ble.onDisconnection(disconnectionCallback); + ble.gap().onDisconnection(disconnectionCallback); /* Setup primary service. */ float SystolicValue = 100.0f; // mmHg