Wykres commitów

9 Commity (master)

Autor SHA1 Wiadomość Data
Damien George 7d28789544 ports: Use vfs module instead of os.
Signed-off-by: Damien George <damien@micropython.org>
2024-02-07 13:25:09 +11:00
Jim Mussared bbd8760bd9 all: Update Python formatting to ruff-format.
This updates a small number of files that change with ruff-format's (vs
black's) rules.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-11-03 13:30:41 +11:00
Jim Mussared 5fd042e7d1 all: Replace all uses of umodule in Python code.
Applies to drivers/examples/extmod/port-modules/tools.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-08 17:54:24 +10:00
Christian Clauss 4376c969f6 all: Fix Python comparison to None and True, and use "not in".
These are basic PEP8 recommendations.
2023-03-10 13:32:24 +11:00
iabdalkader 507ad03329 rp2: Add USB MSC support.
It is currently not enabled by default on any board.
2022-03-09 00:38:07 +11:00
oli 0a9335ecaa rp2/rp2_pio: Support exec with sideset.
The rp2.StateMachine.exec errors when supplying a sideset action.  This
commit passes the sideset_opt from the StateMachine though to the parser.
It also adds some value validation to the sideset operator.

Additionally, the "word" method is added to the exec to allow any other
unsupported opcodes.

Fixes issue #7924.
2021-11-19 13:35:28 +11:00
Tim Radvan f842a40df4 rp2/rp2_pio: Add fifo_join support for PIO.
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>
2021-04-17 00:45:38 +10:00
Tim Radvan 4f53f462ca rp2: Import uarray instead of array in rp2 module.
Some forum users noticed that `sm.exec()` took longer the more was present
on the flash filesystem connected to the RP2040.  They traced this back to
the `array` import inside `asm_pio()`, which is causing MicroPython to scan
the filesystem.

uarray is a built-in module, so importing it shouldn't require scanning the
filesystem.

We avoid moving the import to the top-level in order to keep the namespace
clean; we don't want to accidentally expose `rp2.array`.
2021-04-07 10:06:18 +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