Wykres commitów

4 Commity (91fb9e7888d5babb6e52427eeb67fcd052a30a10)

Autor SHA1 Wiadomość Data
robert-hh 01d9b7adde rp2/machine_pwm: Keep duty value when changing the frequency.
The duty is saved and set whenever the frequency is changed, unless the
duty rate was not set yet.
2022-01-06 13:52:45 +11:00
robert-hh 9e56e630ca rp2/machine_pwm: Fix PWM frequency setting.
The top value was off by 1: in order to count n ticks it has to be set to
n-1.

Fixes issue #8122.
2022-01-06 13:51:19 +11:00
Damien George af64c2ddbd extmod/machine_pwm: Factor out machine.PWM bindings to common code.
This commit refactors machine.PWM and creates extmod/machine_pwm.c.  The
esp8266, esp32 and rp2 ports all use this and provide implementations of
the required PWM functionality.  This helps to reduce code duplication and
keep the same Python API across ports.

This commit does not make any functional changes.

Signed-off-by: Damien George <damien@micropython.org>
2021-09-04 16:31:17 +10:00
Damien George 469345e728 rp2: Add new port to Raspberry Pi RP2 microcontroller.
This commit adds a new port "rp2" which targets the new Raspberry Pi RP2040
microcontroller.

The build system uses pure cmake (with a small Makefile wrapper for
convenience).  The USB driver is TinyUSB, and there is a machine module
with most of the standard classes implemented.  Some examples are provided
in the examples/rp2/ directory.

Work done in collaboration with Graham Sanderson.

Signed-off-by: Damien George <damien@micropython.org>
2021-01-30 00:42:29 +11:00