pub struct LiteEth<'a, R>where
R: LiteXSoCRegisterConfiguration,{ /* private fields */ }
Implementations§
Source§impl<'a, R> LiteEth<'a, R>where
R: LiteXSoCRegisterConfiguration,
impl<'a, R> LiteEth<'a, R>where
R: LiteXSoCRegisterConfiguration,
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, rx_buffer: &'static mut [u8], ) -> LiteEth<'a, R>
pub fn set_client(&self, client: &'a dyn LiteEthClient)
pub fn initialize(&self)
pub fn return_rx_buffer(&self, rx_buffer: &'static mut [u8])
Sourcepub fn transmit(
&self,
packet: &'static mut [u8],
len: usize,
) -> Result<(), (Result<(), ErrorCode>, &'static mut [u8])>
pub fn transmit( &self, packet: &'static mut [u8], len: usize, ) -> Result<(), (Result<(), ErrorCode>, &'static mut [u8])>
Transmit an ethernet packet 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 packet.
pub fn service_interrupt(&self)
Auto Trait Implementations§
impl<'a, R> !Freeze for LiteEth<'a, R>
impl<'a, R> !RefUnwindSafe for LiteEth<'a, R>
impl<'a, R> !Send for LiteEth<'a, R>
impl<'a, R> !Sync for LiteEth<'a, R>
impl<'a, R> Unpin for LiteEth<'a, R>
impl<'a, R> !UnwindSafe for LiteEth<'a, 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