nRF51 SDK - S120 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
DTM Connectivity command request decoder and command response encoder

DTM Connectivity command request decoder and command response encoder. More...

Functions

uint32_t ble_dtm_init_req_dec (uint8_t const *const p_buf, uint16_t packet_len, app_uart_stream_comm_params_t *p_comm_params)
 Decodes ble_dtm_init command request. More...
 
uint32_t ble_dtm_init_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len)
 Encodes ble_dtm_init command response. More...
 

Detailed Description

DTM Connectivity command request decoder and command response encoder.

Function Documentation

uint32_t ble_dtm_init_req_dec ( uint8_t const *const  p_buf,
uint16_t  packet_len,
app_uart_stream_comm_params_t p_comm_params 
)

Decodes ble_dtm_init command request.

See Also
Function packet format for packet format, ble_dtm_init_rsp_enc for response encoding.
Parameters
[in]p_bufPointer to beginning of command request packet.
[in]packet_lenLength (in bytes) of request packet.
[in]p_comm_paramsPointer to the structure with DTM Uart configuration.
Return values
NRF_SUCCESSDecoding success.
NRF_ERROR_NULLDecoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHDecoding failure. Incorrect buffer length.
uint32_t ble_dtm_init_rsp_enc ( uint32_t  return_code,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len 
)

Encodes ble_dtm_init command response.

See Also
Function packet format for packet format. ble_dtm_init_req_dec for request decoding.
Parameters
[in]return_codeReturn code indicating if command was successful or not.
[out]p_bufPointer to buffer where encoded data command response will be returned.
[in,out]p_buf_lenin: size of p_buf buffer. out: Length of encoded command response packet.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.