[][src]Struct wishbone_bridge::PCIeBridge

pub struct PCIeBridge { /* fields omitted */ }

Describes a connection to a target via PCI Express.

Implementations

impl PCIeBridge[src]

A builder to create a connection to a target via PCIe. Specify a PCIe resource file as part of the path.

Note: PCIe bridges to not expose the entire Wishbine bus. You will probably need to translate your addresses to take this into account. For example, address 0x0000_1000 on your Wishbone bus may actually correspond to address 0xe000_1000 on your target device.

use wishbone_bridge::PCIeBridge;
let bridge = PCIeBridge::new("/sys/devices/pci0001:00/0001:00:07.0/resource0").unwrap().create().unwrap();

pub fn new<P: AsRef<Path>>(path: P) -> Result<PCIeBridge, BridgeError>[src]

Create a new PCIeBridge struct. The file must exist. This does not check to ensure you have access permissions.

pub fn create(&self) -> Result<Bridge, BridgeError>[src]

Create a new Bridge with the given file. This will produce an error if the PCIe device could not be opened.

Trait Implementations

impl Clone for PCIeBridge[src]

impl<'_> From<&'_ str> for PCIeBridge[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.