Functions | |
uint16_t | app_rng_init (app_rng_params_t *p_params, app_rng_evt_handler_t evt_handler) |
Initialize the APP RNG DRIVER according to the specified parameters in the app_rng_params_t and app_rng_evt_handler_t. More... | |
uint16_t | app_rng_deinit (void) |
De-initialize the APP RNG DRIVER peripheral. More... | |
uint16_t | app_rng_gen_sync (uint16_t *p_seed, uint32_t *p_random32bit) |
Generate a 32-bit random number. More... | |
uint16_t | app_rng_gen_async (uint16_t *p_seed) |
Generate a 32-bit random number in interrupt mode. More... | |
rng_handle_t * | app_rng_get_handle (void) |
Return the RNG handle. More... | |
uint16_t app_rng_deinit | ( | void | ) |
De-initialize the APP RNG DRIVER peripheral.
uint16_t app_rng_gen_async | ( | uint16_t * | p_seed | ) |
Generate a 32-bit random number in interrupt mode.
[in] | p_seed | user configured seeds. the seed is valid when seed_mode member of rng_init_t is configured as RNG_SEED_USER. If 59-bit random number is selected, the seed need to provide [0~58] bit spaces. If 128-bit random number is selected, the seed need to provide [0~127] bit spaces. |
uint16_t app_rng_gen_sync | ( | uint16_t * | p_seed, |
uint32_t * | p_random32bit | ||
) |
Generate a 32-bit random number.
[in] | p_seed | user configured seeds. the seed is valid when seed_mode member of rng_init_t is configured as RNG_SEED_USER. If 59-bit random number is selected, the seed need to provide [0~58] bit spaces. If 128-bit random number is selected, the seed need to provide [0~127] bit spaces. |
[out] | p_random32bit | Pointer to generated random number variable if successful. |
rng_handle_t* app_rng_get_handle | ( | void | ) |
Return the RNG handle.
uint16_t app_rng_init | ( | app_rng_params_t * | p_params, |
app_rng_evt_handler_t | evt_handler | ||
) |
Initialize the APP RNG DRIVER according to the specified parameters in the app_rng_params_t and app_rng_evt_handler_t.
[in] | p_params | Pointer to app_rng_params_t parameter which contains the configuration information for the specified RNG module. |
[in] | evt_handler | RNG user callback function. |