pub struct LiteEth<'a, const MAX_TX_SLOTS: usize, R: LiteXSoCRegisterConfiguration> { /* private fields */ }
Implementations§
Source§impl<const MAX_TX_SLOTS: usize, R: LiteXSoCRegisterConfiguration> LiteEth<'_, MAX_TX_SLOTS, R>
impl<const MAX_TX_SLOTS: usize, R: LiteXSoCRegisterConfiguration> LiteEth<'_, MAX_TX_SLOTS, R>
pub unsafe fn new( mac_regs: StaticRef<LiteEthMacRegisters<R>>, mac_memory_base: usize, mac_memory_len: usize, slot_size: usize, rx_slots: usize, tx_slots: usize, ) -> Self
pub fn initialize(&self)
pub fn service_interrupt(&self)
Trait Implementations§
Source§impl<'a, const MAX_TX_SLOTS: usize, R: LiteXSoCRegisterConfiguration> EthernetAdapterDatapath<'a> for LiteEth<'a, MAX_TX_SLOTS, R>
impl<'a, const MAX_TX_SLOTS: usize, R: LiteXSoCRegisterConfiguration> EthernetAdapterDatapath<'a> for LiteEth<'a, MAX_TX_SLOTS, R>
Source§fn transmit_frame(
&self,
frame: &'static mut [u8],
len: u16,
frame_identifier: usize,
) -> Result<(), (ErrorCode, &'static mut [u8])>
fn transmit_frame( &self, frame: &'static mut [u8], len: u16, frame_identifier: usize, ) -> Result<(), (ErrorCode, &'static mut [u8])>
Transmit an Ethernet frame over the interface
For now this will only use a single slot on the interface and is
therefore blocking. A client must wait until a callback to tx_done
prior to sending a new frame.
Source§fn set_client(&self, client: &'a dyn EthernetAdapterDatapathClient)
fn set_client(&self, client: &'a dyn EthernetAdapterDatapathClient)
Set the Ethernet adapter client for this peripheral.
Source§fn enable_receive(&self)
fn enable_receive(&self)
Enable reception of Ethernet frames. Read more
Source§fn disable_receive(&self)
fn disable_receive(&self)
Disable reception of Ethernet frames. Read more
Auto Trait Implementations§
impl<'a, const MAX_TX_SLOTS: usize, R> !Freeze for LiteEth<'a, MAX_TX_SLOTS, R>
impl<'a, const MAX_TX_SLOTS: usize, R> !RefUnwindSafe for LiteEth<'a, MAX_TX_SLOTS, R>
impl<'a, const MAX_TX_SLOTS: usize, R> !Send for LiteEth<'a, MAX_TX_SLOTS, R>
impl<'a, const MAX_TX_SLOTS: usize, R> !Sync for LiteEth<'a, MAX_TX_SLOTS, R>
impl<'a, const MAX_TX_SLOTS: usize, R> Unpin for LiteEth<'a, MAX_TX_SLOTS, R>
impl<'a, const MAX_TX_SLOTS: usize, R> !UnwindSafe for LiteEth<'a, MAX_TX_SLOTS, R>
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