nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ to_hex_str()

int to_hex_str ( char * out,
uint16_t out_size,
const uint8_t * in,
uint8_t in_size,
bool reverse )

#include <include/zigbee/zigbee_app_utils.h>

Function for converting an input buffer to a hex string.

Parameters
[out]outPointer to the output buffer.
[in]out_sizeSize of the output buffer.
[in]inPointer to the input buffer.
[in]in_sizeSize of the input buffer.
[in]reverseIf true, data output happens in the reverse order.
Returns
snprintf-compatible value. Less than zero means encoding error. Non-negative value is the number of characters that would have been written if the supplied buffer had been large enough. Value greater than or equal to buf_len means that the supplied buffer was too small.
Note
Null terminator is written if buf_len is large enough, but does not count for the return value.