Bike service
Fork of BLE_API by
Diff: public/DiscoveredCharacteristic.h
- Revision:
- 506:be938b716fe8
- Parent:
- 505:ac825d37e8f2
- Child:
- 508:31e63ad6923f
--- a/public/DiscoveredCharacteristic.h Fri Jun 19 15:52:04 2015 +0100 +++ b/public/DiscoveredCharacteristic.h Fri Jun 19 15:52:04 2015 +0100 @@ -87,6 +87,27 @@ */ ble_error_t writeWoResponse(uint16_t length, const uint8_t *value) const; + /** + * Perform a write procedure. + * + * @param length + * The amount of data being written. + * @param value + * The bytes being written. + * + * @note It is important to note that a write without response will generate + * an onDataSent() callback when the packet has been transmitted. There + * will be a BLE-stack specific limit to the number of pending + * writeWoResponse operations; the user may want to use the onDataSent() + * callback for flow-control. + * + * @retval BLE_ERROR_NONE Successfully started the Write procedure, else + * BLE_ERROR_INVALID_STATE if some internal state about the connection is invalid, or + * BLE_STACK_BUSY if some client procedure already in progress, or + * BLE_ERROR_NO_MEM if there are no available buffers left to process the request, or + * BLE_ERROR_OPERATION_NOT_PERMITTED due to the characteristic's properties. + */ + ble_error_t write(uint16_t length, const uint8_t *value) const; static void setupOnDataRead(GattClient::ReadCallback_t callback) { onDataReadCallback = callback;