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() |
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 byte readByte() throws RuntimeException
readByte
in interface I2CDeviceInterface
RuntimeException
public void writeByte(byte b) throws RuntimeException
writeByte
in interface I2CDeviceInterface
RuntimeException
public void read(ByteBuffer dst) throws RuntimeException
read
in interface I2CDeviceInterface
RuntimeException
public void write(ByteBuffer src) throws RuntimeException
write
in interface I2CDeviceInterface
RuntimeException
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–2017 mattjlewis. All rights reserved.