8 #ifndef COMPONENTS_CPP_UTILS_PCF8574_H_
9 #define COMPONENTS_CPP_UTILS_PCF8574_H_
28 void write(uint8_t value);
29 void writeBit(uint8_t bit,
bool value);
static const gpio_num_t DEFAULT_SDA_PIN
The default SDA pin.
Definition: I2C.h:24
bool readBit(uint8_t bit)
Read the logic level on a given pin.
Definition: PCF8574.cpp:54
void setInvert(bool value)
Invert the bit values. Normally setting a pin's value to 1 means that a high signal is generated and ...
Definition: PCF8574.cpp:107
PCF8574(uint8_t address)
Class constructor.
Definition: PCF8574.cpp:20
void write(uint8_t value)
Set the output values of the device.
Definition: PCF8574.cpp:66
void init(gpio_num_t sdaPin=I2C::DEFAULT_SDA_PIN, gpio_num_t clkPin=I2C::DEFAULT_CLK_PIN)
Initialize the PCF8574 device.
Definition: PCF8574.cpp:118
static const gpio_num_t DEFAULT_CLK_PIN
The default Clock pin.
Definition: I2C.h:29
virtual ~PCF8574()
Class instance destructor.
Definition: PCF8574.cpp:30
Interface to I2C functions.
Definition: I2C.h:19
Encapsulate a PCF8574 device.
Definition: PCF8574.h:20
void writeBit(uint8_t bit, bool value)
Change the output value of a specific pin.
Definition: PCF8574.cpp:86
uint8_t read()
Read all the input bits from the device.
Definition: PCF8574.cpp:39