nRF51 SDK - S120 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
DTM Application command request encoders and command response decoders

DTM Application command request encoders and command response decoders. More...

Enumerations

enum  app_uart_stream_baud_rate_t {
  UART_BAUD_RATE_1200,
  UART_BAUD_RATE_2400,
  UART_BAUD_RATE_4800,
  UART_BAUD_RATE_9600,
  UART_BAUD_RATE_14400,
  UART_BAUD_RATE_19200,
  UART_BAUD_RATE_28800,
  UART_BAUD_RATE_38400,
  UART_BAUD_RATE_57600,
  UART_BAUD_RATE_76800,
  UART_BAUD_RATE_115200,
  UART_BAUD_RATE_230400,
  UART_BAUD_RATE_250000,
  UART_BAUD_RATE_460800,
  UART_BAUD_RATE_921600,
  UART_BAUD_RATE_1000000,
  UART_BAUD_RATE_MAX
}
 Enumeration of supported baud rates. More...
 

Functions

uint32_t ble_dtm_init_req_enc (app_uart_stream_comm_params_t const *const p_uart_comm_params, uint8_t *const p_buf, uint32_t *const p_buf_len)
 Encodes ble_dtm_init command request. More...
 
uint32_t ble_dtm_init_rsp_dec (uint8_t const *const p_buf, uint32_t packet_len, uint32_t *const p_result_code)
 Decodes response ble_dtm_init command. More...
 
uint32_t ble_dtm_init (app_uart_stream_comm_params_t *p_uart_comm_params)
 Function to initializing DTM mode. More...
 

Detailed Description

DTM Application command request encoders and command response decoders.

Enumeration Type Documentation

Enumeration of supported baud rates.

Enumerator
UART_BAUD_RATE_1200 

Baud rate 1200.

UART_BAUD_RATE_2400 

Baud rate 2400.

UART_BAUD_RATE_4800 

Baud rate 4800.

UART_BAUD_RATE_9600 

Baud rate 9600.

UART_BAUD_RATE_14400 

Baud rate 14400.

UART_BAUD_RATE_19200 

Baud rate 19200.

UART_BAUD_RATE_28800 

Baud rate 28800.

UART_BAUD_RATE_38400 

Baud rate 38400.

UART_BAUD_RATE_57600 

Baud rate 57600.

UART_BAUD_RATE_76800 

Baud rate 76800.

UART_BAUD_RATE_115200 

Baud rate 115200.

UART_BAUD_RATE_230400 

Baud rate 230400.

UART_BAUD_RATE_250000 

Baud rate 250000.

UART_BAUD_RATE_460800 

Baud rate 460800.

UART_BAUD_RATE_921600 

Baud rate 921600.

UART_BAUD_RATE_1000000 

Baud rate 1000000.

UART_BAUD_RATE_MAX 

Enumeration upper bound.

Function Documentation

uint32_t ble_dtm_init ( app_uart_stream_comm_params_t p_uart_comm_params)

Function to initializing DTM mode.

Parameters
[in]p_uart_comm_paramsPointer to the DTM UART configuration parameters.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
uint32_t ble_dtm_init_req_enc ( app_uart_stream_comm_params_t const *const  p_uart_comm_params,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len 
)

Encodes ble_dtm_init command request.

See Also
Function packet format for packet format, ble_dtm_init_rsp_dec for command response decoder.
Parameters
[in]p_uart_comm_paramsPointer to UART configuration parameters.
[in]p_bufPointer to buffer where encoded data command will be returned.
[in,out]p_buf_lenin: Size of p_buf buffer. out: Length of encoded command packet.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.
uint32_t ble_dtm_init_rsp_dec ( uint8_t const *const  p_buf,
uint32_t  packet_len,
uint32_t *const  p_result_code 
)

Decodes response ble_dtm_init command.

See Also
Function packet format for packet format, ble_dtm_init_req_enc for command request encoder.
Parameters
[in]p_bufPointer to beginning of command response packet.
[in]packet_lenLength (in bytes) of response packet.
[out]p_result_codeCommand result code.
Return values
NRF_SUCCESSDecoding success.
NRF_ERROR_NULLDecoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHDecoding failure. Incorrect buffer length.