ESPHome  2024.12.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.h"
4 #include "sx1509_gpio_pin.h"
5 
6 namespace esphome {
7 namespace sx1509 {
8 
9 static const char *const TAG = "sx1509_gpio_pin";
10 
13 bool SX1509GPIOPin::digital_read() { return this->parent_->digital_read(this->pin_) != this->inverted_; }
14 void SX1509GPIOPin::digital_write(bool value) { this->parent_->digital_write(this->pin_, value != this->inverted_); }
15 std::string SX1509GPIOPin::dump_summary() const {
16  char buffer[32];
17  snprintf(buffer, sizeof(buffer), "%u via sx1509", this->pin_);
18  return buffer;
19 }
20 
21 } // namespace sx1509
22 } // 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