Developing with ZBOSS SDK for Zigbee
|
Macros | |
#define | ZB_RAND_MAX ((zb_uint16_t)0xffff) |
#define | ZB_RANDOM_VALUE(max_value) (((zb_uint16_t)(max_value)) ? (zb_random() / (ZB_RAND_MAX / (zb_uint16_t)(max_value))) : 0) |
Functions | |
zb_uint16_t | zb_random (void) |
void | zb_bzero_volatile (volatile void *s, zb_uint_t size) |
#define ZB_RAND_MAX ((zb_uint16_t)0xffff) |
Maximal possible value for randomly generated (16-bit) value
#define ZB_RANDOM_VALUE | ( | max_value | ) | (((zb_uint16_t)(max_value)) ? (zb_random() / (ZB_RAND_MAX / (zb_uint16_t)(max_value))) : 0) |
Generate random value between 0 to max_value (16 bit)
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_uint16_t zb_random | ( | void | ) |
Generate random value