7 static const char *
const TAG =
"xl9535";
10 ESP_LOGCONFIG(TAG,
"Setting up XL9535...");
21 ESP_LOGCONFIG(TAG,
"XL9535:");
25 ESP_LOGE(TAG,
"Communication with XL9535 failed!");
39 state = (port & (1 << (pin - 10))) != 0;
46 state = (port & (1 << pin)) != 0;
55 uint8_t register_data = 0;
63 register_data = register_data & (~(1 << (pin - 10)));
64 port = register_data | value << (pin - 10);
75 register_data = register_data & (~(1 << pin));
76 port = register_data | value << pin;
94 port = port | (1 << (pin - 10));
96 port = port & (~(1 << (pin - 10)));
104 port = port | (1 << pin);
106 port = port & (~(1 << pin));
void pin_mode(uint8_t pin, gpio::Flags mode)
void digital_write(uint8_t pin, bool value)
ErrorCode read_register(uint8_t a_register, uint8_t *data, size_t len, bool stop=true)
reads an array of bytes from a specific register in the I²C device
void status_set_warning(const char *message="unspecified")
bool digital_read() override
bool digital_read(uint8_t pin)
void digital_write(bool value) override
No error found during execution of method.
void status_clear_warning()
BedjetMode mode
BedJet operating mode.
void dump_config() override
std::string dump_summary() const override
void pin_mode(gpio::Flags flags) override
virtual void mark_failed()
Mark this component as failed.
Implementation of SPI Controller mode.
ErrorCode write_register(uint8_t a_register, const uint8_t *data, size_t len, bool stop=true)
writes an array of bytes to a specific register in the I²C device
std::string str_snprintf(const char *fmt, size_t len,...)