Package com.pi4j.io.i2c
Interface I2CBus
-
- All Known Implementing Classes:
I2CBusImpl
public interface I2CBusThis is abstraction of i2c bus. This interface allows the bus to return i2c device.- Author:
- Daniel Sendula, refactored by RasPelikan
-
-
Field Summary
Fields Modifier and Type Field Description static intBUS_0static intBUS_1static intBUS_10static intBUS_11static intBUS_12static intBUS_13static intBUS_14static intBUS_15static intBUS_16static intBUS_17static intBUS_2static intBUS_3static intBUS_4static intBUS_5static intBUS_6static intBUS_7static intBUS_8static intBUS_9
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes this bus.intgetBusNumber()I2CDevicegetDevice(int address)Returns i2c device.
-
-
-
Field Detail
-
BUS_0
static final int BUS_0
- See Also:
- Constant Field Values
-
BUS_1
static final int BUS_1
- See Also:
- Constant Field Values
-
BUS_2
static final int BUS_2
- See Also:
- Constant Field Values
-
BUS_3
static final int BUS_3
- See Also:
- Constant Field Values
-
BUS_4
static final int BUS_4
- See Also:
- Constant Field Values
-
BUS_5
static final int BUS_5
- See Also:
- Constant Field Values
-
BUS_6
static final int BUS_6
- See Also:
- Constant Field Values
-
BUS_7
static final int BUS_7
- See Also:
- Constant Field Values
-
BUS_8
static final int BUS_8
- See Also:
- Constant Field Values
-
BUS_9
static final int BUS_9
- See Also:
- Constant Field Values
-
BUS_10
static final int BUS_10
- See Also:
- Constant Field Values
-
BUS_11
static final int BUS_11
- See Also:
- Constant Field Values
-
BUS_12
static final int BUS_12
- See Also:
- Constant Field Values
-
BUS_13
static final int BUS_13
- See Also:
- Constant Field Values
-
BUS_14
static final int BUS_14
- See Also:
- Constant Field Values
-
BUS_15
static final int BUS_15
- See Also:
- Constant Field Values
-
BUS_16
static final int BUS_16
- See Also:
- Constant Field Values
-
BUS_17
static final int BUS_17
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDevice
I2CDevice getDevice(int address) throws IOException
Returns i2c device.- Parameters:
address- i2c device's address (7-bit address only: 0-127)- Returns:
- i2c device
- Throws:
IOException- thrown in case this bus cannot return i2c device.
-
getBusNumber
int getBusNumber()
- Returns:
- The bus' number
-
close
void close() throws IOExceptionCloses this bus. This usually means closing underlying file.- Throws:
IOException- thrown in case there are problems closing this i2c bus.
-
-