Struct EthPins

Source
pub struct EthPins<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1> {
    pub ref_clk: REFCLK,
    pub crs: CRS,
    pub tx_en: TXEN,
    pub tx_d0: TXD0,
    pub tx_d1: TXD1,
    pub rx_d0: RXD0,
    pub rx_d1: RXD1,
}
Expand description

A struct that represents a combination of pins to be used as RMII pins for the ethernet peripheral(s)

Fields§

§ref_clk: REFCLK§crs: CRS§tx_en: TXEN§tx_d0: TXD0§tx_d1: TXD1§rx_d0: RXD0§rx_d1: RXD1

Implementations§

Source§

impl<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1> EthPins<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1>

Source

pub fn setup_pins(self)

Pin setup.

Set RMII pins to

  • Alternate function 11
  • High-speed

This function consumes the pins so that you cannot use them anywhere else by accident.

Auto Trait Implementations§

§

impl<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1> Freeze for EthPins<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1>
where REFCLK: Freeze, CRS: Freeze, TXEN: Freeze, TXD0: Freeze, TXD1: Freeze, RXD0: Freeze, RXD1: Freeze,

§

impl<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1> RefUnwindSafe for EthPins<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1>
where REFCLK: RefUnwindSafe, CRS: RefUnwindSafe, TXEN: RefUnwindSafe, TXD0: RefUnwindSafe, TXD1: RefUnwindSafe, RXD0: RefUnwindSafe, RXD1: RefUnwindSafe,

§

impl<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1> Send for EthPins<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1>
where REFCLK: Send, CRS: Send, TXEN: Send, TXD0: Send, TXD1: Send, RXD0: Send, RXD1: Send,

§

impl<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1> Sync for EthPins<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1>
where REFCLK: Sync, CRS: Sync, TXEN: Sync, TXD0: Sync, TXD1: Sync, RXD0: Sync, RXD1: Sync,

§

impl<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1> Unpin for EthPins<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1>
where REFCLK: Unpin, CRS: Unpin, TXEN: Unpin, TXD0: Unpin, TXD1: Unpin, RXD0: Unpin, RXD1: Unpin,

§

impl<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1> UnwindSafe for EthPins<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1>
where REFCLK: UnwindSafe, CRS: UnwindSafe, TXEN: UnwindSafe, TXD0: UnwindSafe, TXD1: UnwindSafe, RXD0: UnwindSafe, RXD1: UnwindSafe,

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.