I2C class Null safety

I2C wrapper functions for Linux userspace i2c-dev devices.

c-periphery I2C documentation.

Constructors

I2C(int busNum)
Opens the i2c-dev device at the specified path (e.g. "/dev/i2c-busNum").

Properties

busNum int
final
hashCode int
The hash code for this object. [...]
read-only, inherited
path String
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

dispose() → void
Releases all interal native resoures.
getErrno() int
Returns the libc errno of the last failure that occurred.
getI2Cfd() int
Returns the file descriptor (for the underlying i2c-dev device) of the I2C handle.
getI2Cinfo() String
Returns a string representation of the I2C handle.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
readByte(int address) int
Reads a byte from the I2C device with the address. [...]
readByteReg(int address, int register) int
Reads a byte from register of the I2C device with the address.
readBytes(int address, int len) List<int>
Reads len bytes from the I2C device with the address.
readBytesReg(int address, int register, int len) List<int>
Reads len bytes from register of the I2C device with the address. [...]
readWord(int address, [BitOrder order = BitOrder.MSB_LAST]) int
Reads a word from the I2C device with the address and the bit order]. [...]
readWordReg(int address, int register, [BitOrder order = BitOrder.MSB_LAST]) int
Reads a word from register of the I2C device with the address with the bit order. [...]
toString() String
A string representation of this object. [...]
inherited
transfer(List<I2Cmsg> data) NativeI2CmsgHelper
Transfers a list of I2Cmsg. [...]
writeByte(int address, int byteValue) → void
Writes a byteValue to the I2C device with the address. [...]
writeByteReg(int address, int register, int byteValue) → void
Writes a byteValue to the register of the I2C device with the address.
writeBytes(int address, List<int> byteData) → void
Writes byteData to the I2C device with the address. [...]
writeBytesReg(int address, int register, List<int> byteData) → void
Writes byteData to the register of the I2C device with the address.
writeWord(int address, int wordValue, [BitOrder order = BitOrder.MSB_LAST]) → void
Writes a wordValue to the I2C device with the address and the bit order. [...]
writeWordReg(int address, int register, int wordValue, [BitOrder order = BitOrder.MSB_LAST]) → void
Writes a wordValue to the register of the I2C device with the address and the bit order. [...]

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Methods

getI2CerrorCode(int value) I2CerrorCode
Converts the native error code value to I2CerrorCode.
I2CmsgFlags2Int(I2CmsgFlags flag) int
Converts I2CmsgFlags to the native bit mask value.