Struct stm32_eth::EthernetDMA
source · [−]pub struct EthernetDMA<'rx, 'tx> { /* private fields */ }
Expand description
Ethernet DMA.
Implementations
sourceimpl<'rx, 'tx> EthernetDMA<'rx, 'tx>
impl<'rx, 'tx> EthernetDMA<'rx, 'tx>
sourcepub fn enable_interrupt(&self)
pub fn enable_interrupt(&self)
Enable RX and TX interrupts
In your handler you must call
eth_interrupt_handler()
to
clear interrupt pending bits. Otherwise the interrupt will
reoccur immediately.
sourcepub fn interrupt_handler(&self)
pub fn interrupt_handler(&self)
Calls eth_interrupt_handler()
sourcepub fn rx_is_running(&self) -> bool
pub fn rx_is_running(&self) -> bool
Is Rx DMA currently running?
It stops if the ring is full. Call recv_next()
to free an
entry and to demand poll from the hardware.
sourcepub fn recv_next(&mut self) -> Result<RxPacket<'_>, RxError>
pub fn recv_next(&mut self) -> Result<RxPacket<'_>, RxError>
Receive the next packet (if any is ready), or return None
immediately.
sourcepub fn tx_is_running(&self) -> bool
pub fn tx_is_running(&self) -> bool
Is Tx DMA currently running?
Trait Implementations
sourceimpl<'a, 'rx, 'tx, 'b> Device<'a> for &'b mut EthernetDMA<'rx, 'tx>
impl<'a, 'rx, 'tx, 'b> Device<'a> for &'b mut EthernetDMA<'rx, 'tx>
Use this Ethernet driver with smoltcp
type RxToken = EthRxToken<'a>
type TxToken = EthTxToken<'a>
sourcefn capabilities(&self) -> DeviceCapabilities
fn capabilities(&self) -> DeviceCapabilities
Get a description of device capabilities.
Auto Trait Implementations
impl<'rx, 'tx> RefUnwindSafe for EthernetDMA<'rx, 'tx>
impl<'rx, 'tx> Send for EthernetDMA<'rx, 'tx>
impl<'rx, 'tx> !Sync for EthernetDMA<'rx, 'tx>
impl<'rx, 'tx> Unpin for EthernetDMA<'rx, 'tx>
impl<'rx, 'tx> !UnwindSafe for EthernetDMA<'rx, 'tx>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more