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>where
REFCLK: RmiiRefClk + AlternateVeryHighSpeed,
CRS: RmiiCrsDv + AlternateVeryHighSpeed,
TXEN: RmiiTxEN + AlternateVeryHighSpeed,
TXD0: RmiiTxD0 + AlternateVeryHighSpeed,
TXD1: RmiiTxD1 + AlternateVeryHighSpeed,
RXD0: RmiiRxD0 + AlternateVeryHighSpeed,
RXD1: RmiiRxD1 + AlternateVeryHighSpeed,
impl<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1> EthPins<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1>where
REFCLK: RmiiRefClk + AlternateVeryHighSpeed,
CRS: RmiiCrsDv + AlternateVeryHighSpeed,
TXEN: RmiiTxEN + AlternateVeryHighSpeed,
TXD0: RmiiTxD0 + AlternateVeryHighSpeed,
TXD1: RmiiTxD1 + AlternateVeryHighSpeed,
RXD0: RmiiRxD0 + AlternateVeryHighSpeed,
RXD1: RmiiRxD1 + AlternateVeryHighSpeed,
Sourcepub fn setup_pins(self)
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>
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>
impl<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1> Sync for EthPins<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1>
impl<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1> Unpin for EthPins<REFCLK, CRS, TXEN, TXD0, TXD1, RXD0, RXD1>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more