pub struct VmoOpHelper<'a, T> { /* private fields */ }Expand description
Helper providing contextual information and operations for an MMIO access.
Implementations§
Source§impl<'a, T> VmoOpHelper<'a, T>
impl<'a, T> VmoOpHelper<'a, T>
Sourcepub fn offset(&self) -> usize
pub fn offset(&self) -> usize
Returns the relative offset for this vmo operation.
NOTE: A VmoOpHelper can be decorated by shifting an internally-kept
relative offset to help build fakes with relative register bank
addresses. See VmoOpHelper::apply_offset.
Sourcepub fn range(&self) -> Range<usize> ⓘ
pub fn range(&self) -> Range<usize> ⓘ
Returns the relative memory range for this vmo operation.
See VmoOpHelper::offset.
Sourcepub fn vmo_offset(&self) -> usize
pub fn vmo_offset(&self) -> usize
Returns the offset of this operation relative to the start of the wrapped VMO.
Use VmoOpHelper::vmo_offset when using VmoOpHelper::unsafe_mmio.
Sourcepub fn vmo_range(&self) -> Range<usize> ⓘ
pub fn vmo_range(&self) -> Range<usize> ⓘ
Returns the memory for this vmo operation relative to the start of the wrapped VMO.
Sourcepub fn unsafe_mmio(&self) -> &'a impl UnsafeMmio
pub fn unsafe_mmio(&self) -> &'a impl UnsafeMmio
Provides access to the underlying unsafe mmio implementation.
Sourcepub fn apply_offset(self, offset: usize) -> Self
pub fn apply_offset(self, offset: usize) -> Self
Applies offset to this VmoOpHelper.
This function is used so that any further receivers of this
VmoOpHelper can work in an offset address space. For example, when
register banks are defined with offsets or when reusing register
definitions post an mmio::MmioSplit region.
§Panics
Panics if offset is larger than the current relative offset.