This commit is contained in:
Daniël Koek 2024-02-01 16:00:26 +00:00
parent 63246ee815
commit d621b6c44f
2 changed files with 5 additions and 2 deletions

View file

@ -5,6 +5,9 @@ namespace esphome {
namespace ebyte_lora_e220 { namespace ebyte_lora_e220 {
void EbyteLoraE220::setup() { void EbyteLoraE220::setup() {
this->pin_aux->setup();
this->pin_m0->setup();
this->pin_m1->setup();
if (this->pin_aux != nullptr) { if (this->pin_aux != nullptr) {
this->pin_aux->pin_mode(gpio::FLAG_INPUT); this->pin_aux->pin_mode(gpio::FLAG_INPUT);
ESP_LOGD(TAG, "Init AUX pin!"); ESP_LOGD(TAG, "Init AUX pin!");
@ -113,7 +116,7 @@ void EbyteLoraE220::dump_config() {
LOG_PIN(" M0 Pin: ", this->pin_m0); LOG_PIN(" M0 Pin: ", this->pin_m0);
LOG_PIN(" M1 Pin: ", this->pin_m1); LOG_PIN(" M1 Pin: ", this->pin_m1);
}; };
void EbyteLoraE220::update() { void EbyteLoraE220::loop() {
// This will be called by App.loop() // This will be called by App.loop()
if (this->available() > 1) { if (this->available() > 1) {

View file

@ -36,7 +36,7 @@ class EbyteLoraE220 : public PollingComponent, public uart::UARTDevice {
void set_pin_m1(GPIOPin *s) { pin_m1 = s; } void set_pin_m1(GPIOPin *s) { pin_m1 = s; }
void setup() override; void setup() override;
void dump_config() override; void dump_config() override;
void update() override; void loop() override;
private: private:
MODE_TYPE mode = MODE_0_NORMAL; MODE_TYPE mode = MODE_0_NORMAL;