MMIO class

MMIO wrapper functions for the Linux userspace /dev/mem device.

c-periphery MMIO documentation.

Constructors

MMIO(int base, int size)
Maps the region of physical memory specified by the base physical address and size in bytes, using the default /dev/mem memory character device.
MMIO.advanced(int base, int size, String path)
Map the region of physical memory specified by the base physical address and size in bytes, using the specified memory character device path.

Properties

base int
final
hashCode int
The hash code for this object.
no setterinherited
path String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
final

Methods

dispose() → void
Releases all interal native resoures.
getErrno() int
Returns the libc errno of the last failure that occurred.
getMMIOinfo() String
Returns a string representation of the MMIO handle.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(int offset, int len) List<int>
Reads an byte array from mapped physical memory, starting at the specified byte offset, relative to the base address the MMIO handle was opened with.
read16(int offset) int
Reads 16-bits from mapped physical memory, starting at the specified byte offset, relative to the base address the MMIO handle was opened with.
read32(int offset) int
Reads 32-bits from mapped physical memory, starting at the specified byte offset, relative to the base address the MMIO handle was opened with.
read8(int offset) int
Reads 8-bits from mapped physical memory, starting at the specified byte offset, relative to the base address the MMIO handle was opened with.
toString() String
A string representation of this object.
inherited
write(int offset, List<int> data) → void
Writes an byte array from mapped physical memory, starting at the specified byte offset, relative to the base address the MMIO handle was opened with.
write16(int offset, int value) → void
Writes 16-bits from mapped physical memory, starting at the specified byte offset, relative to the base address the MMIO handle was opened with.
write32(int offset, int value) → void
Writes 32-bits from mapped physical memory, starting at the specified byte offset, relative to the base address the MMIO handle was opened with.
write8(int offset, int value) → void
Writes 8-bits from mapped physical memory, starting at the specified byte offset, relative to the base address the MMIO handle was opened with.

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int i) int
Fast access for MMIO.read32
operator []=(int i, int value) → void
Fast access for MMIO.write32

Static Methods

getMMIOerrorCode(int value) MMIOerrorCode
Converts the native error code value to MMIOerrorCode.