- 19 Aug, 2021 6 commits
-
-
Jim Mussared authored
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
Hand-written version for M0, and cycle-counter version for everything else. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
This is a generic API for synchronously bit-banging data on a pin. Initially this adds a single supported encoding, which supports controlling WS2812 LEDs. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Damien George authored
The sys.stdin.buffer and sys.stdout.buffer streams work just as well (and are just as fast) as pyb.USB_VCP on stm32 devices, so there's no need to have the USB_VCP specialisation code, which just adds complexity. Also, on stm32 devices with both USB and UART (or other serial interface), if something other than the USB_VCP port is used for the serial connection then mpremote mount will not work because it will default to reading and writing on USB_VCP instead of the other connected serial stream. As part of this simplification, support for a second port as input is removed (this feature was never exposed to the user). Signed-off-by: Damien George <damien@micropython.org>
-
Jim Mussared authored
This was missed in 692d36d7. It's not strictly necessary as the GC will clean it anyway, but it's good to pre-emptively gc_free() all the blocks used in lexing/parsing. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
- 17 Aug, 2021 4 commits
-
-
Jim Mussared authored
Replace `import socket as socket` with `import socket`. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
This fixes the rendering on library/index.rst. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
Prevents the finaliser from being missed if there's a dangling reference on the stack to one of the blocks for the files (that this test checks that they get finalised). See github.com/micropython/micropython/pull/7659#issuecomment-899479793 Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
This compiler is unable to optimise out the giant strcmp match generated by MP_MATCH_COMPRESSED. See github.com/micropython/micropython/pull/7659#issuecomment-899479793 Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
- 16 Aug, 2021 3 commits
-
-
Damien George authored
Fixes issue #7631. Signed-off-by: Damien George <damien@micropython.org>
-
Jonathan Hogg authored
Release the GIL while waiting for SPI transfers to complete to allow other threads to make progress. Fixes #7662.
-
Philipp Ebensberger authored
To make machine.Signal work correctly (among other things). The solution is taken over from the rp2 port. Signed-off-by: Philipp Ebensberger
-
- 14 Aug, 2021 4 commits
-
-
Jim Mussared authored
This tests both sending indications/notifications from a server to subscribed clients via gatts_write(...,send_update=True) and subscribing from a client. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
This allows the write to trigger a notification or indication, but only to subscribed clients. This is different to gatts_notify/gatts_indicate, which will unconditionally notify/indicate. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
This implements (most of) the PEP-498 spec for f-strings and is based on https://github.com/micropython/micropython/pull/4998 by @klardotsh. It is implemented in the lexer as a syntax translation to `str.format`: f"{a}" --> "{}".format(a) It also supports: f"{a=}" --> "a={}".format(a) This is done by extracting the arguments into a temporary vstr buffer, then after the string has been tokenized, the lexer input queue is saved and the contents of the temporary vstr buffer are injected into the lexer instead. There are four main limitations: - raw f-strings (`fr` or `rf` prefixes) are not supported and will raise `SyntaxError: raw f-strings are not supported`. - literal concatenation of f-strings with adjacent strings will fail "{}" f"{a}" --> "{}{}".format(a) (str.format will incorrectly use the braces from the non-f-string) f"{a}" f"{a}" --> "{}".format(a) "{}".format(a) (cannot concatenate) - PEP-498 requires the full parser to understand the interpolated argument, however because this entirely runs in the lexer it cannot resolve nested braces in expressions like f"{'}'}" - The !r, !s, and !a conversions are not supported. Includes tests and cpydiffs. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
- 13 Aug, 2021 13 commits
-
-
Damien George authored
See issue #7480. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Which can be the case on Windows and macOS for certain serial devices. Fixes issue #7636. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
The correct callback-deregister functions must be called dependent on the socket type, otherwise resources may not be freed correctly. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Test instances can now use the following methods to synchronise their execution: multitest.broadcast("sync message") multitest.wait("sync message") Signed-off-by: Damien George <damien@micropython.org>
-
Patrick Van Oosterwijck authored
-
Daniel Mizyrycki authored
This allows nrf devices to load .mpy files. And nrf52840 and nrf9160 based boards also support compiling and loading native code.
-
Jim Mussared authored
Adds section about extending built-in modules from Python. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
Anywhere a module is mentioned, use its "non-u" name for consistency. The "import module" vs "import umodule" is something of a FAQ, and this commit intends to help clear that up. As a first approximation MicroPython is Python, and so imports should work the same as Python and use the same name, to a first approximation. The u-version of a module is a detail that can be learned later on, when the user wants to understand more and have finer control over importing. Existing Python code should just work, as much as it is possible to do that within the constraints of embedded systems, and the MicroPython documentation should match the idiomatic way to write Python code. With universal weak links for modules (via MICROPY_MODULE_WEAK_LINKS) users can consistently use "import foo" across all ports (with the exception of the minimal ports). And the ability to override/extend via "foo.py" continues to work well. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Jim Mussared authored
This is a simple rename of the files, no content changes (other than updating index.rst to use the new paths) Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Julia Hathaway authored
Includes documentation for Zephyr specific modules (zephyr and zsensor), classes (DiskAccess and FlashArea), and functions. Signed-off-by: Julia Hathaway <julia.hathaway@nxp.com>
-
Julia Hathaway authored
Includes an introduction to using the Zephyr port on MicroPython. The quickref details examples of how to use each module the port currently supports. The tutorial provides additional details for Zephyr specific modules. Signed-off-by: Julia Hathaway <julia.hathaway@nxp.com>
-
- 10 Aug, 2021 3 commits
-
-
Ned Konz authored
-
Ned Konz authored
This commit creates a new stm32 board for the NUCLEO_H743ZI2, which is the current version of this from ST. This is a modified copy of the NUCLEO_H743ZI board, and the ZI2 board differs in a few minor ways: - LED2 has moved from PB7 to PE1 and is now yellow rather than blue - the USB power enable has moved from PG6 to PG10 - the USER button is now pulled down
-
iabdalkader authored
This allows boards to add frozen modules, or bypass the port manifest entirely.
-
- 09 Aug, 2021 3 commits
-
-
Damien George authored
So that it works on ESP32C3, which has the bootloader at 0x0. Fixes issue #7565. Signed-off-by: Damien George <damien@micropython.org>
-
Daniel Mizyrycki authored
-
Glenn Ruben Bakke authored
This function can be used to enable and disable the DC/DC converter with or without the Bluetooth stack enabled. It can also be used to query the current state of the DC/DC. This commit also adds a definition of ARRAY_SIZE needed by nrfx HAL-layer.
-
- 08 Aug, 2021 4 commits
-
-
Damien George authored
This was missed in the initial implementation of the uos module. Signed-off-by: Damien George <damien@micropython.org>
-
Glenn Ruben Bakke authored
-
Glenn Ruben Bakke authored
Enable LittleFS v2 for all targets, except nrf51 targets when SoftDevice is present.
-
Glenn Ruben Bakke authored
extmod/vfs_lfs.c needs to resolve `mp_hal_time_ns()` in order to calculate a timestamp from 1970 epoch. A wall clock is not available in the nrf port, hence the function is implemented to resolve compilation linkage error. The function always return 0.
-