Closed dragomirecky closed 6 years ago
G'day!
Thanks, having access to all PWM channels sounds like a good addition. I'll have a closer look as soon as possible.
However, we've moved our development across to the main 'micropython/micropython' repo, so if possible could you please rebase onto master and submit a PR over there?
-----Nick
Hi Nick, sorry, I missed that the ESP32 port has moved already. I created new pull request there.
ESP32 has 16 PWM channels with 8 separate timers, but current PWM implementation forces user to share single timer between all channels. This commit allows to use all 8 timers and does not break backward compatibility.
API additions:
pwm.init(..., timer=0, speed_mode=PWM.HIGH_SPEED_MODE)
PWM.HIGH_SPEED_MODE
andPWM.LOW_SPEED_MODE
Example:
There are 4 low speed timers and 4 high speed timers on ESP32.