Compatible with Keewi v1
Fork of BLE_API by
Revision 74:301042c34cb8, committed 2014-06-06
- Comitter:
- Rohit Grover
- Date:
- Fri Jun 06 11:30:56 2014 +0100
- Parent:
- 73:eeb1ac3545e9
- Child:
- 75:d08bdef22500
- Commit message:
- add updateCharacteristicValue()
Changed in this revision
hw/BLEDevice.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/hw/BLEDevice.h Fri Jun 06 11:17:37 2014 +0100 +++ b/hw/BLEDevice.h Fri Jun 06 11:30:56 2014 +0100 @@ -120,9 +120,7 @@ ble_error_t accumulateAdvertisingPayload(GapAdvertisingData::Flags flags); ble_error_t accumulateAdvertisingPayload(GapAdvertisingData::Appearance app); ble_error_t accumulateAdvertisingPayloadTxPower(int8_t power); - ble_error_t accumulateAdvertisingPayload(GapAdvertisingData::DataType type, - const uint8_t *data, - uint8_t len); + ble_error_t accumulateAdvertisingPayload(GapAdvertisingData::DataType type, const uint8_t *data, uint8_t len); ble_error_t startAdvertising(void); ble_error_t stopAdvertising(void); @@ -144,6 +142,7 @@ 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); private: /** @@ -345,6 +344,11 @@ return transport->getGap().getState(); } +inline ble_error_t +BLEDevice::updateCharacteristicValue(uint16_t handle, const uint8_t* value, uint16_t size, bool localOnly) { + return transport->getGattServer().updateValue(handle, const_cast<uint8_t *>(value), size, localOnly); +} + /* * ALL OF THE FOLLOWING METHODS ARE DEPRECATED */