Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_API by
Diff: services/LinkLossService.h
- Revision:
- 277:1407d2f1ce3c
- Parent:
- 246:6c2402f286f6
- Child:
- 510:39612adfbf68
diff -r daa42f59bdb8 -r 1407d2f1ce3c services/LinkLossService.h
--- a/services/LinkLossService.h Thu Jan 22 09:59:43 2015 +0000
+++ b/services/LinkLossService.h Thu Jan 22 09:59:44 2015 +0000
@@ -43,8 +43,7 @@
ble(bleIn),
alertLevel(levelIn),
callback(callbackIn),
- alertLevelChar(GattCharacteristic::UUID_ALERT_LEVEL_CHAR, reinterpret_cast<uint8_t *>(&alertLevel), sizeof(uint8_t), sizeof(uint8_t),
- GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE) {
+ alertLevelChar(GattCharacteristic::UUID_ALERT_LEVEL_CHAR, reinterpret_cast<uint8_t *>(&alertLevel)) {
static bool serviceAdded = false; /* We should only ever add one LinkLoss service. */
if (serviceAdded) {
return;
@@ -94,10 +93,11 @@
}
private:
- BLEDevice &ble;
- AlertLevel_t alertLevel;
- callback_t callback;
- GattCharacteristic alertLevelChar;
+ BLEDevice &ble;
+ AlertLevel_t alertLevel;
+ callback_t callback;
+
+ ReadWriteGattCharacteristic<uint8_t> alertLevelChar;
};
#endif /* __BLE_LINK_LOSS_SERVICE_H__ */
\ No newline at end of file
