circuitpython/stmhal/boards/PYBV4
Damien George a8a4b01af6 stmhal: Add PWM capability for LED(3) and LED(4) on pyboards.
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.
2016-01-29 22:44:43 +00:00
..
mpconfigboard.h stmhal: Add PWM capability for LED(3) and LED(4) on pyboards. 2016-01-29 22:44:43 +00:00
mpconfigboard.mk stmhal: Generate modstm constants per build 2015-08-07 08:46:43 +01:00
pins.csv stmhal: Update PYBv3 and PYBv4 pin defs to include MMA pins, and others. 2015-10-31 11:14:15 +00:00
stm32f4xx_hal_conf.h stmhal: Use CMSIS_MCU definition from mpconfigboard.mk 2015-08-07 08:54:14 +01:00