mirror of
https://github.com/esphome/esphome.git
synced 2025-02-24 13:58:14 +00:00
* added ANALOG_OUTPUT as first functionality * added gpio * seperated the code for different functions * fixed code * Revert "fixed code" This reverts commit 0c6eacb225522f7d738fa371d0db976a97f2f3e8. * add timings for breathe and blink * made the sx1509_float_output am output component * add keypad * implementation for sx1509 keypad * keypad code cleanup and first device tests * debounce * keypad working now. * update for timings. does not compile yet * added all options for breathe and blink fixed var namings * blink and breath still not ok * fixed ms for timings * sync with repo * fixed issue with gpio pin output * code cleanup * lint * more lint * remove log from header * Update esphome/components/sx1509/__init__.py Co-Authored-By: Otto Winter <otto@otto-winter.com> * review * feedback * fixed review issues did some extended testing with mqtt spy * code cleanup (comments) * fixed row col swap for binarysensor_keypad * flake and lint * travis * travis * travis * Update esphome/components/sx1509/sx1509.cpp Co-Authored-By: Otto Winter <otto@otto-winter.com> * review * separated platforms * code cleanup * travis relative paths in python * remove blink/breathe code cleanup * cpp lint * feedback * travis * lint line to long * check keypad settings to be valid * clang * keypad config * text * Remove wrong .gitignore from .gitignore * Remove .pio folder from .gitignore (merge) * Formatting * Formatting * Add i2c log in dump_config * Remove unused variables * Disable static for header files We don't need internal linkage * Use consistent member default argument style * Run clang-format Co-authored-by: null <m.vanturnhout@exxellence.nl> Co-authored-by: Otto Winter <otto@otto-winter.com>
21 lines
671 B
C++
21 lines
671 B
C++
#include "esphome/core/helpers.h"
|
|
#include "esphome/core/log.h"
|
|
#include "sx1509_gpio_pin.h"
|
|
|
|
namespace esphome {
|
|
namespace sx1509 {
|
|
|
|
static const char *TAG = "sx1509_gpio_pin";
|
|
|
|
void SX1509GPIOPin::setup() {
|
|
ESP_LOGD(TAG, "setup pin %d", this->pin_);
|
|
this->parent_->pin_mode(this->pin_, this->mode_);
|
|
}
|
|
|
|
void SX1509GPIOPin::pin_mode(uint8_t mode) { this->parent_->pin_mode(this->pin_, mode); }
|
|
bool SX1509GPIOPin::digital_read() { return this->parent_->digital_read(this->pin_) != this->inverted_; }
|
|
void SX1509GPIOPin::digital_write(bool value) { this->parent_->digital_write(this->pin_, value != this->inverted_); }
|
|
|
|
} // namespace sx1509
|
|
} // namespace esphome
|