nRF51 SDK - S120 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Command decoder in the connectivity chip

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...
 

Detailed Description

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.

Function Documentation

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.

Parameters
[in]p_commandThe encoded command.
[in]command_lenLength of the encoded command including opcode.
Return values
NRF_SUCCESSOperation success.
NRF_ERROR_NULLOperation failure. NULL pointer supplied.
NRF_ERROR_INTERNALOperation failure. Internal error ocurred. .