ESPHome  2024.12.2
sx1509_gpio_pin.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "esphome/core/gpio.h"
4 
5 namespace esphome {
6 namespace sx1509 {
7 
8 class SX1509Component;
9 
10 class SX1509GPIOPin : public GPIOPin {
11  public:
12  void setup() override;
13  void pin_mode(gpio::Flags flags) override;
14  bool digital_read() override;
15  void digital_write(bool value) override;
16  std::string dump_summary() const override;
17 
18  void set_parent(SX1509Component *parent) { this->parent_ = parent; }
19  void set_pin(uint8_t pin) { this->pin_ = pin; }
20  void set_inverted(bool inverted) { this->inverted_ = inverted; }
21  void set_flags(gpio::Flags flags) { this->flags_ = flags; }
22 
23  protected:
25  uint8_t pin_;
26  bool inverted_;
28 };
29 
30 } // namespace sx1509
31 } // namespace esphome
void pin_mode(gpio::Flags flags) override
std::string dump_summary() const override
void set_parent(SX1509Component *parent)
void set_flags(gpio::Flags flags)
void digital_write(bool value) override
const uint32_t flags
Definition: stm32flash.h:85
void set_inverted(bool inverted)
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7