[][src]Struct rtl8139_rs::RTL8139

pub struct RTL8139 { /* fields omitted */ }

Implementations

impl RTL8139[src]

pub fn manifest() -> (u16, u16, u16, u16)[src]

Returns the PCI manifest for devices compatible with this driver.

pub unsafe fn preload_unchecked(
    base: u16,
    virt_to_phys: fn(_: VirtAddr) -> PhysAddr
) -> Self
[src]

Function preloads the driver.

Arguments

  • base - base port for the device
  • virt_to_phys - function or closure that converts a virtaddr into a physaddr (used for DMA).

Safety

The caller of this function must pass a valid port base for a valid PCI device. Furthermore the caller must ensure that mastering and interrupts for the PCI device are enabled.

pub fn load(&mut self) -> Result<(), ()>[src]

Function sets up the device.

pub fn on_interrupt()[src]

Function that we need to call when we receive an interrupt for this device. The callee must ensure that the PIC/APIC has received an EOI.

pub fn try_recv(&mut self) -> Option<Vec<u8>>[src]

pub fn send(&mut self, buffer: &[u8])[src]

FIXME: Disable interrupts for the PCI device only instead of globally.

pub fn mac(&self) -> [u8; 6][src]

pub fn parts(&mut self) -> (RxSink, TxSink)[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.