pub struct Rng {
pub regs: RNG,
}
Expand description
Represents a RNG peripheral.
Fields§
§regs: RNG
Implementations§
Source§impl Rng
impl Rng
Sourcepub fn new(regs: RNG) -> Self
pub fn new(regs: RNG) -> Self
Initialize a RNG peripheral, including configuration register writes, and enabling and resetting its RCC peripheral clock.
Sourcepub fn reading_ready(&mut self) -> bool
pub fn reading_ready(&mut self) -> bool
Return true if a reading is available.
Sourcepub fn enable_interrupt(&mut self)
pub fn enable_interrupt(&mut self)
Enable an interrupt. An interrupt isgenerated when a random number is ready or when an error occurs. Therefore at each interrupt, check that: No error occured (SEIS and CEIS bits should be set to 0 in the RNG_SR register. A random number is ready. The DRDY bit must be set to 1 in the RNG_SR register.
Auto Trait Implementations§
impl Freeze for Rng
impl RefUnwindSafe for Rng
impl Send for Rng
impl !Sync for Rng
impl Unpin for Rng
impl UnwindSafe for Rng
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more