8 #ifndef COMPONENTS_CPP_UTILS_PCF8575_H_
9 #define COMPONENTS_CPP_UTILS_PCF8575_H_
28 void write(uint16_t value);
29 void writeBit(uint16_t bit,
bool value);
bool readBit(uint16_t bit)
Read the logic level on a given pin.
Definition: PCF8575.cpp:56
void write(uint16_t value)
Set the output values of the device.
Definition: PCF8575.cpp:68
static const gpio_num_t DEFAULT_SDA_PIN
The default SDA pin.
Definition: I2C.h:24
void writeBit(uint16_t bit, bool value)
Change the output value of a specific pin.
Definition: PCF8575.cpp:89
Encapsulate a PCF8575 device.
Definition: PCF8575.h:20
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: PCF8575.cpp:110
static const gpio_num_t DEFAULT_CLK_PIN
The default Clock pin.
Definition: I2C.h:29
void init(gpio_num_t sdaPin=I2C::DEFAULT_SDA_PIN, gpio_num_t clkPin=I2C::DEFAULT_CLK_PIN)
Initialize the PCF8575 device.
Definition: PCF8575.cpp:121
uint16_t read()
Read all the input bits from the device.
Definition: PCF8575.cpp:40
Interface to I2C functions.
Definition: I2C.h:19
virtual ~PCF8575()
Class instance destructor.
Definition: PCF8575.cpp:31
PCF8575(uint8_t address)
Class constructor.
Definition: PCF8575.cpp:21