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 read8(&self, offset: usize) -> u8
pub fn read8(&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_read8(&self, offset: usize) -> Result<u8>
pub fn try_read8(&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 read16(&self, offset: usize) -> u16
pub fn read16(&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_read16(&self, offset: usize) -> Result<u16>
pub fn try_read16(&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 read32(&self, offset: usize) -> u32
pub fn read32(&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_read32(&self, offset: usize) -> Result<u32>
pub fn try_read32(&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 read64(&self, offset: usize) -> u64
pub fn read64(&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_read64(&self, offset: usize) -> Result<u64>
pub fn try_read64(&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 read8_relaxed(&self, offset: usize) -> u8
pub fn read8_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_read8_relaxed(&self, offset: usize) -> Result<u8>
pub fn try_read8_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 read16_relaxed(&self, offset: usize) -> u16
pub fn read16_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_read16_relaxed(&self, offset: usize) -> Result<u16>
pub fn try_read16_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 read32_relaxed(&self, offset: usize) -> u32
pub fn read32_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_read32_relaxed(&self, offset: usize) -> Result<u32>
pub fn try_read32_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 read64_relaxed(&self, offset: usize) -> u64
pub fn read64_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_read64_relaxed(&self, offset: usize) -> Result<u64>
pub fn try_read64_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 write8(&self, value: u8, offset: usize)
pub fn write8(&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_write8(&self, value: u8, offset: usize) -> Result
pub fn try_write8(&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 write16(&self, value: u16, offset: usize)
pub fn write16(&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_write16(&self, value: u16, offset: usize) -> Result
pub fn try_write16(&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 write32(&self, value: u32, offset: usize)
pub fn write32(&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_write32(&self, value: u32, offset: usize) -> Result
pub fn try_write32(&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 write64(&self, value: u64, offset: usize)
pub fn write64(&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_write64(&self, value: u64, offset: usize) -> Result
pub fn try_write64(&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 write8_relaxed(&self, value: u8, offset: usize)
pub fn write8_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_write8_relaxed(&self, value: u8, offset: usize) -> Result
pub fn try_write8_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 write16_relaxed(&self, value: u16, offset: usize)
pub fn write16_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_write16_relaxed(&self, value: u16, offset: usize) -> Result
pub fn try_write16_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 write32_relaxed(&self, value: u32, offset: usize)
pub fn write32_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_write32_relaxed(&self, value: u32, offset: usize) -> Result
pub fn try_write32_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 write64_relaxed(&self, value: u64, offset: usize)
pub fn write64_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_write64_relaxed(&self, value: u64, offset: usize) -> Result
pub fn try_write64_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.