microbit: Added support for explicit notification
Introduce abality to explicitly perform a notify/indicate opertion on a characteristic. This brings benefits of a reduce RAM footprint for storing GattCharacterisitics. n.b. temporary measure until ARM mbed integrate more generic optimisations.
This commit is contained in:
parent
a5f6d4b877
commit
3306737028
1 changed files with 21 additions and 0 deletions
|
@ -186,6 +186,27 @@ public:
|
|||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porters: override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform an explicit BLE notification of a given attribute.
|
||||
*
|
||||
* @param[in] attributeHandle
|
||||
* Handle for the value attribute of the Characteristic.
|
||||
* @param[in] value
|
||||
* A pointer to a buffer holding the new value
|
||||
* @param[in] size
|
||||
* Size of the new value (in bytes).
|
||||
*
|
||||
* @return BLE_ERROR_NONE if we have successfully set the value of the attribute.
|
||||
*/
|
||||
virtual ble_error_t notify(GattAttribute::Handle_t attributeHandle, const uint8_t *value, uint16_t size)
|
||||
{
|
||||
(void)attributeHandle;
|
||||
(void)value;
|
||||
(void)size;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine the updates-enabled status (notification or indication) for the current connection from a characteristic's CCCD.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue