GattCharacteristicReadCBParams::len isn't a pointer. And data is const.
This commit is contained in:
parent
c0eb59b498
commit
248c63d793
2 changed files with 23 additions and 2 deletions
|
@ -87,6 +87,27 @@ public:
|
|||
*/
|
||||
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;
|
||||
|
|
|
@ -40,8 +40,8 @@ struct GattCharacteristicReadCBParams {
|
|||
GATTS_CHAR_OP_READ_REQ = 0x0A, /**< Read Request. */
|
||||
} op; /**< Type of write operation, */
|
||||
uint16_t offset; /**< Offset for the read operation. */
|
||||
uint16_t *len; /**< Length of the outgoing data. */
|
||||
uint8_t *data; /**< Outgoing data, variable length. */
|
||||
uint16_t len;
|
||||
const uint8_t *data; /* @note: data might not persist beyond the callback; make a local copy if needed. */
|
||||
};
|
||||
|
||||
enum GattCharacteristicAuthCBReply_t {
|
||||
|
|
Loading…
Reference in a new issue