java.lang.Object
com.pi4j.io.i2c.I2CBusBase
com.pi4j.plugin.linuxfs.provider.i2c.LinuxFsI2CBus
- All Implemented Interfaces:
I2CBus
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LinuxFileFile handle for this i2c busprotected org.slf4j.LoggerFields inherited from class com.pi4j.io.i2c.I2CBusBase
bus, DEFAULT_LOCK_ACQUIRE_TIMEOUT, DEFAULT_LOCK_ACQUIRE_TIMEOUT_UNITS, lockAquireTimeout, lockAquireTimeoutUnit -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()<R> Rexecute(I2C i2c, CheckedFunction<LinuxFile, R> action) <R> RvoidexecuteIOCTL(I2C i2c, long command, ByteBuffer data, IntBuffer offsets) protected voidselectBusSlave(I2C i2c) Selects the slave device if not already selected on this bus.Methods inherited from class com.pi4j.io.i2c.I2CBusBase
_execute
-
Field Details
-
logger
protected org.slf4j.Logger logger -
file
File handle for this i2c bus
-
-
Constructor Details
-
LinuxFsI2CBus
-
-
Method Details
-
execute
-
execute
-
executeIOCTL
- Parameters:
i2c- the device to select before performing the ioctl commandcommand- From I2CConstantsdata- values in bytes for all structures, with 4 or 8 byte alignment enforced by filling holes before pointersoffsets- ByteBuffer: offsets of pointer/ byte offset of pointedToData
-
selectBusSlave
Selects the slave device if not already selected on this bus. Runs the required ioctl's via JNI.- Parameters:
i2c- Device to select- Throws:
IOException
-
close
public void close()
-