Hardware abstraction layer for managing the random number generator (RNG).
More...
|
#define | NRF_RNG_TASK_SET (1UL) |
|
#define | NRF_RNG_EVENT_CLEAR (0UL) |
|
Hardware abstraction layer for managing the random number generator (RNG).
RNG events.
Enumerator |
---|
NRF_RNG_EVENTS_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_SHORTS_VALRDY_STOP_MASK |
Mask for setting shortcut between EVENT_VALRDY and TASK_STOP.
|
RNG tasks.
Enumerator |
---|
NRF_RNG_TASKS_START |
Start the random number generator.
|
NRF_RNG_TASKS_STOP |
Stop the random number generator.
|
__STATIC_INLINE uint32_t* nrf_rng_event_address_get |
( |
nrf_rng_events_t |
rng_event | ) |
|
Function for getting address of a specific event.
This function can be used by the PPI module.
- Parameters
-
Function for clearing a specific event.
- Parameters
-
Function for getting the state of a specific event.
- Parameters
-
- Return values
-
true | If the event is not set. |
false | If the event is set. |
__STATIC_INLINE void nrf_rng_int_disable |
( |
uint32_t |
rng_int_mask | ) |
|
Function for disabling interrupts.
- Parameters
-
[in] | rng_int_mask | Mask of interrupts. |
__STATIC_INLINE void nrf_rng_int_enable |
( |
uint32_t |
rng_int_mask | ) |
|
Function for enabling interrupts.
- Parameters
-
[in] | rng_int_mask | Mask of interrupts. |
Function for getting the state of a specific interrupt.
- Parameters
-
[in] | rng_int_mask | Interrupt. |
- Return values
-
true | If the interrupt is not enabled. |
false | If 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_clear |
( |
uint32_t |
rng_short_mask | ) |
|
Function for clearing shortcuts.
- Parameters
-
[in] | rng_short_mask | Mask of shortcuts. |
__STATIC_INLINE void nrf_rng_shorts_set |
( |
uint32_t |
rng_short_mask | ) |
|
Function for setting shortcuts.
- Parameters
-
[in] | rng_short_mask | Mask of shortcuts. |
__STATIC_INLINE uint32_t* nrf_rng_task_address_get |
( |
nrf_rng_tasks_t |
rng_task | ) |
|
Function for getting the address of a specific task.
This function can be used by the PPI module.
- Parameters
-
Function for setting a specific task.
- Parameters
-