nRF5 SDK v13.0.0
Modules | Functions

Functions for handling GATTS write and read requests. More...

Modules

 GATTS read
 Functions for handling GATTS read requests.
 
 GATTS write
 Functions for handling GATTS write requests.
 

Functions

ret_code_t es_gatts_init (nrf_ble_escs_t *p_ble_escs)
 
void es_gatts_handle_write (nrf_ble_escs_t *p_escs, uint16_t uuid, uint16_t val_handle, uint8_t *p_data, uint16_t length)
 Function for handling all write requests from the Central. More...
 
void es_gatts_handle_read (nrf_ble_escs_t *p_escs, uint16_t uuid, uint16_t val_handle)
 Function for handling all read requests from the Central. More...
 
ret_code_t es_gatts_send_reply (nrf_ble_escs_t *p_escs, ble_gatts_rw_authorize_reply_params_t *p_reply)
 Function for sending an RW-authorization reply. More...
 
ret_code_t es_gatts_send_op_not_permitted (nrf_ble_escs_t *p_escs, bool op_is_read)
 Function for sending an RW-authorization reply with status 'Operation not permitted'. More...
 

Detailed Description

Functions for handling GATTS write and read requests.

Function Documentation

void es_gatts_handle_read ( nrf_ble_escs_t p_escs,
uint16_t  uuid,
uint16_t  val_handle 
)

Function for handling all read requests from the Central.

Parameters
[in]p_escsPointer to the Eddystone Configuration Service.
[in]uuidThe UUID of the characteristic that is being read from.
[in]val_handleValue handle field of the characteristic handle of the characteristic that is being read from.
void es_gatts_handle_write ( nrf_ble_escs_t p_escs,
uint16_t  uuid,
uint16_t  val_handle,
uint8_t *  p_data,
uint16_t  length 
)

Function for handling all write requests from the Central.

Parameters
[in]p_escsPointer to the Eddystone Configuration Service.
[in]uuidThe UUID of the characteristic that is being written to.
[in]val_handleValue handle field of the characteristic handle of the characteristic that is being written to.
[in]p_dataPointer to the data to be written.
[in]lengthLength of the data to be written.
ret_code_t es_gatts_send_op_not_permitted ( nrf_ble_escs_t p_escs,
bool  op_is_read 
)

Function for sending an RW-authorization reply with status 'Operation not permitted'.

Parameters
[in]p_escsPointer to the Eddystone Configuration Service.
[in]op_is_readFlag that specifies if the operation being responded to is a 'read' operation. If false, a 'write' operation is assumed.
Return values
NRF_ERROR_NULLIf p_escs is NULL.
Returns
Otherwise, the error code from es_gatts_send_reply() is returned.
ret_code_t es_gatts_send_reply ( nrf_ble_escs_t p_escs,
ble_gatts_rw_authorize_reply_params_t p_reply 
)

Function for sending an RW-authorization reply.

Parameters
[in]p_escsPointer to the Eddystone Configuration Service.
[in]p_replyPointer to the reply to send.
Return values
NRF_SUCCESSIf the reply was successfully issued to the SoftDevice.
NRF_ERROR_NULLIf either of the pointers p_escs or p_reply is NULL.
NRF_ERROR_INVALID_STATEIf the connection handle of p_escs is invalid.
Returns
Otherwise, an error code from sd_ble_gatts_rw_authorize_reply() is returned.

Documentation feedback | Developer Zone | Subscribe | Updated