embassy-usb-synopsys-otg

Crates

git

Versions

default

Flavors

embassy_usb_synopsys_otg

Struct OtgInstance

Source
pub struct OtgInstance<'d, const MAX_EP_COUNT: usize> {
    pub regs: Otg,
    pub state: &'d State<MAX_EP_COUNT>,
    pub fifo_depth_words: u16,
    pub endpoint_count: usize,
    pub phy_type: PhyType,
    pub extra_rx_fifo_words: u16,
    pub quirk_setup_late_cnak: bool,
    pub calculate_trdt_fn: fn(speed: Dspd) -> u8,
}
Expand description

Hardware-dependent USB IP configuration.

Fields§

§regs: Otg

The USB peripheral.

§state: &'d State<MAX_EP_COUNT>

The USB state.

§fifo_depth_words: u16

FIFO depth in words.

§endpoint_count: usize

Number of used endpoints.

§phy_type: PhyType

The PHY type.

§extra_rx_fifo_words: u16

Extra RX FIFO words needed by some implementations.

§quirk_setup_late_cnak: bool

Whether to set up late cnak

§calculate_trdt_fn: fn(speed: Dspd) -> u8

Function to calculate TRDT value based on some internal clock speed.

Auto Trait Implementations§

§

impl<'d, const MAX_EP_COUNT: usize> Freeze for OtgInstance<'d, MAX_EP_COUNT>

§

impl<'d, const MAX_EP_COUNT: usize> !RefUnwindSafe for OtgInstance<'d, MAX_EP_COUNT>

§

impl<'d, const MAX_EP_COUNT: usize> Send for OtgInstance<'d, MAX_EP_COUNT>

§

impl<'d, const MAX_EP_COUNT: usize> Sync for OtgInstance<'d, MAX_EP_COUNT>

§

impl<'d, const MAX_EP_COUNT: usize> Unpin for OtgInstance<'d, MAX_EP_COUNT>

§

impl<'d, const MAX_EP_COUNT: usize> !UnwindSafe for OtgInstance<'d, MAX_EP_COUNT>

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.