Class RemoteI2CDevice
java.lang.Object
com.diozero.internal.spi.AbstractDevice
com.diozero.internal.provider.remote.devicefactory.RemoteI2CDevice
- All Implemented Interfaces:
DeviceInterface,I2CDeviceInterface,I2CSMBusInterface,Closeable,AutoCloseable
public class RemoteI2CDevice extends AbstractDevice implements I2CDeviceInterface
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.diozero.api.I2CDeviceInterface
I2CDeviceInterface.I2CMessage -
Field Summary
Fields inherited from interface com.diozero.api.I2CSMBusInterface
MAX_I2C_BLOCK_SIZE -
Constructor Summary
Constructors Constructor Description RemoteI2CDevice(RemoteDeviceFactory deviceFactory, String key, int controller, int address, I2CConstants.AddressSize addressSize) -
Method Summary
Modifier and Type Method Description byte[]blockProcessCall(int register, byte... txData)protected voidcloseDevice()booleanprobe(I2CDevice.ProbeMode mode)shortprocessCall(int register, short s)byte[]readBlockData(int register)bytereadByte()bytereadByteData(int register)intreadBytes(byte[] buffer)intreadI2CBlockData(int register, byte[] buffer)shortreadWordData(int register)voidwriteBlockData(int register, byte... data)voidwriteByte(byte b)voidwriteByteData(int register, byte b)voidwriteBytes(byte... data)voidwriteI2CBlockData(int register, byte... data)voidwriteQuick(byte bit)voidwriteWordData(int register, short s)Methods inherited from class com.diozero.internal.spi.AbstractDevice
close, getDeviceFactory, getKey, isOpenMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.diozero.api.DeviceInterface
close, getKey, isOpenMethods inherited from interface com.diozero.api.I2CDeviceInterface
readNoStop, readWriteMethods inherited from interface com.diozero.api.I2CSMBusInterface
close, probe, readWordSwapped, writeWordSwapped
-
Constructor Details
-
RemoteI2CDevice
public RemoteI2CDevice(RemoteDeviceFactory deviceFactory, String key, int controller, int address, I2CConstants.AddressSize addressSize)
-
-
Method Details
-
probe
- Specified by:
probein interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
writeQuick
public void writeQuick(byte bit)- Specified by:
writeQuickin interfaceI2CSMBusInterface
-
readByte
- Specified by:
readBytein interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
writeByte
- Specified by:
writeBytein interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
readBytes
- Specified by:
readBytesin interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
writeBytes
- Specified by:
writeBytesin interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
readByteData
- Specified by:
readByteDatain interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
writeByteData
- Specified by:
writeByteDatain interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
readWordData
- Specified by:
readWordDatain interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
writeWordData
- Specified by:
writeWordDatain interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
processCall
- Specified by:
processCallin interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
readBlockData
- Specified by:
readBlockDatain interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
writeBlockData
- Specified by:
writeBlockDatain interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
blockProcessCall
- Specified by:
blockProcessCallin interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
readI2CBlockData
- Specified by:
readI2CBlockDatain interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
writeI2CBlockData
- Specified by:
writeI2CBlockDatain interfaceI2CSMBusInterface- Throws:
RuntimeIOException
-
closeDevice
- Specified by:
closeDevicein classAbstractDevice- Throws:
RuntimeIOException
-