7 Commits

Author SHA1 Message Date
Will Miles
d37ee89e84 ESP8266PWM: Fix phase shift glitches
In some cases it was possible for the computed phase shift to skip
a cycle.  Update the shift calculation logic to prevent this.
2024-11-09 21:33:58 -05:00
Will Miles
59deebc961 Improve PWM on ESP8266
- Better phase updates without dropping samples
- Make second pin duty cycle always after first, even inverted
2024-09-29 10:00:27 -04:00
Will Miles
3c7f83407b Save a little RAM 2024-09-28 23:16:26 -04:00
Will Miles
fe4b668107 Slightly reduce PWM jankiness 2024-09-28 23:12:03 -04:00
Will Miles
cc87b32206 Support PWM phase shifts on ESP8266
Use the phase-locked soft PWM from the Arduino core to implement the
same PWM phase management as ESP32s are using.  The soft PWM code is
vendored in, as it was previously, to add the NMI workaround from #4035.

Completes #4034
2024-09-28 23:07:28 -04:00
Will Miles
2fc2f47d06 ESP8266PWM: Annotate sources
Add additional clarification as to the original source URL and the
specific local patches.
2024-07-12 19:16:31 -04:00
Will Miles
ff39a8db3f Fix PWM crashes on ESP8266
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.  Work around this
by backing up and restoring the PC if needed.
2024-06-27 21:30:05 -04:00