mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-19 16:56:34 +00:00
Fix ir panasonic esp8266 (#18013)
* revert part of #16179 for ESP8266 * Revert "revert part of #16179 for ESP8266" This reverts commit b8e61264074f0dd92e5fca29a991d31c97f8f9ee. * try to revert #16179 for esp8266
This commit is contained in:
parent
84442dcd39
commit
dbcffa66e4
@ -411,6 +411,10 @@ void IRrecv::pause(void) {
|
||||
params.rcvstate = kStopState;
|
||||
params.rawlen = 0;
|
||||
params.overflow = false;
|
||||
#if defined(ESP8266)
|
||||
os_timer_disarm(&timer);
|
||||
detachInterrupt(params.recvpin);
|
||||
#endif
|
||||
#if defined(ESP32)
|
||||
gpio_intr_disable((gpio_num_t)params.recvpin);
|
||||
#endif // ESP32
|
||||
@ -424,6 +428,10 @@ void IRrecv::resume(void) {
|
||||
params.rcvstate = kIdleState;
|
||||
params.rawlen = 0;
|
||||
params.overflow = false;
|
||||
#if defined(ESP8266)
|
||||
os_timer_setfn(&timer, reinterpret_cast<os_timer_func_t *>(read_timeout),NULL);
|
||||
attachInterrupt(params.recvpin, gpio_intr, CHANGE);
|
||||
#endif
|
||||
#if defined(ESP32)
|
||||
timerAlarmDisable(timer);
|
||||
gpio_intr_enable((gpio_num_t)params.recvpin);
|
||||
|
Loading…
x
Reference in New Issue
Block a user