Configuration

Struct Configuration 

Source
pub struct Configuration {
Show 20 fields pub mprxe: bool, pub mptxe: bool, pub big_endian: bool, pub hbrxe: bool, pub hbtxe: bool, pub dyn_fifo_sizing: FifoSizing, pub soft_connect: bool, pub utmi_data_width: UtmiDataWidth, pub tx_fifo_sizes: [u16; 16], pub rx_fifo_sizes: [u16; 16], pub rx_endpoints: u8, pub tx_endpoints: u8, pub dma_channels: u8, pub ram_bits: u8, pub wtcon: u8, pub wtid: u8, pub vplen: u8, pub hs_eof1: u8, pub fs_eof1: u8, pub ls_eof1: u8, /* private fields */
}
Expand description

Holds the decoded configuration of the MUSB IP core.

This structure is populated by reading hardware registers.

Fields§

§mprxe: bool§mptxe: bool§big_endian: bool§hbrxe: bool§hbtxe: bool§dyn_fifo_sizing: FifoSizing§soft_connect: bool§utmi_data_width: UtmiDataWidth§tx_fifo_sizes: [u16; 16]§rx_fifo_sizes: [u16; 16]§rx_endpoints: u8§tx_endpoints: u8§dma_channels: u8§ram_bits: u8§wtcon: u8§wtid: u8§vplen: u8§hs_eof1: u8§fs_eof1: u8§ls_eof1: u8

Implementations§

Source§

impl Configuration

Source

pub fn read<T: MusbInstance>() -> Self

Reads the MUSB IP configuration by accessing its hardware registers.

This function uses high-level field accessor methods and checks for all-zero register values to detect potentially masked hardware features.

Source

pub fn print_defmt(&self)

Prints the decoded configuration information using defmt.

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.