Random Number Generator (RNG) peripheral driver.
More...
Random Number Generator (RNG) peripheral driver.
◆ NRFX_RNG_DEFAULT_CONFIG
#define NRFX_RNG_DEFAULT_CONFIG |
Value:{ \
.error_correction = true, \
.interrupt_priority = NRFX_RNG_DEFAULT_CONFIG_IRQ_PRIORITY, \
}
RNG default configuration. Basic usage:
This configuration sets up randon number generator with the following options:
◆ nrfx_rng_init()
Function for initializing the nrfx_rng module.
- Parameters
-
[in] | p_config | Pointer to the structure with the initial configuration. |
[in] | handler | Event handler provided by the user. Must not be NULL. |
- Return values
-
NRFX_SUCCESS | Driver was successfully initialized. |
NRFX_ERROR_ALREADY_INITIALIZED | Driver was already initialized. |
◆ nrfx_rng_start()
void nrfx_rng_start |
( |
void |
| ) |
|
Function for starting the generation of random values.
New data should be handled by handler passed to the nrfx_rng_init() function.
◆ nrfx_rng_stop()
void nrfx_rng_stop |
( |
void |
| ) |
|
Function for stopping the generation of random values.
Function disables interrupts in peripheral and stops the generation of new random values.