Fix obstruction isr for ESP32 (#38)
Fix obsruction isr for ESP32 In RATGDOComponent::setup() call the ESPHome code to attach_interrupt() before software serial begin(). This allows ESPHome to call IDF gpio_install_isr_service() without error.
This commit is contained in:
parent
03163ea9ae
commit
0c07766cab
|
@ -53,11 +53,11 @@ namespace ratgdo {
|
|||
this->output_gdo_pin_->pin_mode(gpio::FLAG_OUTPUT);
|
||||
this->input_gdo_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);
|
||||
this->input_obst_pin_->pin_mode(gpio::FLAG_INPUT);
|
||||
|
||||
this->input_obst_pin_->attach_interrupt(RATGDOStore::isr_obstruction, &this->isr_store_, gpio::INTERRUPT_ANY_EDGE);
|
||||
|
||||
this->sw_serial_.begin(9600, SWSERIAL_8N1, this->input_gdo_pin_->get_pin(), this->output_gdo_pin_->get_pin(), true);
|
||||
|
||||
this->input_obst_pin_->attach_interrupt(RATGDOStore::isr_obstruction, &this->isr_store_, gpio::INTERRUPT_ANY_EDGE);
|
||||
|
||||
ESP_LOGV(TAG, "Syncing rolling code counter after reboot...");
|
||||
|
||||
// many things happening at startup, use some delay for sync
|
||||
|
|
Loading…
Reference in New Issue