ESPHome 2025.10.0-dev
Loading...
Searching...
No Matches
sx1509_gpio_pin.cpp
Go to the documentation of this file.
2#include "esphome/core/log.h"
3#include "sx1509.h"
4#include "sx1509_gpio_pin.h"
5
6namespace esphome {
7namespace sx1509 {
8
9static const char *const TAG = "sx1509_gpio_pin";
10
13bool SX1509GPIOPin::digital_read() { return this->parent_->digital_read(this->pin_) != this->inverted_; }
14void SX1509GPIOPin::digital_write(bool value) { this->parent_->digital_write(this->pin_, value != this->inverted_); }
15std::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
bool digital_read(P pin)
Read the state of the given pin.
Definition cached_gpio.h:34
void pin_mode(uint8_t pin, gpio::Flags flags)
Definition sx1509.cpp:115
void pin_mode(gpio::Flags flags) override
std::string dump_summary() const override
void digital_write(bool value) override
uint16_t flags
const char *const TAG
Definition spi.cpp:8
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7