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.