Pin defines are:
- For Pico define board pins and the default LED pin (WL_GPIO25).
- For Pico-W define board pins, external pins and the default
LED pin (WL_GPIO0).
- For the Nano-RP2040, define board pins, external pins and
the default LED pin (GPIO25)
- For all other boards, the pins.csv defines the LED pin (if any)
for backwards compatibility with code that assumes there's always
an LED pin.
This commit adds support for generating named pin mappings for all pins
including CPU, board-defined, LED and externally controlled pins. CPU pins
are mapped to `pin_GPIO<n>`, externally-controlled pins are mapped to
`pin_EXT_GPIO<n>`, and defined conditionally (up to 10 pins, and can be
expanded in the future), and they are non-const to allow `machine-pin.c` to
write the pin object fields. Both CPU and externally controlled pins are
generated even if there's no board CSV file; if one exists it will just be
added to board pins.
Handle externally controlled GPIO pins more generically, by removing all
CYW43-specific code from `machine_pin.c`, and adding hooks to initialise,
configure, read and write external pins. This allows any driver for an
on-board module which controls GPIO pins (such as CYW43 or NINA), to
provide its own implementation of those hooks and work seamlessly with
`machine_pin.c`.
Updates all README.md and docs, and manifests to `require("mip")`.
Also extend and improve the documentation on freezing and packaging.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
I.e. for whichever SPI/I2C instance is PICO_DEFAULT_I2C, there's no need to
set MICROPY_HW_SPIn_SCK.
The only ones remaining are for the non-default instance.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
In most cases, it's calculated automatically from the board name, and so
doesn't need to be set at all.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Changes in this commit:
- Manifest include's now use the directory path where possible (no longer
necessary to include the manifest.py file explicitly).
- Add manifest.py for all drivers and components that are referenced by
port/board manifests.
- Replace all uses of freeze() with package()/module(), except for port and
board modules.
- Use opt=3 everywhere, for consistency and to reduce code size.
- Use require() instead of include() for all micropython-lib references.
- Remove support for optional board-level manifest.py in mimxrt port, to
make it behave the same as other ports (the board must set
FROZEN_MANIFEST to a custom manifest.py, which can optionally include the
default, port-level manifest).
- Also reinstates modules that were accidentally removed from the esp8266
512k build in fbe9417b90.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Signed-off-by: Damien George <damien@micropython.org>
micropython-lib is now a submodule, and the manifest compilation process
will ensure it is available, so manifests no longer need to check that it
is available.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
The ntptime module was previously only included in the ESP8266 port. This
commit factors that module out into the extmod directory, makes it support
different epochs, and includes it in the rp2 port.
These files that are reformatted only now fall under the list of files to
apply uncrustify/black formatting to.
Signed-off-by: Damien George <damien@micropython.org>
Was incorrectly added as 7MB for an 8MB SPI flash, but this board has a
16MB chip, not 8MB, so it should be 15MB leaving 1MB for MicroPython.
Thanks to @robert-hh
This will be used by https://micropython.org/download/ to generate the
full listing of boards and firmware files.
Optionally supports a board.md for additional customisation of the
download page, as well as deploy.md for flashing instructions.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>