- 22 May, 2024 1 commit
-
-
Damien George authored
So it's possible to know when an external C function is being called at the top-level, eg by JavaScript without any intermediate C->JS->C calls. Signed-off-by: Damien George <damien@micropython.org>
-
- 21 May, 2024 2 commits
-
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
So that there is a one-to-one correspondence between js_ref and JsProxy objects. Signed-off-by: Damien George <damien@micropython.org>
-
- 16 May, 2024 4 commits
-
-
Damien George authored
Instead of raising KeyError. These semantics match JavaScript behaviour and make it much more seamless to pass Python dicts through to JavaScript as though they were JavaScript {} objects. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
This adds a new undefined singleton to Python, that corresponds directly to JavaScript `undefined`. It's accessible via `js.undefined`. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
This reverts part of commit fa23e4b0, to make it so that Python `None` converts to JavaScript `null` (and JavaScript `null` already converts to Python `None`). That's consistent with how the `json` module converts these values back and forth. Signed-off-by: Damien George <damien@micropython.org>
-
Daniël van de Giessen authored
When a fatal error occurs it's important to know which precise version it occurred on in order to be able to decode the crash dump information such as the backtrace. By wrapping around the built-in IDF panic handler we can print some extra information whenever a fatal error occurs. The message links to a new wiki page which contains additional information on how to debug ESP32 issues, and links to the bug reporting issue template. Signed-off-by: Daniël van de Giessen <daniel@dvdgiessen.nl>
-
- 15 May, 2024 5 commits
-
-
Angus Gratton authored
Fixes automatic baudrate calculation results. Default clock source on this SoC is HSE not PCLK1. We could fix this by switching to PCLK1 instead, but two extra complications: - PCLK1 on this board is a 42.5MHz and the Pyboard CAN sample_point calculation requires an exact match, which is harder to hit with this source frequency. - Would be a breaking change for any existing Python code on this board, i.e. specifying brp, bs1, bs2 to initialise CAN. In the future it might be worth looking switching to the PLL source on this SoC instead, as this is a much higher frequency that would give higher quality BRS bitrate matches (probably too high without using the second divider going into the CAN peripheral though, so more code changes needed also). This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
-
Angus Gratton authored
If someone starts from this directory then they won't know they exist, otherwise. Signed-off-by: Angus Gratton <angus@redyak.com.au>
-
Damien George authored
ThreadSafeFlag works on the unix port since commit df08c38c. Signed-off-by: Damien George <damien@micropython.org>
-
Olivier Lenoir authored
Signed-off-by: Olivier Lenoir <olivier.len02@gmail.com>
-
Olivier Lenoir authored
Changes are: - main.py: Add gitlab:org/repo, gitlab:org/repo@branch. - mip.py: Implement install from GitLab. - README.md: Add mip install gitlab:org/repo@branch example. Signed-off-by: Olivier Lenoir <olivier.len02@gmail.com>
-
- 14 May, 2024 2 commits
-
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
- 13 May, 2024 8 commits
-
-
Damien George authored
And change Py None conversion so it converts to JS undefined. The semantics for conversion of these objects are then: - Python None -> JavaScript undefined - JavaScript undefined -> Python None - JavaScript null -> Python None This follows Pyodide: https://pyodide.org/en/stable/usage/type-conversions.htmlSigned-off-by: Damien George <damien@micropython.org>
-
Damien George authored
This commit defines a new `JsException` exception type which is used on the Python side to wrap JavaScript errors. That's then used when a JavaScript Promise is rejected, and the reason is then converted to a `JsException` for the Python side to handle. This new exception is exposed as `jsffi.JsException`. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Non-blocking SSL streams can be difficult to get right, so provide a working example, of a HTTPS client. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
It's better for discoverability to have these examples named `https_xxx.py` rather than `http_xxx_ssl.py`. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
- 09 May, 2024 2 commits
-
-
Angus Gratton authored
Also fix a small typo. Signed-off-by: Angus Gratton <angus@redyak.com.au>
-
Angus Gratton authored
Only when dynamic USB devices are enabled. The issue here is that when the USB reset triggers, the dynamic USB device reset callback is called from inside the TinyUSB task. If that callback tries to print something then it'll call through to tud_cdc_write_flush(), but TinyUSB hasn't finished updating state yet to know it's no longer configured. Subsequently it may try to queue a transfer and then the low-level DCD layer panics. By explicitly stalling the endpoint first, usbd_edpt_claim() will fail and tud_cdc_write_flush() returns immediately. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
-
- 07 May, 2024 4 commits
-
-
Jared Hancock authored
The W5100 and W5100S only have 4 available sockets and 16kB of socket buffer. Allocating 16kB to either the receive or transmit buffer of a single socket is not allowed, so the current setup does not change the allocation for socket 0 from the reset default. ctlwizchip is returning -1 to indicate the error, but the response isn't being inspected and probably doesn't need to be. Signed-off-by: Jared Hancock <jared@greezybacon.me>
-
Rick Sorensen authored
For ESP32C3/S2/S3 IDFv5 exposes new internal temperature API which is different to the base ESP32, IDFv4. Thanks to @robert-hh for cleaner code and testing sensor capability in these devices. See discussion #10443. Signed-off-by: Rick Sorensen <rick.sorensen@gmail.com>
-
Rick Sorensen authored
Signed-off-by: Rick Sorensen <rick.sorensen@gmail.com>
-
Damien George authored
JavaScript semantics are such that the caller of an async function does not need to await that function for it to run to completion. This commit makes that behaviour also apply to top-level async Python code run via `runPythonAsync()`. Signed-off-by: Damien George <damien@micropython.org>
-
- 06 May, 2024 5 commits
-
-
Damien George authored
This allows using JavaScript for..of on Python iterables. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
To improve efficiency. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
The `reason` in a rejected promise should be an instance of `Error`. That leads to better error messages on the JavaScript side. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Fixes issue #14363. Signed-off-by: Damien George <damien@micropython.org>
-
- 03 May, 2024 1 commit
-
-
Damien George authored
This was broken by 5aec051f when adding support for I2C4 on H7 MCUs. Signed-off-by: Damien George <damien@micropython.org>
-
- 01 May, 2024 4 commits
-
-
Damien George authored
Different MCUs have different requirements for the minimum number of bytes that can be written to internal flash. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
The calculations `num_word32 / 4` and `num_word32 / 8` were rounding down the number of words to program to flash, and therefore possibly truncating the data (eg mboot could miss writing the final few words of the firmware). That's fixed in this commit by adding extra logic to program any remaining words. And the logic for H5 and H7 is combined. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Following change in 899592acSigned-off-by: Damien George <damien@micropython.org>
-
Damien George authored
In case there is a power failure after during this operation, the key must be the last thing that is written, to indicate valid data. Signed-off-by: Damien George <damien@micropython.org>
-
- 28 Apr, 2024 1 commit
-
-
Matt Trentini authored
Signed-off-by: Matt Trentini <matt.trentini@gmail.com>
-
- 26 Apr, 2024 1 commit
-
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-