pub struct Bar<const SIZE: usize = 0> { /* private fields */ }
Expand description
A PCI BAR to perform I/O-Operations on.
§Invariants
Bar
always holds an IoRaw
inststance that holds a valid pointer to the start of the I/O
memory mapped PCI bar and its size.
Methods from Deref<Target = Io<SIZE>>§
Sourcepub fn readb(&self, offset: usize) -> u8
pub fn readb(&self, offset: usize) -> u8
Read IO data from a given offset known at compile time.
Bound checks are performed on compile time, hence if the offset is not known at compile time, the build will fail.
Sourcepub fn try_readb(&self, offset: usize) -> Result<u8>
pub fn try_readb(&self, offset: usize) -> Result<u8>
Read IO data from a given offset.
Bound checks are performed on runtime, it fails if the offset (plus the type size) is out of bounds.
Sourcepub fn readw(&self, offset: usize) -> u16
pub fn readw(&self, offset: usize) -> u16
Read IO data from a given offset known at compile time.
Bound checks are performed on compile time, hence if the offset is not known at compile time, the build will fail.
Sourcepub fn try_readw(&self, offset: usize) -> Result<u16>
pub fn try_readw(&self, offset: usize) -> Result<u16>
Read IO data from a given offset.
Bound checks are performed on runtime, it fails if the offset (plus the type size) is out of bounds.
Sourcepub fn readl(&self, offset: usize) -> u32
pub fn readl(&self, offset: usize) -> u32
Read IO data from a given offset known at compile time.
Bound checks are performed on compile time, hence if the offset is not known at compile time, the build will fail.
Sourcepub fn try_readl(&self, offset: usize) -> Result<u32>
pub fn try_readl(&self, offset: usize) -> Result<u32>
Read IO data from a given offset.
Bound checks are performed on runtime, it fails if the offset (plus the type size) is out of bounds.
Sourcepub fn readq(&self, offset: usize) -> u64
pub fn readq(&self, offset: usize) -> u64
Read IO data from a given offset known at compile time.
Bound checks are performed on compile time, hence if the offset is not known at compile time, the build will fail.
Sourcepub fn try_readq(&self, offset: usize) -> Result<u64>
pub fn try_readq(&self, offset: usize) -> Result<u64>
Read IO data from a given offset.
Bound checks are performed on runtime, it fails if the offset (plus the type size) is out of bounds.
Sourcepub fn readb_relaxed(&self, offset: usize) -> u8
pub fn readb_relaxed(&self, offset: usize) -> u8
Read IO data from a given offset known at compile time.
Bound checks are performed on compile time, hence if the offset is not known at compile time, the build will fail.
Sourcepub fn try_readb_relaxed(&self, offset: usize) -> Result<u8>
pub fn try_readb_relaxed(&self, offset: usize) -> Result<u8>
Read IO data from a given offset.
Bound checks are performed on runtime, it fails if the offset (plus the type size) is out of bounds.
Sourcepub fn readw_relaxed(&self, offset: usize) -> u16
pub fn readw_relaxed(&self, offset: usize) -> u16
Read IO data from a given offset known at compile time.
Bound checks are performed on compile time, hence if the offset is not known at compile time, the build will fail.
Sourcepub fn try_readw_relaxed(&self, offset: usize) -> Result<u16>
pub fn try_readw_relaxed(&self, offset: usize) -> Result<u16>
Read IO data from a given offset.
Bound checks are performed on runtime, it fails if the offset (plus the type size) is out of bounds.
Sourcepub fn readl_relaxed(&self, offset: usize) -> u32
pub fn readl_relaxed(&self, offset: usize) -> u32
Read IO data from a given offset known at compile time.
Bound checks are performed on compile time, hence if the offset is not known at compile time, the build will fail.
Sourcepub fn try_readl_relaxed(&self, offset: usize) -> Result<u32>
pub fn try_readl_relaxed(&self, offset: usize) -> Result<u32>
Read IO data from a given offset.
Bound checks are performed on runtime, it fails if the offset (plus the type size) is out of bounds.
Sourcepub fn readq_relaxed(&self, offset: usize) -> u64
pub fn readq_relaxed(&self, offset: usize) -> u64
Read IO data from a given offset known at compile time.
Bound checks are performed on compile time, hence if the offset is not known at compile time, the build will fail.
Sourcepub fn try_readq_relaxed(&self, offset: usize) -> Result<u64>
pub fn try_readq_relaxed(&self, offset: usize) -> Result<u64>
Read IO data from a given offset.
Bound checks are performed on runtime, it fails if the offset (plus the type size) is out of bounds.
Sourcepub fn writeb(&self, value: u8, offset: usize)
pub fn writeb(&self, value: u8, offset: usize)
Write IO data from a given offset known at compile time.
Bound checks are performed on compile time, hence if the offset is not known at compile time, the build will fail.
Sourcepub fn try_writeb(&self, value: u8, offset: usize) -> Result
pub fn try_writeb(&self, value: u8, offset: usize) -> Result
Write IO data from a given offset.
Bound checks are performed on runtime, it fails if the offset (plus the type size) is out of bounds.
Sourcepub fn writew(&self, value: u16, offset: usize)
pub fn writew(&self, value: u16, offset: usize)
Write IO data from a given offset known at compile time.
Bound checks are performed on compile time, hence if the offset is not known at compile time, the build will fail.
Sourcepub fn try_writew(&self, value: u16, offset: usize) -> Result
pub fn try_writew(&self, value: u16, offset: usize) -> Result
Write IO data from a given offset.
Bound checks are performed on runtime, it fails if the offset (plus the type size) is out of bounds.
Sourcepub fn writel(&self, value: u32, offset: usize)
pub fn writel(&self, value: u32, offset: usize)
Write IO data from a given offset known at compile time.
Bound checks are performed on compile time, hence if the offset is not known at compile time, the build will fail.
Sourcepub fn try_writel(&self, value: u32, offset: usize) -> Result
pub fn try_writel(&self, value: u32, offset: usize) -> Result
Write IO data from a given offset.
Bound checks are performed on runtime, it fails if the offset (plus the type size) is out of bounds.
Sourcepub fn writeq(&self, value: u64, offset: usize)
pub fn writeq(&self, value: u64, offset: usize)
Write IO data from a given offset known at compile time.
Bound checks are performed on compile time, hence if the offset is not known at compile time, the build will fail.
Sourcepub fn try_writeq(&self, value: u64, offset: usize) -> Result
pub fn try_writeq(&self, value: u64, offset: usize) -> Result
Write IO data from a given offset.
Bound checks are performed on runtime, it fails if the offset (plus the type size) is out of bounds.
Sourcepub fn writeb_relaxed(&self, value: u8, offset: usize)
pub fn writeb_relaxed(&self, value: u8, offset: usize)
Write IO data from a given offset known at compile time.
Bound checks are performed on compile time, hence if the offset is not known at compile time, the build will fail.
Sourcepub fn try_writeb_relaxed(&self, value: u8, offset: usize) -> Result
pub fn try_writeb_relaxed(&self, value: u8, offset: usize) -> Result
Write IO data from a given offset.
Bound checks are performed on runtime, it fails if the offset (plus the type size) is out of bounds.
Sourcepub fn writew_relaxed(&self, value: u16, offset: usize)
pub fn writew_relaxed(&self, value: u16, offset: usize)
Write IO data from a given offset known at compile time.
Bound checks are performed on compile time, hence if the offset is not known at compile time, the build will fail.
Sourcepub fn try_writew_relaxed(&self, value: u16, offset: usize) -> Result
pub fn try_writew_relaxed(&self, value: u16, offset: usize) -> Result
Write IO data from a given offset.
Bound checks are performed on runtime, it fails if the offset (plus the type size) is out of bounds.
Sourcepub fn writel_relaxed(&self, value: u32, offset: usize)
pub fn writel_relaxed(&self, value: u32, offset: usize)
Write IO data from a given offset known at compile time.
Bound checks are performed on compile time, hence if the offset is not known at compile time, the build will fail.
Sourcepub fn try_writel_relaxed(&self, value: u32, offset: usize) -> Result
pub fn try_writel_relaxed(&self, value: u32, offset: usize) -> Result
Write IO data from a given offset.
Bound checks are performed on runtime, it fails if the offset (plus the type size) is out of bounds.
Sourcepub fn writeq_relaxed(&self, value: u64, offset: usize)
pub fn writeq_relaxed(&self, value: u64, offset: usize)
Write IO data from a given offset known at compile time.
Bound checks are performed on compile time, hence if the offset is not known at compile time, the build will fail.
Sourcepub fn try_writeq_relaxed(&self, value: u64, offset: usize) -> Result
pub fn try_writeq_relaxed(&self, value: u64, offset: usize) -> Result
Write IO data from a given offset.
Bound checks are performed on runtime, it fails if the offset (plus the type size) is out of bounds.