nRF51 SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
GAP Command Decoder

Decoder for serialized GAP commands from Application Chip. More...

Functions

uint32_t ble_rpc_cmd_gap_decode (uint8_t *p_command, uint8_t op_code, uint32_t command_len)
 Function for processing the encoded GAP command from Application Chip. More...
 

Detailed Description

Decoder for serialized GAP commands from Application Chip.

This file contains the declaration of the function that decodes the serialized GAP commands from Application Chip and calls the appropriate BLE stack API.

Function Documentation

uint32_t ble_rpc_cmd_gap_decode ( uint8_t *  p_command,
uint8_t  op_code,
uint32_t  command_len 
)

Function for processing the encoded GAP command from Application Chip.

This function will decode the encoded command and call the appropriate BLE Stack API. It will then create a Command Response packet with the return value from the stack API encoded in it and will send it to the transport layer for transmission to the application controller chip.

Parameters
[in]p_commandThe encoded command.
[in]op_codeOperation code of the command.
[in]command_lenLength of the encoded command.
Return values
NRF_SUCCESSIf the decoding of the command was successful, the SoftDevice API was called, and the command response was sent to peer, otherwise an error code. If the transport layer returns an error code while sending the Command Response, the same error code will be returned by this function (see hci_transport_pkt_write for the list of error codes).