15 void setup()
override;
57 void setup()
override;
61 std::string dump_summary()
const override;
Helper class to expose a PCA9554 pin as an internal input GPIO pin.
void set_parent(PCA9554Component *parent)
void set_pin_count(size_t pin_count)
I2CRegister reg(uint8_t a_register)
calls the I2CRegister constructor
void setup() override
Check i2c availability and setup masks.
void set_pin(uint8_t pin)
esphome::i2c::ErrorCode last_error_
Storage for last I2C error seen.
float get_setup_priority() const override
uint16_t was_previously_read_
Flags to check if read previously during this loop.
PCA9554Component()=default
void digital_write(uint8_t pin, bool value)
Helper function to write the value of a pin.
size_t pin_count_
number of bits the expander has
bool digital_read(uint8_t pin)
Helper function to read the value of a pin.
void set_inverted(bool inverted)
uint16_t input_mask_
The state of the actual input pin states - 1 means HIGH, 0 means LOW.
void loop() override
Poll for input changes periodically.
uint16_t config_mask_
Mask for the pin config - 1 means OUTPUT, 0 means INPUT.
uint16_t output_mask_
The mask to write as output state - 1 means HIGH, 0 means LOW.
size_t reg_width_
width of registers
void dump_config() override
Implementation of SPI Controller mode.
void pin_mode(uint8_t pin, gpio::Flags flags)
Helper function to set the pin mode of a pin.
ErrorCode
Error codes returned by I2CBus and I2CDevice methods.
void set_flags(gpio::Flags flags)
PCA9554Component * parent_
float get_loop_priority() const override
This Class provides the methods to read/write bytes from/to an i2c device.
bool write_register_(uint8_t reg, uint16_t value)