nRF5 SDK  v12.3.0
Choose documentation:
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
SOC Application command request encoders and command response decoders

SOC Application command request encoders and command response decoders. More...

Functions

uint32_t power_system_off_req_enc (uint8_t *const p_buf, uint32_t *const p_buf_len)
 Encodes sd_power_system_off command request. More...
 
uint32_t temp_get_req_enc (int32_t const *const p_temp, uint8_t *const p_buf, uint32_t *const p_buf_len)
 Encodes sd_temp_get command request. More...
 
uint32_t temp_get_rsp_dec (uint8_t const *const p_buf, uint32_t packet_len, uint32_t *const p_result_code, int32_t **const pp_temp)
 Decodes response to sd_temp_get command. More...
 
uint32_t ecb_block_encrypt_req_enc (nrf_ecb_hal_data_t *p_ecb_data, uint8_t *const p_buf, uint32_t *const p_buf_len)
 Encodes sd_ecb_block_encrypt command request. More...
 
uint32_t ecb_block_encrypt_rsp_dec (uint8_t const *const p_buf, uint32_t packet_len, nrf_ecb_hal_data_t **const p_ecb_data, uint32_t *const p_result_code)
 Decodes response to sd_ecb_block_encrypt command. More...
 

Detailed Description

SOC Application command request encoders and command response decoders.

Function Documentation

uint32_t ecb_block_encrypt_req_enc ( nrf_ecb_hal_data_t p_ecb_data,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len 
)

Encodes sd_ecb_block_encrypt command request.

See Also
ecb_block_encrypt_rsp_dec for command response decoder.
Parameters
[in]p_ecb_dataPointer to ECB data.
[in]p_bufPointer to buffer where encoded data command will be returned.
[in,out]p_buf_lenin: size of p_buf buffer. out: Length of encoded command packet.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.
uint32_t ecb_block_encrypt_rsp_dec ( uint8_t const *const  p_buf,
uint32_t  packet_len,
nrf_ecb_hal_data_t **const  p_ecb_data,
uint32_t *const  p_result_code 
)

Decodes response to sd_ecb_block_encrypt command.

See Also
ecb_block_encrypt_req_enc for command request encoder.
Parameters
[in]p_bufPointer to beginning of command response packet.
[in]packet_lenLength (in bytes) of response packet.
[out]p_ecb_dataPointer to ECB data.
[out]p_result_codeCommand result code.
Returns
NRF_SUCCESS Version information stored successfully.
Return values
NRF_ERROR_INVALID_LENGTHDecoding failure. Incorrect buffer length.
NRF_ERROR_DATA_SIZEDecoding failure. Length of p_event is too small to hold decoded event.
uint32_t power_system_off_req_enc ( uint8_t *const  p_buf,
uint32_t *const  p_buf_len 
)

Encodes sd_power_system_off command request.

Parameters
[in]p_bufPointer to buffer where encoded data command will be returned.
[in,out]p_buf_lenin: size of p_buf buffer. out: Length of encoded command packet.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.
uint32_t temp_get_req_enc ( int32_t const *const  p_temp,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len 
)

Encodes sd_temp_get command request.

See Also
temp_get_rsp_dec for command response decoder.
Parameters
[in]p_tempPointer to result of temperature measurement.
[in]p_bufPointer to buffer where encoded data command will be returned.
[in,out]p_buf_lenin: size of p_buf buffer. out: Length of encoded command packet.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.
uint32_t temp_get_rsp_dec ( uint8_t const *const  p_buf,
uint32_t  packet_len,
uint32_t *const  p_result_code,
int32_t **const  pp_temp 
)

Decodes response to sd_temp_get command.

See Also
temp_get_req_enc for command request encoder.
Parameters
[in]p_bufPointer to beginning of command response packet.
[in]packet_lenLength (in bytes) of response packet.
[out]p_result_codeCommand result code.
[out]pp_tempPointer to result of temperature measurement.
Returns
NRF_SUCCESS Version information stored successfully.
Return values
NRF_ERROR_INVALID_LENGTHDecoding failure. Incorrect buffer length.
NRF_ERROR_DATA_SIZEDecoding failure. Length of p_event is too small to hold decoded event.