ESPHome  2024.10.2
sx1509_gpio_pin.cpp
Go to the documentation of this file.
1 #include "esphome/core/helpers.h"
2 #include "esphome/core/log.h"
3 #include "sx1509_gpio_pin.h"
4 
5 namespace esphome {
6 namespace sx1509 {
7 
8 static const char *const TAG = "sx1509_gpio_pin";
9 
12 bool SX1509GPIOPin::digital_read() { return this->parent_->digital_read(this->pin_) != this->inverted_; }
13 void SX1509GPIOPin::digital_write(bool value) { this->parent_->digital_write(this->pin_, value != this->inverted_); }
14 std::string SX1509GPIOPin::dump_summary() const {
15  char buffer[32];
16  snprintf(buffer, sizeof(buffer), "%u via sx1509", pin_);
17  return buffer;
18 }
19 
20 } // namespace sx1509
21 } // namespace esphome
void pin_mode(gpio::Flags flags) override
std::string dump_summary() const override
const char *const TAG
Definition: spi.cpp:8
void pin_mode(uint8_t pin, gpio::Flags flags)
Definition: sx1509.cpp:88
void digital_write(bool value) override
const uint32_t flags
Definition: stm32flash.h:85
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
void digital_write(uint8_t pin, bool bit_value)
Definition: sx1509.cpp:65
bool digital_read(uint8_t pin)
Definition: sx1509.cpp:54