ConfigurationAccess

Trait ConfigurationAccess 

Source
pub trait ConfigurationAccess {
    // Required methods
    fn read_word(
        &self,
        device_function: DeviceFunction,
        register_offset: u8,
    ) -> u32;
    fn write_word(
        &mut self,
        device_function: DeviceFunction,
        register_offset: u8,
        data: u32,
    );
    unsafe fn unsafe_clone(&self) -> Self;
}
Expand description

A method to access PCI configuration space for a particular PCI bus.

Required Methods§

Source

fn read_word(&self, device_function: DeviceFunction, register_offset: u8) -> u32

Reads 4 bytes from the configuration space.

Source

fn write_word( &mut self, device_function: DeviceFunction, register_offset: u8, data: u32, )

Writes 4 bytes to the configuration space.

Source

unsafe fn unsafe_clone(&self) -> Self

Makes a clone of the ConfigurationAccess, accessing the same PCI bus.

§Safety

This function allows concurrent mutable access to the PCI CAM. To avoid this causing problems, the returned ConfigurationAccess instance must only be used to read read-only fields.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§