embassy_stm32_plus/traits/eth/
mod.rs1use embassy_stm32::eth::PHY;
2use embassy_stm32::peripherals::ETH;
3use crate::builder::eth::{phy, pins, EthBuilder};
4use crate::builder::eth::phy::EthPhy;
5use crate::builder::eth::pins::EthPins;
6
7pub trait EthTrait<const TX: usize, const RX: usize, P: PHY> {
9 fn builder(self, pins: pins::EthPins, phy: phy::EthPhy<TX, RX, P>) -> EthBuilder<TX, RX, P>;
11}
12
13impl<const TX: usize, const RX: usize, P: PHY> EthTrait<TX, RX, P> for ETH {
15 #[inline]
16 fn builder(self, pins: EthPins, phy: EthPhy<TX, RX, P>) -> EthBuilder<TX, RX, P> {
17 EthBuilder::new(self, pins, phy)
18 }
19}