RegisterBlock

Struct RegisterBlock 

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

Register block

Implementations§

Source§

impl RegisterBlock

Source

pub const fn sr(&self) -> &Reg<SRrs>

0x00 - status register

Source

pub const fn cr1(&self) -> &Reg<CR1rs>

0x04 - control register 1

Source

pub const fn cr2(&self) -> &Reg<CR2rs>

0x08 - control register 2

Source

pub const fn smpr1(&self) -> &Reg<SMPR1rs>

0x0c - sample time register 1

Source

pub const fn smpr2(&self) -> &Reg<SMPR2rs>

0x10 - sample time register 2

Source

pub const fn jofr(&self, n: usize) -> &Reg<JOFRrs>

0x14..0x24 - injected channel data offset register %s

`n` is the index of register in the array. `n == 0` corresponds to `JOFR1` register.
Source

pub fn jofr_iter(&self) -> impl Iterator<Item = &Reg<JOFRrs>>

Iterator for array of: 0x14..0x24 - injected channel data offset register %s

Source

pub const fn jofr1(&self) -> &Reg<JOFRrs>

0x14 - injected channel data offset register 1

Source

pub const fn jofr2(&self) -> &Reg<JOFRrs>

0x18 - injected channel data offset register 2

Source

pub const fn jofr3(&self) -> &Reg<JOFRrs>

0x1c - injected channel data offset register 3

Source

pub const fn jofr4(&self) -> &Reg<JOFRrs>

0x20 - injected channel data offset register 4

Source

pub const fn htr(&self) -> &Reg<HTRrs>

0x24 - watchdog higher threshold register

Source

pub const fn ltr(&self) -> &Reg<LTRrs>

0x28 - watchdog lower threshold register

Source

pub const fn sqr1(&self) -> &Reg<SQR1rs>

0x2c - regular sequence register 1

Source

pub const fn sqr2(&self) -> &Reg<SQR2rs>

0x30 - regular sequence register 2

Source

pub const fn sqr3(&self) -> &Reg<SQR3rs>

0x34 - regular sequence register 3

Source

pub const fn jsqr(&self) -> &Reg<JSQRrs>

0x38 - injected sequence register

Source

pub const fn jdr(&self, n: usize) -> &Reg<JDRrs>

0x3c..0x4c - injected data register x

`n` is the index of register in the array. `n == 0` corresponds to `JDR1` register.
Source

pub fn jdr_iter(&self) -> impl Iterator<Item = &Reg<JDRrs>>

Iterator for array of: 0x3c..0x4c - injected data register x

Source

pub const fn jdr1(&self) -> &Reg<JDRrs>

0x3c - injected data register x

Source

pub const fn jdr2(&self) -> &Reg<JDRrs>

0x40 - injected data register x

Source

pub const fn jdr3(&self) -> &Reg<JDRrs>

0x44 - injected data register x

Source

pub const fn jdr4(&self) -> &Reg<JDRrs>

0x48 - injected data register x

Source

pub const fn dr(&self) -> &Reg<DRrs>

0x4c - regular data register

Trait Implementations§

Source§

impl Debug for RegisterBlock

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.