public class SysFsI2CDevice extends AbstractDevice implements I2CDeviceInterface
Constructor and Description |
---|
SysFsI2CDevice(DeviceFactoryInterface deviceFactory,
String key,
int controller,
int address,
int addressSize,
int frequency) |
Modifier and Type | Method and Description |
---|---|
protected void |
closeDevice() |
boolean |
probe(I2CDevice.ProbeMode mode) |
void |
read(ByteBuffer dst) |
byte |
readByte() |
byte |
readByteData(int register) |
void |
readI2CBlockData(int register,
int subAddressSize,
ByteBuffer dst) |
void |
write(ByteBuffer src) |
void |
writeByte(byte b) |
void |
writeByteData(int register,
byte b) |
void |
writeI2CBlockData(int register,
int subAddressSize,
ByteBuffer src) |
close, getDeviceFactory, getKey, isOpen
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getKey, isOpen
public SysFsI2CDevice(DeviceFactoryInterface deviceFactory, String key, int controller, int address, int addressSize, int frequency)
public boolean probe(I2CDevice.ProbeMode mode)
probe
in interface I2CDeviceInterface
public byte readByte() throws RuntimeIOException
readByte
in interface I2CDeviceInterface
RuntimeIOException
public void writeByte(byte b) throws RuntimeIOException
writeByte
in interface I2CDeviceInterface
RuntimeIOException
public void read(ByteBuffer dst) throws RuntimeIOException
read
in interface I2CDeviceInterface
RuntimeIOException
public void write(ByteBuffer src) throws RuntimeIOException
write
in interface I2CDeviceInterface
RuntimeIOException
public byte readByteData(int register) throws RuntimeIOException
readByteData
in interface I2CDeviceInterface
RuntimeIOException
public void writeByteData(int register, byte b) throws RuntimeIOException
writeByteData
in interface I2CDeviceInterface
RuntimeIOException
public void readI2CBlockData(int register, int subAddressSize, ByteBuffer dst) throws RuntimeIOException
readI2CBlockData
in interface I2CDeviceInterface
RuntimeIOException
public void writeI2CBlockData(int register, int subAddressSize, ByteBuffer src) throws RuntimeIOException
writeI2CBlockData
in interface I2CDeviceInterface
RuntimeIOException
protected void closeDevice() throws RuntimeIOException
closeDevice
in class AbstractDevice
RuntimeIOException
Copyright © 2016–2018 mattjlewis. All rights reserved.