nRF51 SDK - S120 SoftDevice
|
Decoder for serialized commands from an Application Chip. More...
Functions | |
uint32_t | ser_conn_command_process (uint8_t *p_command, uint16_t command_len) |
A function decodes an encoded command and sends a response to an Application Chip. More... | |
Decoder for serialized commands from an Application Chip.
This file contains declaration of common function used for commands decoding and sending responses back to an Application Chip after a command is processed.
uint32_t ser_conn_command_process | ( | uint8_t * | p_command, |
uint16_t | command_len | ||
) |
A function decodes an encoded command and sends a response to an Application Chip.
The function decodes an encoded command and calls a SoftDevice API function when a command decoder was found or forms a common response with error code NRF_ERROR_NOT_SUPPORTED otherwise. Then the function sends a SoftDevice response or the response with NRF_ERROR_NOT_SUPPORTED error code to an Application Chip.
[in] | p_command | The encoded command. |
[in] | command_len | Length of the encoded command including opcode. |
NRF_SUCCESS | Operation success. |
NRF_ERROR_NULL | Operation failure. NULL pointer supplied. |
NRF_ERROR_INTERNAL | Operation failure. Internal error ocurred. . |