Struct RegisterBlock

Source
#[repr(C)]
pub struct RegisterBlock { /* private fields */ }
Expand description

Register block

Implementations§

Source§

impl RegisterBlock

Source

pub const fn mcr(&self) -> &MCR

0x00 - master control register

Source

pub const fn msr(&self) -> &MSR

0x04 - master status register

Source

pub const fn tsr(&self) -> &TSR

0x08 - transmit status register

Source

pub const fn rfr(&self, n: usize) -> &RFR

0x0c..0x14 - receive FIFO %s register

Source

pub fn rfr_iter(&self) -> impl Iterator<Item = &RFR>

Iterator for array of: 0x0c..0x14 - receive FIFO %s register

Source

pub const fn rf0r(&self) -> &RFR

0x0c - receive FIFO 0 register

Source

pub const fn rf1r(&self) -> &RFR

0x10 - receive FIFO 1 register

Source

pub const fn ier(&self) -> &IER

0x14 - interrupt enable register

Source

pub const fn esr(&self) -> &ESR

0x18 - interrupt enable register

Source

pub const fn btr(&self) -> &BTR

0x1c - bit timing register

Source

pub const fn tx(&self, n: usize) -> &TX

0x180..0x1b0 - CAN Transmit cluster

Source

pub fn tx_iter(&self) -> impl Iterator<Item = &TX>

Iterator for array of: 0x180..0x1b0 - CAN Transmit cluster

Source

pub const fn rx(&self, n: usize) -> &RX

0x1b0..0x1d0 - CAN Receive cluster

Source

pub fn rx_iter(&self) -> impl Iterator<Item = &RX>

Iterator for array of: 0x1b0..0x1d0 - CAN Receive cluster

Source

pub const fn fmr(&self) -> &FMR

0x200 - filter master register

Source

pub const fn fm1r(&self) -> &FM1R

0x204 - filter mode register

Source

pub const fn fs1r(&self) -> &FS1R

0x20c - filter scale register

Source

pub const fn ffa1r(&self) -> &FFA1R

0x214 - filter FIFO assignment register

Source

pub const fn fa1r(&self) -> &FA1R

0x21c - filter activation register

Source

pub const fn fb(&self, n: usize) -> &FB

0x240..0x320 - CAN Filter Bank cluster

Source

pub fn fb_iter(&self) -> impl Iterator<Item = &FB>

Iterator for array of: 0x240..0x320 - CAN Filter Bank cluster

Trait Implementations§

Source§

impl Debug for RegisterBlock

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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<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.