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

Encoder for serialized commands from Application Chip. More...

Data Structures

struct  cmd_response_t
 Command response type. More...
 

Functions

uint32_t ble_rpc_cmd_encoder_init (void)
 Function for initializing the BLE S110 RPC Command Encoder module. More...
 
uint32_t ble_rpc_cmd_resp_wait (uint8_t op_code)
 Function for blocking in a loop, using WFE to allow low power mode, while awaiting a response from the connectivity chip. More...
 
void ble_rpc_cmd_rsp_pkt_received (uint8_t *p_packet, uint16_t packet_length)
 Function for handling the command response packet. More...
 

Detailed Description

Encoder for serialized commands from Application Chip.

This file contains the declaration of the functions that encode serialized commands from Application Chip.

Function Documentation

uint32_t ble_rpc_cmd_encoder_init ( void  )

Function for initializing the BLE S110 RPC Command Encoder module.

This function uses the HCI Transport module, HCI Transport and executes hci_transport_tx_done_register and hci_transport_tx_alloc . All errors returned by those functions are passed on by this function.

Return values
NRF_SUCCESSUpon success
Returns
Errors from HCI Transport and hci_transport_tx_alloc .
uint32_t ble_rpc_cmd_resp_wait ( uint8_t  op_code)

Function for blocking in a loop, using WFE to allow low power mode, while awaiting a response from the connectivity chip.

Parameters
[in]op_codeThe Operation Code for which a response message is expected.
Returns
The decoded error code received from the connectivity chip.
void ble_rpc_cmd_rsp_pkt_received ( uint8_t *  p_packet,
uint16_t  packet_length 
)

Function for handling the command response packet.

This function will be called when a command response is received in the transport layer. The response is decoded and returned to the waiting caller.

Parameters
[in]p_packetThe packet from the transport layer.
[in]packet_lengthThe length of the packet.