16 void setup()
override;
Base for expanders that cache reads per loop. With an interrupt pin the cache stays valid until INT f...
This Class provides the methods to read/write bytes from/to an i2c device.
I2CRegister reg(uint8_t a_register)
calls the I2CRegister constructor
void digital_write_hw(uint8_t pin, bool value) override
bool write_register_(uint8_t reg, uint8_t value)
bool read_register_(uint8_t reg, uint8_t *value)
esphome::i2c::ErrorCode last_error_
Storage for last I2C error seen.
void update_register_(uint8_t pin, bool pin_value, uint8_t reg_addr)
uint16_t input_mask_
Cache for input values (16-bit combined for both banks)
bool has_pullup_
Only the PCAL6416A has pull-up resistors.
void pin_mode(uint8_t pin, gpio::Flags flags)
Helper function to set the pin mode of a pin.
void setup() override
Check i2c availability and setup masks.
PCA6416AComponent()=default
void dump_config() override
bool digital_read_hw(uint8_t pin) override
bool digital_read_cache(uint8_t pin) override
uint8_t output_0_
The mask to write as output state - 1 means HIGH, 0 means LOW.
ErrorCode
Error codes returned by I2CBus and I2CDevice methods.
ESPHOME_EXPANDER_PIN_SUMMARY_DECL(esphome::pca6416a::PCA6416AComponent)