Vendor in the ESP8266 Arduino core PWM library, with a fix for a nasty NMI crash bug. Sometimes the NMI return instruction seems to fail, resulting in an infinite loop as the PC gets stuck "returning" to the NMI handler itself. Work around this by backing up and restoring the PC (and PS) from the last known good target values if needed.
I've opted to place the code in the platformio "libs" folder, which makes it easy to conditionally include for ESP8266 builds via platformio.ini.
Vendor in the ESP8266 Arduino core PWM library, with a fix for a nasty NMI crash bug. Sometimes the NMI return instruction seems to fail, resulting in an infinite loop as the PC gets stuck "returning" to the NMI handler itself. Work around this by backing up and restoring the PC (and PS) from the last known good target values if needed.
I've opted to place the code in the platformio "libs" folder, which makes it easy to conditionally include for ESP8266 builds via platformio.ini.
Fixes PWM crash issues issues described in #3962.