15 void setup()
override;
51 void setup()
override;
55 std::string dump_summary()
const override;
CH422GComponent * parent_
float get_loop_priority() const override
void setup() override
Check i2c availability and setup masks.
void loop() override
Poll for input changes periodically.
void set_restore_value(bool restore_value)
void digital_write(uint8_t pin, bool value)
Helper function to write the value of a pin.
void set_parent(CH422GComponent *parent)
uint8_t pin_read_cache_
Flags to check if read previously during this loop.
void set_flags(gpio::Flags flags)
uint8_t state_mask_
The mask to write as output state - 1 means HIGH, 0 means LOW.
bool digital_read(uint8_t pin)
Helper function to read the value of a pin.
bool write_output_(uint8_t value)
void dump_config() override
void pin_mode(uint8_t pin, gpio::Flags flags)
Helper function to set the pin mode of a pin.
esphome::i2c::ErrorCode last_error_
Storage for last I2C error seen.
float get_setup_priority() const override
bool restore_value_
Whether we want to override stored values on expander.
void set_pin(uint8_t pin)
Implementation of SPI Controller mode.
void set_inverted(bool inverted)
ErrorCode
Error codes returned by I2CBus and I2CDevice methods.
CH422GComponent()=default
This Class provides the methods to read/write bytes from/to an i2c device.
Helper class to expose a CH422G pin as an internal input GPIO pin.