<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/stmhal/led.c, branch 2.2.0</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=2.2.0</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=2.2.0'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-07-31T08:35:40+00:00</updated>
<entry>
<title>all: Use the name MicroPython consistently in comments</title>
<updated>2017-07-31T08:35:40+00:00</updated>
<author>
<name>Alexander Steffen</name>
<email>devel.20.webmeister@spamgourmet.com</email>
</author>
<published>2017-06-30T07:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=55f33240f3d7051d4213629e92437a36f1fac50e'/>
<id>urn:sha1:55f33240f3d7051d4213629e92437a36f1fac50e</id>
<content type='text'>
There were several different spellings of MicroPython present in comments,
when there should be only one.
</content>
</entry>
<entry>
<title>stmhal: Make error messages more consistent across peripherals.</title>
<updated>2017-06-15T02:02:14+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-06-15T02:02:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2bf5a947b2b01f2be6c7b05707391dd09b240ad0'/>
<id>urn:sha1:2bf5a947b2b01f2be6c7b05707391dd09b240ad0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>stmhal: Convert all module and method tables to use MP_ROM macros.</title>
<updated>2017-05-06T07:03:40+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-05-06T07:03:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0986675451edbdcbe31d90ddacf8f6dc3327a4ae'/>
<id>urn:sha1:0986675451edbdcbe31d90ddacf8f6dc3327a4ae</id>
<content type='text'>
</content>
</entry>
<entry>
<title>stmhal: Use mp_hal_delay_ms instead of HAL_Delay.</title>
<updated>2017-03-02T04:02:57+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-02T04:02:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6ab5512132d5b3d19a5bf029cb27829d41e76f8e'/>
<id>urn:sha1:6ab5512132d5b3d19a5bf029cb27829d41e76f8e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>all: Consistently update signatures of .make_new and .call methods.</title>
<updated>2017-01-04T13:10:42+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-01-04T13:10:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=eac22e29a5844e5aa5c865c2e73900e6ef039ad6'/>
<id>urn:sha1:eac22e29a5844e5aa5c865c2e73900e6ef039ad6</id>
<content type='text'>
Otherwise, they serve reoccurring source of copy-paste mistakes and
breaking nanbox build.
</content>
</entry>
<entry>
<title>stmhal/led: Use mp_hal_pin_config function instead of HAL_GPIO_Init.</title>
<updated>2016-12-22T03:55:26+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-12-22T03:50:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ed559de06336aa9a9dd71c1eb363e43d438a4e28'/>
<id>urn:sha1:ed559de06336aa9a9dd71c1eb363e43d438a4e28</id>
<content type='text'>
</content>
</entry>
<entry>
<title>stmhal/led: Properly initialise timer handle to zero before using it.</title>
<updated>2016-12-22T03:55:26+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-12-22T03:02:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b14abab9cd9e61307cd1101279f23fc77de09185'/>
<id>urn:sha1:b14abab9cd9e61307cd1101279f23fc77de09185</id>
<content type='text'>
Without this the timer will have random values for its State and Lock
entries.  The object can then be in a locked state leading to some HAL
functions returning immediately with an error code (which is unchecked).

This patch fixes such a bug which did manifest itself as PWM not working
correctly for LEDs.
</content>
</entry>
<entry>
<title>stmhal/led: Refactor LED to use mp_hal_pin_output() init function.</title>
<updated>2016-10-18T03:43:05+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-10-18T03:43:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b4cc68e4a4d656c4b1ae4de8db6a089726f1f572'/>
<id>urn:sha1:b4cc68e4a4d656c4b1ae4de8db6a089726f1f572</id>
<content type='text'>
As part of this patch the MICROPY_HW_LED_OTYPE setting is removed because
it is now unused (all boards anyway had this as OUTPUT_PP).
</content>
</entry>
<entry>
<title>stmhal/led: Allow LEDs to be in PWM mode with TIM1 and channels 1-4.</title>
<updated>2016-05-13T10:01:21+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-05-13T10:01:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1dc2862a837a08c6aa96fb369657be21043015ad'/>
<id>urn:sha1:1dc2862a837a08c6aa96fb369657be21043015ad</id>
<content type='text'>
This allows PYBv3 to use PWM for LED(1) and LED(2).
</content>
</entry>
<entry>
<title>stmhal: Add PWM capability for LED(3) and LED(4) on pyboards.</title>
<updated>2016-01-29T22:44:43+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-29T22:44:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a8a4b01af6501ff7ab61b251fc30fcf8a286f8d1'/>
<id>urn:sha1:a8a4b01af6501ff7ab61b251fc30fcf8a286f8d1</id>
<content type='text'>
USB CDC no longer needs TIM3 (which was originally used for LED(4) PWM)
and so TIM3 has been freed for general purpose use by the user.  Hence
LED(4) lost its PWM capabilities.

This patch reinstates the PWM capabilities using a semi-generic piece
of code which allows to configure a timer and PWM channel to use for any
LED.  But the PWM capability is only configured if the LED is set to an
intensity between 1 and 254 (ie only when needed).  In that case the
relevant timer is configured for PWM.  It's up to the user to make sure
the timers are not used if PWM is active.

This patch also makes sure that PWM LEDs are turned off using standard
GPIO when calling led.off() or led.intensity(0), instead of just setting
the PWM counter to zero.
</content>
</entry>
</feed>
