Commit Graph

3 Commits

Author SHA1 Message Date
Olivier Ortigues
b691aa0aae esp8266/esppwm: Always start timer to avoid glitch from full to nonfull.
The PWM at full value was not considered as an "active" channel so if no
other channel was used the timer used to mange PWM was not started.  So
when another duty value was set the PWM timer restarted and there was a
visible glitch when driving LEDs.  Such a glitch can be seen with the
following code (assuming active-low LED on pin 0):

    p = machine.PWM(machine.Pin(0))
    p.duty(1023) # full width, LED is off
    p.duty(1022) # LED flashes brightly then goes dim

This patch fixes the glitch.
2018-03-05 11:39:44 +11:00
Olivier Ortigues
5c83d05b49 esp8266/esppwm: Clip negative duty numbers to 0.
Prior to this patch a negative duty would lead to full PWM.
2018-02-15 11:12:41 +11:00
Damien George
01dd7804b8 ports: Make new ports/ sub-directory and move all ports there.
This is to keep the top-level directory clean, to make it clear what is
core and what is a port, and to allow the repository to grow with new ports
in a sustainable way.
2017-09-06 13:40:51 +10:00