Developing with ZBOSS SDK for Zigbee
|
Macros | |
#define | ZB_RAND_MAX ((zb_uint32_t)~0U) |
#define | ZB_RANDOM_VALUE(max_value) zb_random_val(max_value) |
#define | ZB_RANDOM_U8() (zb_uint8_t)zb_random_val(0xFFU) |
#define | ZB_RANDOM_U16() (zb_uint16_t)zb_random_val(0xFFFFU) |
Functions | |
zb_uint32_t | zb_random (void) |
zb_uint32_t | zb_random_val (zb_uint32_t max_value) |
void | zb_bzero_volatile (volatile void *s, zb_uint_t size) |
#define ZB_RAND_MAX ((zb_uint32_t)~0U) |
Maximal possible value for randomly generated (32-bit) value
#define ZB_RANDOM_U16 | ( | ) | (zb_uint16_t)zb_random_val(0xFFFFU) |
Generate random 16-bit value
#define ZB_RANDOM_U8 | ( | ) | (zb_uint8_t)zb_random_val(0xFFU) |
Generate random 8-bit value
#define ZB_RANDOM_VALUE | ( | max_value | ) | zb_random_val(max_value) |
Equivalent of zb_random_val(). The macro is left for compatibility reasons.
void zb_bzero_volatile | ( | volatile void * | s, |
zb_uint_t | size | ||
) |
Analogue of bzero() for volatile data.
A custom version should be implemented because there is no standard library function for that purpose. Also, this function is not platform-dependent in contrast to ZB_BZERO() macro and therefore can't be overriden by specific ZBOSS platform.
The function sets individually every byte of provided memory region to zero.
zb_uint32_t zb_random | ( | void | ) |
Generate random 32-bit value
zb_uint32_t zb_random_val | ( | zb_uint32_t | max_value | ) |
Generate random value between 0 to max_value, inclusively.