mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 09:18:00 +01:00
[sx1509] Fix up includes (#7828)
This commit is contained in:
parent
ebf895990b
commit
aa6cea6f7e
2 changed files with 7 additions and 6 deletions
|
@ -1,5 +1,6 @@
|
|||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
#include "sx1509.h"
|
||||
#include "sx1509_gpio_pin.h"
|
||||
|
||||
namespace esphome {
|
||||
|
@ -13,7 +14,7 @@ bool SX1509GPIOPin::digital_read() { return this->parent_->digital_read(this->pi
|
|||
void SX1509GPIOPin::digital_write(bool value) { this->parent_->digital_write(this->pin_, value != this->inverted_); }
|
||||
std::string SX1509GPIOPin::dump_summary() const {
|
||||
char buffer[32];
|
||||
snprintf(buffer, sizeof(buffer), "%u via sx1509", pin_);
|
||||
snprintf(buffer, sizeof(buffer), "%u via sx1509", this->pin_);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "sx1509.h"
|
||||
#include "esphome/core/gpio.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sx1509 {
|
||||
|
@ -15,10 +15,10 @@ class SX1509GPIOPin : public GPIOPin {
|
|||
void digital_write(bool value) override;
|
||||
std::string dump_summary() const override;
|
||||
|
||||
void set_parent(SX1509Component *parent) { parent_ = parent; }
|
||||
void set_pin(uint8_t pin) { pin_ = pin; }
|
||||
void set_inverted(bool inverted) { inverted_ = inverted; }
|
||||
void set_flags(gpio::Flags flags) { flags_ = flags; }
|
||||
void set_parent(SX1509Component *parent) { this->parent_ = parent; }
|
||||
void set_pin(uint8_t pin) { this->pin_ = pin; }
|
||||
void set_inverted(bool inverted) { this->inverted_ = inverted; }
|
||||
void set_flags(gpio::Flags flags) { this->flags_ = flags; }
|
||||
|
||||
protected:
|
||||
SX1509Component *parent_;
|
||||
|
|
Loading…
Reference in a new issue