pub struct EthernetDevice<M: MacPeripheral> { /* private fields */ }
Implementations§
Source§impl<M: MacPeripheral> EthernetDevice<M>
impl<M: MacPeripheral> EthernetDevice<M>
pub fn init(&self, mac_address: [u8; 6])
pub fn split(&mut self) -> (EthernetTx<M>, EthernetRx<M>)
pub fn link_speed(&self) -> LinkSpeed
pub fn full_duplex(&self) -> bool
pub fn send<R, F>(&mut self, len: usize, f: F) -> Result<R, TxError>
pub async fn receive<R, F>(&mut self, f: F) -> Result<R, RxError>
pub fn link_state(&mut self) -> LinkState
pub fn mac_address(&self) -> [u8; 6]
Trait Implementations§
Source§impl<M: MacPeripheral> Driver for EthernetDevice<M>
impl<M: MacPeripheral> Driver for EthernetDevice<M>
Source§fn receive(
&mut self,
cx: &mut Context<'_>,
) -> Option<(Self::RxToken<'_>, Self::TxToken<'_>)>
fn receive( &mut self, cx: &mut Context<'_>, ) -> Option<(Self::RxToken<'_>, Self::TxToken<'_>)>
Construct a token pair consisting of one receive token and one transmit token. Read more
Source§fn transmit(&mut self, _cx: &mut Context<'_>) -> Option<Self::TxToken<'_>>
fn transmit(&mut self, _cx: &mut Context<'_>) -> Option<Self::TxToken<'_>>
Construct a transmit token. Read more
Source§fn capabilities(&self) -> Capabilities
fn capabilities(&self) -> Capabilities
Get a description of device capabilities.
Source§fn hardware_address(&self) -> HardwareAddress
fn hardware_address(&self) -> HardwareAddress
Get the device’s hardware address. Read more
Auto Trait Implementations§
impl<M> Freeze for EthernetDevice<M>where
M: Freeze,
impl<M> RefUnwindSafe for EthernetDevice<M>where
M: RefUnwindSafe,
impl<M> Send for EthernetDevice<M>where
M: Send,
impl<M> Sync for EthernetDevice<M>where
M: Sync,
impl<M> Unpin for EthernetDevice<M>where
M: Unpin,
impl<M> UnwindSafe for EthernetDevice<M>where
M: 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