pub struct E1000Device<'a, K: KernelFunc> { /* private fields */ }Expand description
E1000Device 网卡驱动的主要结构体
Implementations§
Source§impl<'a, K: KernelFunc> E1000Device<'a, K>
impl<'a, K: KernelFunc> E1000Device<'a, K>
Sourcepub fn new(kfn: K, mapped_regs: usize) -> Result<Self, i32>
pub fn new(kfn: K, mapped_regs: usize) -> Result<Self, i32>
New an e1000 device by Allocating memory
Sourcepub fn e1000_init(&mut self)
pub fn e1000_init(&mut self)
Initialize e1000 driver
mapped_regs is the memory address at which the e1000’s registers are mapped.
Sourcepub fn e1000_transmit(&mut self, packet: &[u8]) -> i32
pub fn e1000_transmit(&mut self, packet: &[u8]) -> i32
Transmitting network packets
Sourcepub fn e1000_irq_disable(&mut self)
pub fn e1000_irq_disable(&mut self)
Clear Interrupt
Sourcepub fn e1000_irq_enable(&mut self)
pub fn e1000_irq_enable(&mut self)
Enable Interrupts
Sourcepub fn e1000_write_flush(&mut self)
pub fn e1000_write_flush(&mut self)
flush e1000 status
Sourcepub fn e1000_cause_lsc_int(&mut self)
pub fn e1000_cause_lsc_int(&mut self)
Cause a link status change interrupt
Sourcepub fn e1000_intr(&mut self) -> u32
pub fn e1000_intr(&mut self) -> u32
To handle e1000 interrupt
Auto Trait Implementations§
impl<'a, K> Freeze for E1000Device<'a, K>where
K: Freeze,
impl<'a, K> RefUnwindSafe for E1000Device<'a, K>where
K: RefUnwindSafe,
impl<'a, K> Send for E1000Device<'a, K>where
K: Send,
impl<'a, K> Sync for E1000Device<'a, K>where
K: Sync,
impl<'a, K> Unpin for E1000Device<'a, K>where
K: Unpin,
impl<'a, K> !UnwindSafe for E1000Device<'a, K>
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