Struct uio::UioDevice
[−]
[src]
pub struct UioDevice { // some fields omitted }
Methods
impl UioDevice
fn new(uio_num: usize) -> Result<UioDevice>
fn get_resource_info(&mut self) -> Result<Vec<(String, u64)>, UioError>
Return a vector of mappable resources (i.e., PCI bars) including their size.
fn map_resource(&self, bar_nr: usize) -> Result<MemoryMap, UioError>
Maps a given resource into the virtual address space of the process.
Arguments
- bar_nr: The index to the given resource (i.e., 1 for /sys/class/uio/uioX/device/resource1)
fn get_event_count(&self) -> Result<u32, UioError>
The amount of events.
fn get_name(&self) -> Result<String, UioError>
The name of the UIO device.
fn get_version(&self) -> Result<String, UioError>
The version of the UIO driver.
fn map_size(&self, mapping: usize) -> Result<usize, UioError>
The size of a given mapping.
Arguments
- mapping: The given index of the mapping (i.e., 1 for /sys/class/uio/uioX/maps/map1)
fn map_addr(&self, mapping: usize) -> Result<usize, UioError>
The address of a given mapping.
Arguments
- mapping: The given index of the mapping (i.e., 1 for /sys/class/uio/uioX/maps/map1)
fn get_map_info(&mut self) -> Result<Vec<String>, UioError>
Return a list of all possible memory mappings.
fn map_mapping(&self, mapping: usize) -> Result<MemoryMap, UioError>
Map an available memory mapping.
Arguments
- mapping: The given index of the mapping (i.e., 1 for /sys/class/uio/uioX/maps/map1)