Trng

Struct Trng 

Source
pub struct Trng { /* private fields */ }
Expand description

LPC-Next0 RNG

Implementations§

Source§

impl Trng

Source

pub const PTR: *const RegisterBlock = {0x40138000 as *const trng::RegisterBlock}

Pointer to the register block

Source

pub const fn ptr() -> *const RegisterBlock

Return the pointer to the register block

Source

pub unsafe fn steal() -> Self

Steal an instance of this peripheral

§Safety

Ensure that the new instance of the peripheral cannot be used in a way that may race with any existing instances, for example by only accessing read-only or write-only registers, or by consuming the original peripheral and using critical sections to coordinate access between multiple new instances.

Additionally, other software such as HALs may rely on only one peripheral instance existing to ensure memory safety; ensure no stolen instances are passed to such software.

Methods from Deref<Target = RegisterBlock>§

Source

pub fn mctl(&self) -> &Mctl

0x00 - Miscellaneous Control Register

Source

pub fn scmisc(&self) -> &Scmisc

0x04 - Statistical Check Miscellaneous Register

Source

pub fn pkrrng(&self) -> &Pkrrng

0x08 - Poker Range Register

Source

pub fn pkrsq(&self) -> &Pkrsq

0x0c - Poker Square Calculation Result Register

Source

pub fn pkrmax(&self) -> &Pkrmax

0x0c - Poker Maximum Limit Register

Source

pub fn sdctl(&self) -> &Sdctl

0x10 - Seed Control Register

Source

pub fn totsam(&self) -> &Totsam

0x14 - Total Samples Register

Source

pub fn sblim(&self) -> &Sblim

0x14 - Sparse Bit Limit Register

Source

pub fn frqmin(&self) -> &Frqmin

0x18 - Frequency Count Minimum Limit Register

Source

pub fn frqmax(&self) -> &Frqmax

0x1c - Frequency Count Maximum Limit Register

Source

pub fn frqcnt(&self) -> &Frqcnt

0x1c - Frequency Count Register

Source

pub fn scml(&self) -> &Scml

0x20 - Statistical Check Monobit Limit Register

Source

pub fn scmc(&self) -> &Scmc

0x20 - Statistical Check Monobit Count Register

Source

pub fn scr1l(&self) -> &Scr1l

0x24 - Statistical Check Run Length 1 Limit Register

Source

pub fn scr1c(&self) -> &Scr1c

0x24 - Statistical Check Run Length 1 Count Register

Source

pub fn scr2l(&self) -> &Scr2l

0x28 - Statistical Check Run Length 2 Limit Register

Source

pub fn scr2c(&self) -> &Scr2c

0x28 - Statistical Check Run Length 2 Count Register

Source

pub fn scr3l(&self) -> &Scr3l

0x2c - Statistical Check Run Length 3 Limit Register

Source

pub fn scr3c(&self) -> &Scr3c

0x2c - Statistical Check Run Length 3 Count Register

Source

pub fn scr4l(&self) -> &Scr4l

0x30 - Statistical Check Run Length 4 Limit Register

Source

pub fn scr4c(&self) -> &Scr4c

0x30 - Statistical Check Run Length 4 Count Register

Source

pub fn scr5l(&self) -> &Scr5l

0x34 - Statistical Check Run Length 5 Limit Register

Source

pub fn scr5c(&self) -> &Scr5c

0x34 - Statistical Check Run Length 5 Count Register

Source

pub fn scr6pl(&self) -> &Scr6pl

0x38 - Statistical Check Run Length 6+ Limit Register

Source

pub fn scr6pc(&self) -> &Scr6pc

0x38 - Statistical Check Run Length 6+ Count Register

Source

pub fn status(&self) -> &Status

0x3c - Status Register

Source

pub fn ent(&self, n: usize) -> &Ent

0x40..0x80 - Entropy Read Register

Source

pub fn ent_iter(&self) -> impl Iterator<Item = &Ent>

Iterator for array of: 0x40..0x80 - Entropy Read Register

Source

pub fn pkrcnt10(&self) -> &Pkrcnt10

0x80 - Statistical Check Poker Count 1 and 0 Register

Source

pub fn pkrcnt32(&self) -> &Pkrcnt32

0x84 - Statistical Check Poker Count 3 and 2 Register

Source

pub fn pkrcnt54(&self) -> &Pkrcnt54

0x88 - Statistical Check Poker Count 5 and 4 Register

Source

pub fn pkrcnt76(&self) -> &Pkrcnt76

0x8c - Statistical Check Poker Count 7 and 6 Register

Source

pub fn pkrcnt98(&self) -> &Pkrcnt98

0x90 - Statistical Check Poker Count 9 and 8 Register

Source

pub fn pkrcntba(&self) -> &Pkrcntba

0x94 - Statistical Check Poker Count B and A Register

Source

pub fn pkrcntdc(&self) -> &Pkrcntdc

0x98 - Statistical Check Poker Count D and C Register

Source

pub fn pkrcntfe(&self) -> &Pkrcntfe

0x9c - Statistical Check Poker Count F and E Register

Source

pub fn sec_cfg(&self) -> &SecCfg

0xa0 - Security Configuration Register

Source

pub fn int_ctrl(&self) -> &IntCtrl

0xa4 - Interrupt Control Register

Source

pub fn int_mask(&self) -> &IntMask

0xa8 - Mask Register

Source

pub fn int_status(&self) -> &IntStatus

0xac - Interrupt Status Register

Source

pub fn vid1(&self) -> &Vid1

0xf0 - Version ID Register (MS)

Source

pub fn vid2(&self) -> &Vid2

0xf4 - Version ID Register (LS)

Trait Implementations§

Source§

impl Debug for Trng

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for Trng

Source§

type Target = RegisterBlock

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Send for Trng

Auto Trait Implementations§

§

impl Freeze for Trng

§

impl RefUnwindSafe for Trng

§

impl !Sync for Trng

§

impl Unpin for Trng

§

impl UnwindSafe for Trng

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.