template <typename ElementType, size_t ElementCount = cpp20::dynamic_extent, typename Ref = ElementType&>
class ArrayIo
Defined at line 35 of file ../../zircon/system/ulib/hwreg/include/hwreg/array.h
An hwreg::ArrayIo is an IoProvider for use with "bitfields.h" types
that simply holds a std::span of the underlying integer type and does normal
memory access on it. This can be either a fixed-size or a dynamic span. The
`offset` arguments to the hwreg API methods are used as the index into the
span. The templated methods require that the type parameter in the access
(i.e. the underlying type of the given hwreg type) be exactly ElementType.
For example:
```
using PageTableIo = hwreg::ArrayIo
<PageTableEntry
::ValueType, 512>;
PageTableIo io{page_table_array};
auto pte = PageTableEntry::Get(pfn);
pte.set_p(false);
pte.WriteTo(
&io
);
```
Public Methods
void ArrayIo<ElementType, ElementCount, Ref> (Span array)
Defined at line 39 of file ../../zircon/system/ulib/hwreg/include/hwreg/array.h
Span get ()
Defined at line 41 of file ../../zircon/system/ulib/hwreg/include/hwreg/array.h
template <typename IntType>
void Write (IntType val, uint32_t offset)
Defined at line 44 of file ../../zircon/system/ulib/hwreg/include/hwreg/array.h
template <typename IntType>
IntType Read (uint32_t offset)
Defined at line 51 of file ../../zircon/system/ulib/hwreg/include/hwreg/array.h