nRF51 SDK v9.0.0
Functions
SOC Connectivity command request decoders and command response encoders

SOC Connectivity command request decoders and command response encoderss. More...

Functions

uint32_t power_system_off_req_dec (uint8_t const *const p_buf, uint16_t packet_len)
 Decodes sd_power_system_off command request. More...
 
uint32_t temp_get_req_dec (uint8_t const *const p_buf, uint32_t buf_len, int32_t **const pp_temp)
 Decodes sd_temp_get command request. More...
 
uint32_t temp_get_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len, int32_t *const p_temp)
 Encodes sd_temp_get command response. More...
 

Detailed Description

SOC Connectivity command request decoders and command response encoderss.

Function Documentation

uint32_t power_system_off_req_dec ( uint8_t const *const  p_buf,
uint16_t  packet_len 
)

Decodes sd_power_system_off command request.

See Also
0x34 - sd_power_system_off for packet format.
Parameters
[in]p_bufPointer to buffer where encoded data command will be returned.
[in]packet_lenLength (in bytes) of request packet.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_PARAMEncoding failure. Incorrect parameter.
uint32_t temp_get_req_dec ( uint8_t const *const  p_buf,
uint32_t  buf_len,
int32_t **const  pp_temp 
)

Decodes sd_temp_get command request.

See Also
0x52 - sd_temp_get for packet format. temp_get_rsp_enc for response encoding.
Parameters
[in]p_bufPointer to buffer where encoded data command will be returned.
[in]buf_lenLength (in bytes) of request packet.
[out]pp_tempPointer to pointer to result of temperature measurement.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_PARAMEncoding failure. Incorrect parameter.
uint32_t temp_get_rsp_enc ( uint32_t  return_code,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len,
int32_t *const  p_temp 
)

Encodes sd_temp_get command response.

See Also
0x52 - sd_temp_get for packet format. temp_get_req_dec for request decoding.
Parameters
[in]return_codeReturn code indicating if command was successful or not.
[out]p_bufPointer to buffer where encoded data command response will be returned.
[in,out]p_buf_lenin: size of p_buf buffer. out: Length of encoded command response packet.
[in]p_tempPointer to result of temperature measurement.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.

This document was last updated on Thu Jul 9 2015.
Please send us your feedback about the documentation! For technical questions, visit the Nordic Developer Zone.