Hardware access layer (HAL) for managing the Random Number Generator (RNG) peripheral.
More...
Hardware access layer (HAL) for managing the Random Number Generator (RNG) peripheral.
RNG events.
Enumerator |
---|
NRF_RNG_EVENT_VALRDY |
New random number generated event.
|
RNG interrupts.
Enumerator |
---|
NRF_RNG_INT_VALRDY_MASK |
Mask for enabling or disabling an interrupt on VALRDY event.
|
Types of RNG shortcuts.
Enumerator |
---|
NRF_RNG_SHORT_VALRDY_STOP_MASK |
Mask for setting shortcut between EVENT_VALRDY and TASK_STOP.
|
RNG tasks.
Enumerator |
---|
NRF_RNG_TASK_START |
Start the random number generator.
|
NRF_RNG_TASK_STOP |
Stop the random number generator.
|
__STATIC_INLINE uint32_t* nrf_rng_event_address_get |
( |
nrf_rng_event_t |
rng_event | ) |
|
Function for getting address of the specified event.
This function can be used by the PPI module.
- Parameters
-
[in] | rng_event | The specified event. |
- Returns
- Address of the specified event.
Function for clearing the specified event.
- Parameters
-
[in] | rng_event | The specified event. |
Function for getting the state of the specified event.
- Parameters
-
[in] | rng_event | The specified event. |
- Return values
-
true | The event is not set. |
false | The event is set. |
__STATIC_INLINE void nrf_rng_int_disable |
( |
uint32_t |
mask | ) |
|
Function for disabling interrupts.
- Parameters
-
[in] | mask | Mask of interrupts to be disabled. |
__STATIC_INLINE void nrf_rng_int_enable |
( |
uint32_t |
mask | ) |
|
Function for enabling interrupts.
- Parameters
-
[in] | mask | Mask of interrupts to be enabled. |
Function for getting the state of the specified interrupt.
- Parameters
-
[in] | mask | Interrupts to be checked. |
- Return values
-
true | The interrupt is not enabled. |
false | The interrupt is enabled. |
__STATIC_INLINE uint8_t nrf_rng_random_value_get |
( |
void |
| ) |
|
Function for getting the previously generated random value.
- Returns
- Previously generated random value.
__STATIC_INLINE void nrf_rng_shorts_disable |
( |
uint32_t |
mask | ) |
|
Function for clearing shortcuts.
- Parameters
-
[in] | mask | Mask of shortcuts. |
__STATIC_INLINE void nrf_rng_shorts_enable |
( |
uint32_t |
mask | ) |
|
Function for setting shortcuts.
- Parameters
-
[in] | mask | Mask of shortcuts. |
__STATIC_INLINE uint32_t* nrf_rng_task_address_get |
( |
nrf_rng_task_t |
rng_task | ) |
|
Function for getting the address of the specified task.
This function can be used by the PPI module.
- Parameters
-
[in] | rng_task | The specified task. |
- Returns
- Address of the specified task.
Function for triggering the specified task.
- Parameters
-
[in] | rng_task | The specified Task. |