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: hw/BLEDevice.h
- Revision:
- 94:455363a6eb90
- Parent:
- 81:fd8c6792281b
- Child:
- 95:5d2102351bf4
--- a/hw/BLEDevice.h Wed Jun 11 15:03:35 2014 +0100
+++ b/hw/BLEDevice.h Fri Jun 13 11:22:03 2014 +0100
@@ -142,7 +142,9 @@
ble_error_t addService(GattService &service);
Gap::GapState_t getGapState(void) const;
- ble_error_t updateCharacteristicValue(uint16_t handle, const uint8_t* value, uint16_t size, bool localOnly = false);
+
+ ble_error_t readCharacteristicValue(uint16_t handle, uint8_t *const buffer, uint16_t *const lengthP);
+ ble_error_t updateCharacteristicValue(uint16_t handle, const uint8_t* value, uint16_t size, bool localOnly = false);
/**
* Yield control to the BLE stack or to other tasks waiting for events. This
@@ -373,6 +375,11 @@
return transport->getGap().getState();
}
+inline ble_error_t BLEDevice::readCharacteristicValue(uint16_t handle, uint8_t *const buffer, uint16_t *const lengthP)
+{
+ return transport->getGattServer().readValue(handle, buffer, lengthP);
+}
+
inline ble_error_t
BLEDevice::updateCharacteristicValue(uint16_t handle, const uint8_t* value, uint16_t size, bool localOnly)
{
