Hardware access layer (HAL) for managing the Random Number Generator (RNG) peripheral. More...
Enumerations | |
enum | nrf_rng_task_t { NRF_RNG_TASK_START = offsetof(NRF_RNG_Type, TASKS_START) , NRF_RNG_TASK_STOP = offsetof(NRF_RNG_Type, TASKS_STOP) } |
RNG tasks. More... | |
enum | nrf_rng_event_t { NRF_RNG_EVENT_VALRDY = offsetof(NRF_RNG_Type, EVENTS_VALRDY) } |
RNG events. More... | |
enum | nrf_rng_int_mask_t { NRF_RNG_INT_VALRDY_MASK = RNG_INTENSET_VALRDY_Msk } |
RNG interrupts. More... | |
enum | nrf_rng_short_mask_t { NRF_RNG_SHORT_VALRDY_STOP_MASK = RNG_SHORTS_VALRDY_STOP_Msk } |
Types of RNG shortcuts. More... | |
Functions | |
NRF_STATIC_INLINE void | nrf_rng_int_enable (NRF_RNG_Type *p_reg, uint32_t mask) |
Function for enabling interrupts. | |
NRF_STATIC_INLINE void | nrf_rng_int_disable (NRF_RNG_Type *p_reg, uint32_t mask) |
Function for disabling interrupts. | |
NRF_STATIC_INLINE uint32_t | nrf_rng_int_enable_check (NRF_RNG_Type const *p_reg, uint32_t mask) |
Function for checking if the specified interrupts are enabled. | |
NRF_STATIC_INLINE uint32_t | nrf_rng_task_address_get (NRF_RNG_Type const *p_reg, nrf_rng_task_t rng_task) |
Function for getting the address of the specified task. | |
NRF_STATIC_INLINE void | nrf_rng_task_trigger (NRF_RNG_Type *p_reg, nrf_rng_task_t rng_task) |
Function for triggering the specified task. | |
NRF_STATIC_INLINE uint32_t | nrf_rng_event_address_get (NRF_RNG_Type const *p_reg, nrf_rng_event_t rng_event) |
Function for getting address of the specified event. | |
NRF_STATIC_INLINE void | nrf_rng_event_clear (NRF_RNG_Type *p_reg, nrf_rng_event_t rng_event) |
Function for clearing the specified event. | |
NRF_STATIC_INLINE bool | nrf_rng_event_check (NRF_RNG_Type const *p_reg, nrf_rng_event_t rng_event) |
Function for retrieving the state of the specified event. | |
NRF_STATIC_INLINE void | nrf_rng_shorts_enable (NRF_RNG_Type *p_reg, uint32_t mask) |
Function for setting shortcuts. | |
NRF_STATIC_INLINE void | nrf_rng_shorts_disable (NRF_RNG_Type *p_reg, uint32_t mask) |
Function for clearing shortcuts. | |
NRF_STATIC_INLINE uint8_t | nrf_rng_random_value_get (NRF_RNG_Type const *p_reg) |
Function for getting the previously generated random value. | |
NRF_STATIC_INLINE void | nrf_rng_error_correction_enable (NRF_RNG_Type *p_reg) |
Function for enabling digital error correction. | |
NRF_STATIC_INLINE void | nrf_rng_error_correction_disable (NRF_RNG_Type *p_reg) |
Function for disabling digital error correction. | |
NRF_STATIC_INLINE void | nrf_rng_subscribe_set (NRF_RNG_Type *p_reg, nrf_rng_task_t task, uint8_t channel) |
Function for setting the subscribe configuration for a given RNG task. | |
NRF_STATIC_INLINE void | nrf_rng_subscribe_clear (NRF_RNG_Type *p_reg, nrf_rng_task_t task) |
Function for clearing the subscribe configuration for a given RNG task. | |
NRF_STATIC_INLINE void | nrf_rng_publish_set (NRF_RNG_Type *p_reg, nrf_rng_event_t event, uint8_t channel) |
Function for setting the publish configuration for a given RNG event. | |
NRF_STATIC_INLINE void | nrf_rng_publish_clear (NRF_RNG_Type *p_reg, nrf_rng_event_t event) |
Function for clearing the publish configuration for a given RNG event. | |
Hardware access layer (HAL) for managing the Random Number Generator (RNG) peripheral.
enum nrf_rng_event_t |
enum nrf_rng_int_mask_t |
enum nrf_rng_short_mask_t |
enum nrf_rng_task_t |
NRF_STATIC_INLINE void nrf_rng_error_correction_disable | ( | NRF_RNG_Type * | p_reg | ) |
Function for disabling digital error correction.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_rng_error_correction_enable | ( | NRF_RNG_Type * | p_reg | ) |
Function for enabling digital error correction.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE uint32_t nrf_rng_event_address_get | ( | NRF_RNG_Type const * | p_reg, |
nrf_rng_event_t | rng_event | ||
) |
Function for getting address of the specified event.
This function can be used by the PPI module.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | rng_event | The specified event. |
NRF_STATIC_INLINE bool nrf_rng_event_check | ( | NRF_RNG_Type const * | p_reg, |
nrf_rng_event_t | rng_event | ||
) |
Function for retrieving the state of the specified event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | rng_event | The specified event. |
true | The event is set. |
false | The event is not set. |
NRF_STATIC_INLINE void nrf_rng_event_clear | ( | NRF_RNG_Type * | p_reg, |
nrf_rng_event_t | rng_event | ||
) |
Function for clearing the specified event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | rng_event | The specified event. |
NRF_STATIC_INLINE void nrf_rng_int_disable | ( | NRF_RNG_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for disabling interrupts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be disabled. Use nrf_rng_int_mask_t values for bit masking. |
NRF_STATIC_INLINE void nrf_rng_int_enable | ( | NRF_RNG_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for enabling interrupts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be enabled. Use nrf_rng_int_mask_t values for bit masking. |
NRF_STATIC_INLINE uint32_t nrf_rng_int_enable_check | ( | NRF_RNG_Type const * | p_reg, |
uint32_t | mask | ||
) |
Function for checking if the specified interrupts are enabled.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be checked. Use nrf_rng_int_mask_t values for bit masking. |
NRF_STATIC_INLINE void nrf_rng_publish_clear | ( | NRF_RNG_Type * | p_reg, |
nrf_rng_event_t | event | ||
) |
Function for clearing the publish configuration for a given RNG event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event for which to clear the configuration. |
NRF_STATIC_INLINE void nrf_rng_publish_set | ( | NRF_RNG_Type * | p_reg, |
nrf_rng_event_t | event, | ||
uint8_t | channel | ||
) |
Function for setting the publish configuration for a given RNG event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event for which to set the configuration. |
[in] | channel | Channel through which to publish the event. |
NRF_STATIC_INLINE uint8_t nrf_rng_random_value_get | ( | NRF_RNG_Type const * | p_reg | ) |
Function for getting the previously generated random value.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_rng_shorts_disable | ( | NRF_RNG_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for clearing shortcuts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of shortcuts. |
NRF_STATIC_INLINE void nrf_rng_shorts_enable | ( | NRF_RNG_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for setting shortcuts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of shortcuts. |
NRF_STATIC_INLINE void nrf_rng_subscribe_clear | ( | NRF_RNG_Type * | p_reg, |
nrf_rng_task_t | task | ||
) |
Function for clearing the subscribe configuration for a given RNG task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | Task for which to clear the configuration. |
NRF_STATIC_INLINE void nrf_rng_subscribe_set | ( | NRF_RNG_Type * | p_reg, |
nrf_rng_task_t | task, | ||
uint8_t | channel | ||
) |
Function for setting the subscribe configuration for a given RNG task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | Task for which to set the configuration. |
[in] | channel | Channel through which to subscribe events. |
NRF_STATIC_INLINE uint32_t nrf_rng_task_address_get | ( | NRF_RNG_Type const * | p_reg, |
nrf_rng_task_t | rng_task | ||
) |
Function for getting the address of the specified task.
This function can be used by the PPI module.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | rng_task | The specified task. |
NRF_STATIC_INLINE void nrf_rng_task_trigger | ( | NRF_RNG_Type * | p_reg, |
nrf_rng_task_t | rng_task | ||
) |
Function for triggering the specified task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | rng_task | The specified Task. |