pub struct ADIN1110<P: Adin1110Protocol> { /* private fields */ }Expand description
ADIN1110 embassy-net driver
Implementations§
Source§impl<P: Adin1110Protocol> ADIN1110<P>
impl<P: Adin1110Protocol> ADIN1110<P>
Sourcepub async fn write_reg(
&mut self,
reg: sr,
value: u32,
) -> AEResult<(), P::SpiError>
pub async fn write_reg( &mut self, reg: sr, value: u32, ) -> AEResult<(), P::SpiError>
Write a SPI register
Sourcepub async fn read_fifo(
&mut self,
frame: &mut [u8],
) -> AEResult<usize, P::SpiError>
pub async fn read_fifo( &mut self, frame: &mut [u8], ) -> AEResult<usize, P::SpiError>
Read out fifo ethernet packet memory received via the wire.
Source§impl<SPI: SpiDevice> ADIN1110<GenericSpi<SPI>>
impl<SPI: SpiDevice> ADIN1110<GenericSpi<SPI>>
Sourcepub fn new_generic(spi: SPI, spi_crc: bool, append_fcs_on_tx: bool) -> Self
pub fn new_generic(spi: SPI, spi_crc: bool, append_fcs_on_tx: bool) -> Self
Create a driver instance using the Generic SPI protocol.
Trait Implementations§
Source§impl<P: Adin1110Protocol> MdioBus for ADIN1110<P>
impl<P: Adin1110Protocol> MdioBus for ADIN1110<P>
Source§async fn read_cl22(&mut self, phy_id: u8, reg: u8) -> Result<u16, Self::Error>
async fn read_cl22(&mut self, phy_id: u8, reg: u8) -> Result<u16, Self::Error>
Read from the PHY Registers as Clause 22.
Source§async fn read_cl45(
&mut self,
phy_id: u8,
regc45: (u8, u16),
) -> Result<u16, Self::Error>
async fn read_cl45( &mut self, phy_id: u8, regc45: (u8, u16), ) -> Result<u16, Self::Error>
Read from the PHY Registers as Clause 45.
A clause 45 access is two MDIO transactions: an address phase and the
read itself. They must be queued in separate MDIOACC registers, the
chip executes them in order. Putting both in MDIOACC_0 makes the
second overwrite the first and the read returns zero.
Source§async fn write_cl22(
&mut self,
phy_id: u8,
reg: u8,
val: u16,
) -> Result<(), Self::Error>
async fn write_cl22( &mut self, phy_id: u8, reg: u8, val: u16, ) -> Result<(), Self::Error>
Write to the PHY Registers as Clause 22.
Auto Trait Implementations§
impl<P> Freeze for ADIN1110<P>where
P: Freeze,
impl<P> RefUnwindSafe for ADIN1110<P>where
P: RefUnwindSafe,
impl<P> Send for ADIN1110<P>where
P: Send,
impl<P> Sync for ADIN1110<P>where
P: Sync,
impl<P> Unpin for ADIN1110<P>where
P: Unpin,
impl<P> UnsafeUnpin for ADIN1110<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for ADIN1110<P>where
P: 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