This ensures the same number of cycles are used for LED on and LED off in
the PIO 1Hz example. It's also possible to swap the first set() and the
irq() to avoid using an extra instruction, but this tutorial is a good
example of how to calculate the cycles.
Signed-off-by: Stig Bjørlykke <stig@bjorlykke.org>
The PIO state machines on the RP2040 have 4 word deep TX and RX FIFOs. If
you only need one direction, you can "merge" them into either a single 8
word deep TX or RX FIFO.
We simply add constants to the PIO object, and set the appropriate bits in
`shiftctrl`.
Resolves#6854.
Signed-off-by: Tim Radvan <tim@tjvr.org>
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>