See Random Number Generation for detailed documentation.
License#
Copyright 2018 Silicon Laboratories Inc. www.silabs.com
The licensor of this software is Silicon Laboratories Inc. Your use of this software is governed by the terms of Silicon Labs Master Software License Agreement (MSLA) available at www.silabs.com/about-us/legal/master-software-license-agreement. This software is distributed to you in Source Code format and is governed by the sections of the MSLA applicable to Source Code.
/***************************************************************************/
#ifndef __RANDOM_H__
#define __RANDOM_H__
void halStackSeedRandom(uint32_t seed);
#if defined(SL_ZIGBEE_TEST)
#define halCommonGetRandom() halCommonGetRandomTraced(__FILE__, __LINE__)
uint16_t halCommonGetRandomTraced(char *file, int line);
#else
uint16_t halCommonGetRandom(void);
#endif
#endif //__RANDOM_H__
Functions#
Seeds the halCommonGetRandom() pseudorandom number generator.
Runs a standard LFSR to generate pseudorandom numbers.
Function Documentation#
halStackSeedRandom#
void halStackSeedRandom (uint32_t seed)
Seeds the halCommonGetRandom() pseudorandom number generator.
N/A | seed | A seed for the pseudorandom number generator. |
Called by the stack during initialization with a seed from the radio.
36
of file /mnt/raid/workspaces/ws.r4wf6JzLX/overlay/gsdk/platform/base/hal/micro/random.h
halCommonGetRandom#
uint16_t halCommonGetRandom (void )
Runs a standard LFSR to generate pseudorandom numbers.
N/A |
Called by the MAC in the stack to choose random backoff slots.
Complicated implementations may improve the MAC's ability to avoid collisions in large networks, but it is critical to implement this function to return quickly.
51
of file /mnt/raid/workspaces/ws.r4wf6JzLX/overlay/gsdk/platform/base/hal/micro/random.h