ESPHome 2026.2.4
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_); }
15size_t SX1509GPIOPin::dump_summary(char *buffer, size_t len) const {
16 return buf_append_printf(buffer, len, 0, "%u via sx1509", this->pin_);
17}
18
19} // namespace sx1509
20} // 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
size_t dump_summary(char *buffer, size_t len) const override
void pin_mode(gpio::Flags flags) override
void digital_write(bool value) override
uint16_t flags
const char *const TAG
Definition spi.cpp:7
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7
std::string size_t len
Definition helpers.h:692