aboutsummaryrefslogtreecommitdiff
path: root/docs
AgeCommit message (Collapse)Author
2023-11-07extmod/machine_adc_block: Factor esp32 ADCBlock bindings to common code.Damien George
This is a code factoring to have the Python bindings in one location, and all the ports use those same bindings. At this stage only esp32 implements this class, so the code for the bindings comes from that port. The documentation is also updated to reflect the esp32's behaviour of ADCBlock.connect(). Signed-off-by: Damien George <damien@micropython.org>
2023-11-06docs/samd: Fix the pinout for SAMD21 Itsy Bitsy Express M0.robert-hh
And the "Pin", "GPIO" and "Name" key explanations. Signed-off-by: robert-hh <robert@hammelrath.com>
2023-11-05docs/mimxrt: Change the examples which denote a Pin with a number.robert-hh
This option was removed in PR #12211. Signed-off-by: robert-hh <robert@hammelrath.com>
2023-11-03all: Update Python formatting to ruff-format.Jim Mussared
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-10-27docs/reference/micropython2_migration: Add migration guide.Jim Mussared
This is just scaffolding for now, but the idea is that there should be an addition to this file for every commit that uses the `MICROPY_PREVIEW_VERSION_2` macro. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-10-16docs/library/io: Remove io.FileIO and io.TextIOWrapper.Thomas Ackermann
FileIO and TextIOWrapper were removed in e65d1e69e88268145ff0e7e73240f028885915be. Remove them also from the documentation. Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
2023-10-16docs/reference/mpyfiles: Document change in .mpy sub-version.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-10-06all: Switch to new preview build versioning scheme.v1.22.0-previewJim Mussared
See https://github.com/micropython/micropython/issues/12127 for details. Previously at the point when a release is made, we update mpconfig.h and set a git tag. i.e. the version increments at the release. Now the version increments immediately after the release. The workflow is: 1. Final commit in the cycle updates mpconfig.h to set (X, Y, 0, 0) (i.e. clear the pre-release state). 2. This commit is tagged "vX.Y.0". 3. First commit for the new cycle updates mpconfig.h to set (X, Y+1, 0, 1) (i.e. increment the minor version, set the pre-release state). 4. This commit is tagged "vX.Y+1.0-preview". The idea is that a nightly build is actually a "preview" of the _next_ release. i.e. any documentation describing the current release may not actually match the nightly build. So we use "preview" as our semver pre-release identifier. Changes in this commit: - Add MICROPY_VERSION_PRERELEASE to mpconfig.h to allow indicating that this is not a release version. - Remove unused MICROPY_VERSION integer. - Append "-preview" to MICROPY_VERSION_STRING when the pre-release state is set. - Update py/makeversionhdr.py to no longer generate MICROPY_GIT_HASH. - Remove the one place MICROPY_GIT_HASH was used (it can use MICROPY_GIT_TAG instead). - Update py/makeversionhdr.py to also understand MICROPY_VERSION_PRERELEASE in mpconfig.h. - Update py/makeversionhdr.py to convert the git-describe output into semver-compatible "X.Y.Z-preview.N.gHASH". - Update autobuild.sh to generate filenames using the new scheme. - Update remove_old_firmware.py to match new scheme. - Update mpremote's pyproject.toml to handle the "-preview" suffix in the tag. setuptools_scm maps to this "rc0" to match PEP440. - Fix docs heading where it incorrectly said "vvX.Y.Z" for release docs. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-10-05docs,tools: Change remaining "urequests" references to "requests".Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-10-04extmod/modnetwork: Increase max hostname length to 32.Jim Mussared
This changes from the previous limit of 15 characters. Although DHCP and mDNS allow for up to 63, ESP32 and ESP8266 only allow 32, so this seems like a reasonable limit to enforce across all ports (and avoids wasting the additional memory). Also clarifies that `MICROPY_PY_NETWORK_HOSTNAME_MAX_LEN` does not include the null terminator (which was unclear before). This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-10-03all: Fix various spelling mistakes found by codespell 2.2.6.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-10-02docs: Add requirements.txt file with dependencies for Sphinx.Jos Verlinde
Signed-off-by: Jos Verlinde <Jos.Verlinde@Microsoft.com>
2023-09-29tools/mpremote: Add support for rfc2217, serial over TCP.Jos Verlinde
Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
2023-09-18docs/conf.py: Add sphinxcontrib.jquery to extensions.Damien George
This is needed by recent versions of sphinx-rtd-theme. Signed-off-by: Damien George <damien@micropython.org>
2023-09-15docs/library/gc: Clarify mem_alloc and mem_free only for Python heap.Angus Gratton
As raised in discussions of the ESP32 memory management changes. Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-09-15docs/library/esp32: Update ESP32 idf_heap_info docs to match behaviour.Angus Gratton
Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-09-05esp32: Skip validation of image on boot from deepsleep.Glenn Moloney
sdkconfig.base: Add CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP=y. This reduces time to boot from deepsleep by at least 200ms and can provide significant power savings for deepsleep-based battery applications. docs/library/esp32.rst: Add note cautioning not to enter deepsleep after changing the boot partition, without first performing a hard reset. Signed-off-by: Glenn Moloney <glenn.moloney@gmail.com>
2023-09-04docs/esp32/tutorial: Add example for pin access via registers.IhorNehrutsa
Synchronous access to pins directly via registers. Signed-off-by: Ihor Nehrutsa <Ihor.Nehrutsa@gmail.com>
2023-09-04docs/library/network: Clarify network.hostname() behaviour.Jim Mussared
This must be called before the interface connects. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-09-04docs/library/platform: Add docs for the platform library.Francis Dela Cruz
Signed-off-by: Francis Dela Cruz <rainyworlds1@outlook.com>
2023-09-01docs/library/neopixel: Change link to a micropython-lib reference.Andy Piper
Signed-off-by: Andy Piper <andypiperuk@gmail.com>
2023-09-01extmod/moddeflate: Change default window size.Jim Mussared
The primary purpose of this commit is to make decompress default to wbits=15 when the format is gzip (or auto format with gzip detected). The idea is that someone decompressing a gzip stream should be able to use the default `deflate.DeflateIO(f)` and it will "just work" for any input stream, even though it uses a lot of memory. This is done by making uzlib report gzip files as having wbits set to 15 in their header (where it previously only set the wbits out parameter for zlib files), and then fixing up the logic in `deflateio_init_read`. Updates the documentation to match. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-08-23stm32/subghz: Add STM32WL55 subghz radio interface to stm module.Angus Gratton
This is the minimum C interface to allow a modem driver to be built in Python. Interface is simple, with the intention that the micropython-lib driver is the main (only) consumer of it. Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-08-15esp32: Enable automatic Python heap growth.Angus Gratton
Via MICROPY_GC_SPLIT_HEAP_AUTO feature flag added in previous commit. Tested on ESP32 GENERIC_SPIRAM and GENERIC_S3 configurations, with some worst-case allocation patterns and the standard test suite. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-08-05docs/develop/gettingstarted: Update ARM package list.Elecia White
Signed-off-by: Elecia White <elecia@logicalelegance.com>
2023-08-04docs/develop/gettingstarted: Clarify submodule initialization.Rene Straub
When building for a specific board this must be specified in make submodules. I.e. make BOARD=STM32F769DISC submodules. Signed-off-by: Rene Straub <rene@see5.ch>
2023-07-21docs/library/deflate: Add docs for deflate.DeflateIO.Jim Mussared
Also update zlib & gzip docs to describe the micropython-lib modules. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-13docs/esp32/quickref: Add LAN example for WT32-ETH01 version 1.4.Elvis Pfutzenreuter
This board requires slightly different configuration to work. It is important to hard reset (cycle power) if you try to initialize LAN and it fails, before trying again with new parameters. Discussion: https://github.com/orgs/micropython/discussions/11446 AliExpress purchase link: https://pt.aliexpress.com/item/1005002023196214.html Signed-off-by: Elvis Pfutzenreuter <epxx@epxx.co>
2023-06-26docs/library/ssl: Add documentation for SSLContext.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-23docs/esp32: Update esp32 docs based on IDF v5 changes.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-19docs: Rename uasyncio to asyncio.Jim Mussared
This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-08docs/library/index: Update docs after umodule rename.Jim Mussared
- Update guide for extending built-in modules. - Remove any last trace of umodule in other docs. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-08all: Rename UMODULE to MODULE in preprocessor/Makefile vars.Jim Mussared
This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-08py/builtinimport: Remove weak links.Jim Mussared
In order to keep "import umodule" working, the existing mechanism is replaced with a simple fallback to drop the "u". This makes importing of built-ins no longer touch the filesystem, which makes a typical built-in import take ~0.15ms rather than 3-5ms. (Weak links were added in c14a81662c1df812c0c6b4299f97966302f16477) This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-06samd/boards: Rename flash pins consistently for QSPI and SPI.robert-hh
For SAMD21 devices, the board flash signals must be named in pins.csv as FLASH_MOSI, FLASH_MISO, FLASH_SCK, FLASH_CS for creating the SPI object. And rename the QSPI pins to QSPI_xxxx instead of FLASH_xxx. Signed-off-by: robert-hh <robert@hammelrath.com>
2023-06-02docs/reference/mpremote.rst: Extend the mpremote guide.Jim Mussared
Changes in this commit: - Add a extra detail to each of the commands. - Add more about handling options and arguments. - Include shortcut commands that behave like real commands to the command list (e.g. bootloader, rtc). - Add extra information and reword to address common misconceptions, in particular how commands chain together. - Add additional examples showing some more interesting combinations. - Add descriptions to each of the examples. - Add pipx installation instructions. - Describe how user-configuration works. This work was sponsored by Google Season of Docs. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-02docs/reference/packages: Add GitHub repo to package example dependency.Jonas Scharpf
Signed-off-by: Jonas Scharpf <jonas@brainelectronics.de>
2023-06-01docs/library/index: Update built-in extension docs.Jim Mussared
- Make the docs match the new behavior which only allows certain modules to be extended. - List the modules that currently have the u-prefix. - Add a note about the sys.path method for forcing a built-in import. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-01docs/samd: Add the pin-out for the Adafruit Metro M4 Airlift board.robert-hh
Signed-off-by: robert-hh <robert@hammelrath.com>
2023-06-01docs/mimxrt: Add the pin-out for the Adafruit Metro M7 board.robert-hh
Signed-off-by: robert-hh <robert@hammelrath.com>
2023-05-23docs/reference/speed_python: Remove 4-arg limit for viper.Jim Mussared
This limit was removed in a676b5acf6ee9c17926cf9786370d30a077d99c0. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-05-23samd/machine_uart: Add support for UART hardware flow control.robert-hh
By specifying rts=pin(x) and/or cts=Pin(x) in the constructor. The pad numbers for the UART pins are fix in this case: TX must be at pad 0, RX at pad 1, RTS at pad 2 and CTS at pad 3. repr(uart) shows the pin names for rts and cts, if set. In case of a RX overflow, the rx interrupt will be disabled instead of just discarding the data. That allows RTS to act. If RTS is inactive, still 2 bytes can be buffered in the FIFO. Signed-off-by: robert-hh <robert@hammelrath.com>
2023-05-22tools/mpremote: Add repl option to escape non-printable characters.Damien George
This commit adds the "--escape-non-printable" option to the repl command. When specified the REPL console will escape non-printable characters, printing them as their hex value in square brackets. This escaping behaviour was previously the default and only behaviour, but it is now opt-in. As part of this change, the speed of echoing device data to the console is improved by by reading and writing in chunks. Signed-off-by: Damien George <damien@micropython.org>
2023-05-19esp32/esp32_ulp: Enable FSM ULP for S2 and S3 chips.patrick
This commit enables the ULP for the S2 and S3 chips. Note this is the FSM (Finite State Machine) ULP. Signed-off-by: Patrick Joy <patrick@joytech.com.au>
2023-05-19docs/develop/porting: Add missing code to example main.c and Makefile.marble
These two missing lines caused the build process to fail when implementing the tutorial example port. Signed-off-by: marble <git@computer-in.love>
2023-05-19docs/library/espnow: Update espnow docs for WLAN.config(pm=x) options.glenn20
Update docs/library/espnow.rst to add: - guidance on using WLAN.config(pm=WLAN.PM_NONE) for reliable espnow performance while also connected to a wifi access point; - guidance on receiving encrypted messages; - correction for default value of "encrypt" parameter (add_peer()); - guidance on use of ESPNow.irq(): recommand users readout all messages in the buffer each time the callback is called. Signed-off-by: Glenn Moloney <glenn.moloney@gmail.com>
2023-05-18rp2: Make rp2_state_machine_exec accept integers.Adam Green
Currently rp2.StateMachine.exec(instr_in) requires that the instr_in parameter be a string representing the PIO assembly language instruction to be encoded by rp2.asm_pio_encode(). This commit allows the parameter to also be of integral type. This is useful if the exec() method is being called often where the use of pre-encoded machine code is desireable. This commit still supports calls like: sm.exec("set(0, 1)") It also now supports calls like: # Performed once earlier, maybe in __init__() assembled_instr = rp2.asm_pio_encode("out(y, 8)", 0) # Performed multiple times later as the PIO state machine is # configured for its next run. sm.exec(assembled_instr) The existing examples/rp2/pio_exec.py and examples/rp2/pio_pwm.py that exercise the rp2.StateMachine.exec() method still work with this change. Signed-off-by: Adam Green <adamgrym@yahoo.com>
2023-05-11docs/reference/mpyfiles: Add release info on v6.1.David Lechner
This documents when MPY v6.1 was released. Also add some clarification on how the version is encoded in the header. Signed-off-by: David Lechner <david@pybricks.com>
2023-05-06esp32,esp8266: Add support to set/get power saving mode of WLAN.glenn20
For esp32 and esp8266 this commit adds: - a 'pm' option to WLAN.config() to set/get the wifi power saving mode; and - PM_NONE, PM_PERFORMANCE and PM_POWERSAVE constants to the WLAN class. This API should be general enough to use with all WLAN drivers. Documentation is also added.
2023-05-04docs/samd: Make use of pin names more consistent in examples.robert-hh
This keeps up with the changed Pin naming scheme.