public class PCF8574GpioProvider extends GpioProviderBase implements GpioProvider
This GPIO provider implements the PCF8574 I2C GPIO expansion board as native Pi4J GPIO pins. More information about the board can be found here: * http://www.ti.com/lit/ds/symlink/pcf8574.pdf
The PCF8574 is connected via I2C connection to the Raspberry Pi and provides 8 GPIO pins that can be used for either digital input or digital output pins.
Modifier and Type | Field and Description |
---|---|
static String |
DESCRIPTION |
static String |
NAME |
static int |
PCF8574_0x20 |
static int |
PCF8574_0x21 |
static int |
PCF8574_0x22 |
static int |
PCF8574_0x23 |
static int |
PCF8574_0x24 |
static int |
PCF8574_0x25 |
static int |
PCF8574_0x26 |
static int |
PCF8574_0x27 |
static int |
PCF8574_MAX_IO_PINS |
static int |
PCF8574A_0x38 |
static int |
PCF8574A_0x39 |
static int |
PCF8574A_0x3A |
static int |
PCF8574A_0x3B |
static int |
PCF8574A_0x3C |
static int |
PCF8574A_0x3D |
static int |
PCF8574A_0x3E |
static int |
PCF8574A_0x3F |
cache, DEFAULT_CACHE_SIZE, isshutdown, listeners
Constructor and Description |
---|
PCF8574GpioProvider(I2CBus bus,
int address) |
PCF8574GpioProvider(int busNumber,
int address) |
Modifier and Type | Method and Description |
---|---|
void |
export(Pin pin,
PinMode mode) |
PinMode |
getMode(Pin pin) |
String |
getName() |
PinState |
getState(Pin pin) |
void |
setMode(Pin pin,
PinMode mode) |
void |
setState(Pin pin,
PinState state) |
void |
shutdown() |
void |
unexport(Pin pin) |
addListener, dispatchPinAnalogValueChangeEvent, dispatchPinDigitalStateChangeEvent, export, getPinCache, getPullResistance, getPwm, getValue, hasPin, isExported, isShutdown, removeAllListeners, removeListener, setPullResistance, setPwm, setPwmRange, setValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListener, export, getPullResistance, getPwm, getValue, hasPin, isExported, isShutdown, removeAllListeners, removeListener, setPullResistance, setPwm, setPwmRange, setValue
public static final String NAME
public static final String DESCRIPTION
public static final int PCF8574_0x20
public static final int PCF8574_0x21
public static final int PCF8574_0x22
public static final int PCF8574_0x23
public static final int PCF8574_0x24
public static final int PCF8574_0x25
public static final int PCF8574_0x26
public static final int PCF8574_0x27
public static final int PCF8574A_0x38
public static final int PCF8574A_0x39
public static final int PCF8574A_0x3A
public static final int PCF8574A_0x3B
public static final int PCF8574A_0x3C
public static final int PCF8574A_0x3D
public static final int PCF8574A_0x3E
public static final int PCF8574A_0x3F
public static final int PCF8574_MAX_IO_PINS
public PCF8574GpioProvider(int busNumber, int address) throws I2CFactory.UnsupportedBusNumberException, IOException
public PCF8574GpioProvider(I2CBus bus, int address) throws IOException
IOException
public String getName()
getName
in interface GpioProvider
getName
in class GpioProviderBase
public void export(Pin pin, PinMode mode)
export
in interface GpioProvider
export
in class GpioProviderBase
public void unexport(Pin pin)
unexport
in interface GpioProvider
unexport
in class GpioProviderBase
public void setMode(Pin pin, PinMode mode)
setMode
in interface GpioProvider
setMode
in class GpioProviderBase
public PinMode getMode(Pin pin)
getMode
in interface GpioProvider
getMode
in class GpioProviderBase
public void setState(Pin pin, PinState state)
setState
in interface GpioProvider
setState
in class GpioProviderBase
public PinState getState(Pin pin)
getState
in interface GpioProvider
getState
in class GpioProviderBase
public void shutdown()
shutdown
in interface GpioProvider
shutdown
in class GpioProviderBase
Copyright © 2012–2016 Pi4J. All rights reserved.