26#ifdef LIBOPENCM3_RNG_H
28#ifndef LIBOPENCM3_RNG_V1_H
29#define LIBOPENCM3_RNG_V1_H
39#define RNG_CR MMIO32(RNG_BASE + 0x00)
42#define RNG_SR MMIO32(RNG_BASE + 0x04)
45#define RNG_DR MMIO32(RNG_BASE + 0x08)
50#define RNG_CR_RNGEN (1 << 2)
53#define RNG_CR_IE (1 << 3)
58#define RNG_SR_DRDY (1 << 0)
61#define RNG_SR_CECS (1 << 1)
64#define RNG_SR_SECS (1 << 2)
67#define RNG_SR_CEIS (1 << 5)
70#define RNG_SR_SEIS (1 << 6)
90#warning "rng_common_v1.h should not be included explicitly, only via rng.h"
void rng_enable(void)
Enable the Random Number Generator peripheral.
void rng_disable(void)
Disable the Random Number Generator peripheral.
void rng_interrupt_enable(void)
Enable the Random Number Generator error interrupt.
bool rng_get_random(uint32_t *rand_nr)
Randomizes a number (non-blocking).
uint32_t rng_get_random_blocking(void)
Get a random number and block until it works.
void rng_interrupt_disable(void)
Disable the Random Number Generator error interrupt.