Package crackers.kobots.devices
Class I2CUtilsKt
-
- All Implemented Interfaces:
public final class I2CUtilsKt
-
-
Field Summary
Fields Modifier and Type Field Description private final static DebouncedButton
qwiicKill
-
Method Summary
Modifier and Type Method Description final DebouncedButton
getQwiicKill()
Kill button on enabled Qwiic pHAT v2.0 (https://www.sparkfun.com/products/15945). final static I2CSubRegister<Short>
shortSubRegister(I2CDeviceInterface $self, Integer register, Integer mask)
Read and write from 16-bit registers (short) using a mask to extract/write values. final static ByteArray
readBytes(I2CDeviceInterface $self, Integer n)
Promote an I2CDevice concept to the I2CDeviceInterface final static I2CDeviceInterface
getOrCreateI2CDevice(Integer controller, Integer address)
Get an existing I2C device or create a new one. -
-
Method Detail
-
getQwiicKill
final DebouncedButton getQwiicKill()
Kill button on enabled Qwiic pHAT v2.0 (https://www.sparkfun.com/products/15945). The default consumer exits the application with code 3. (Included here because Qwiic is I2C)
-
shortSubRegister
final static I2CSubRegister<Short> shortSubRegister(I2CDeviceInterface $self, Integer register, Integer mask)
Read and write from 16-bit registers (short) using a mask to extract/write values.
-
readBytes
final static ByteArray readBytes(I2CDeviceInterface $self, Integer n)
Promote an I2CDevice concept to the I2CDeviceInterface
-
getOrCreateI2CDevice
final static I2CDeviceInterface getOrCreateI2CDevice(Integer controller, Integer address)
Get an existing I2C device or create a new one.
-
-
-
-