7#ifndef ZIGBEE_APP_UTILS_H__
8#define ZIGBEE_APP_UTILS_H__
60int to_hex_str(
char *out, uint16_t out_size,
const uint8_t *in,
61 uint8_t in_size,
bool reverse);
75 uint8_t *out_buff, uint8_t out_buff_size,
bool reverse);
90 return parse_hex_str(s, strlen(s), value,
sizeof(*value),
true);
106 return parse_hex_str(s, strlen(s), (uint8_t *)value,
sizeof(*value),
true);
125 const zb_ieee_addr_t in);
225#if defined CONFIG_ZIGBEE_ROLE_END_DEVICE
240#if defined CONFIG_ZIGBEE_FACTORY_RESET
void zigbee_led_status_update(zb_bufid_t bufid, uint32_t led_idx)
Function for indicating the Zigbee network connection status on LED.
void user_input_indicate(void)
Function for indicating the default signal handler about user input on the device.
static bool parse_hex_u16(char const *s, uint16_t *value)
Parse a hex string to uint16_t.
Definition zigbee_app_utils.h:104
int ieee_addr_to_str(char *str_buf, uint16_t buf_len, const zb_ieee_addr_t in)
Function for converting 64-bit address to hex string.
void check_factory_reset_button(uint32_t button_state, uint32_t has_changed)
Checks if Factory Reset button was pressed. If so, it initiates the procedure of checking if it was p...
static bool parse_long_address(const char *input, zb_ieee_addr_t addr)
Function for parsing a null-terminated string of hex characters into a 64-bit address.
Definition zigbee_app_utils.h:166
addr_type_t parse_address(const char *input, zb_addr_u *output, addr_type_t addr_type)
Function for parsing a null-terminated string of hex characters into 64-bit or 16-bit address.
int to_hex_str(char *out, uint16_t out_size, const uint8_t *in, uint8_t in_size, bool reverse)
Function for converting an input buffer to a hex string.
addr_type_t
Address type.
Definition zigbee_app_utils.h:132
@ ADDR_INVALID
Definition zigbee_app_utils.h:133
@ ADDR_SHORT
Definition zigbee_app_utils.h:135
@ ADDR_LONG
Definition zigbee_app_utils.h:136
@ ADDR_ANY
Definition zigbee_app_utils.h:134
bool was_factory_reset_done(void)
Indicates whether Factory Reset was started as a result of a button press or not.
zb_ret_t zigbee_default_signal_handler(zb_bufid_t bufid)
Function for passing signals to the default Zigbee stack event handler.
void register_factory_reset_button(uint32_t button)
Registers which button and for how long has to be pressed in order to do Factory Reset.
static bool parse_hex_u8(char const *s, uint8_t *value)
Parse a hex string to uint8_t.
Definition zigbee_app_utils.h:88
void zigbee_erase_persistent_storage(zb_bool_t erase)
Function for setting the Erase persistent storage, depending on the erase pin.
static bool parse_short_address(const char *input, zb_uint16_t *addr)
Function for parsing a null-terminated string of hex characters into 16-bit address.
Definition zigbee_app_utils.h:184
bool parse_hex_str(char const *in_str, uint8_t in_str_len, uint8_t *out_buff, uint8_t out_buff_size, bool reverse)
Read array of uint8_t from hex string.
void zigbee_configure_sleepy_behavior(bool enable)
Function for enabling sleepy behavior of End Device. Must be called before zigbee_enable() is called....