15 void setup()
override;
BedjetMode mode
BedJet operating mode.
void dump_config() override
uint16_t output_bits_
The mask to write as output state - 1 means HIGH, 0 means LOW.
void setup() override
Check i2c availability and setup masks.
float get_setup_priority() const override
CH422GComponent()=default
bool set_mode_(uint8_t mode)
void pin_mode(uint8_t pin, gpio::Flags flags)
Helper function to set the pin mode of a pin.
uint8_t pin_read_flags_
Flags to check if read previously during this loop.
void loop() override
Poll for input changes periodically.
float get_loop_priority() const override
uint8_t read_reg_(uint8_t reg)
uint8_t mode_value_
Copy of the mode value.
bool write_reg_(uint8_t reg, uint8_t value)
uint8_t input_bits_
Copy of last read values.
bool digital_read(uint8_t pin)
Helper function to read the value of a pin.
void digital_write(uint8_t pin, bool value)
Helper function to write the value of a pin.
Helper class to expose a CH422G pin as a GPIO pin.
void set_parent(CH422GComponent *parent)
CH422GComponent * parent_
std::string dump_summary() const override
void set_flags(gpio::Flags flags)
void set_inverted(bool inverted)
bool digital_read() override
void pin_mode(gpio::Flags flags) override
void digital_write(bool value) override
void set_pin(uint8_t pin)
gpio::Flags get_flags() const override
This Class provides the methods to read/write bytes from/to an i2c device.
I2CRegister reg(uint8_t a_register)
calls the I2CRegister constructor
Providing packet encoding functions for exchanging data with a remote host.