MMIO class
MMIO wrapper functions for the Linux userspace /dev/mem
device.
c-periphery MMIO documentation.
- Inheritance
-
- Object
- IsolateAPI
- MMIO
Constructors
- MMIO.new(int base, int size)
-
Maps the region of physical memory specified by the
base
physical address andsize
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 andsize
in bytes, using the specified memory character devicepath
. - MMIO.isolate(String json)
- Duplicates an existing MMIO from a JSON string. This special constructor is used to transfer an existing MMIO to an other isolate.
Properties
Methods
-
dispose(
) → void - Releases all internal native resources.
-
fromJson(
String json) → IsolateAPI -
override
-
getErrno(
) → int - Returns the libc errno of the last failure that occurred.
-
getHandle(
) → int -
override
-
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.
-
setHandle(
int handle) → void -
override
-
toJson(
) → String -
override
-
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.