Commit fdc7b55
machine/esp32: add PWM support using LEDC peripheral
Add PWM support for ESP32 using the LEDC (LED Control) peripheral.
Features:
- 4 high-speed timers (PWM0-PWM3) with glitch-free duty updates
- Up to 8 channels shared across timers
- Configurable duty resolution (1-20 bits)
- Flexible frequency control via period setting
- Any GPIO can be used via GPIO matrix routing
The implementation follows the standard TinyGo PWM interface with
Configure, Channel, Set, SetPeriod, Top, and SetInverting methods.
Co-authored-by: Ona <no-reply@ona.com>1 parent 7aca814 commit fdc7b55
2 files changed
+427
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments