- May 18, 2018
-
-
Li Weiwei authored
Before this patch: >>> print(') ... ') Traceback (most recent call last): File "<stdin>", line 1 SyntaxError: invalid syntax After this patch: >>> print(') Traceback (most recent call last): File "<stdin>", line 1 SyntaxError: invalid syntax This matches CPython and prevents getting stuck in REPL continuation when a 1-quote is unmatched.
-
Damien George authored
Before this patch, when using the switch statement for dispatch in the VM (not computed goto) a pending exception check was done after each opcode. This is not necessary and this patch makes the pending exception check only happen when explicitly requested by certain opcodes, like jump. This improves performance of the VM by about 2.5% when using the switch.
-
Damien George authored
-
- May 17, 2018
-
-
Damien George authored
I2C costs about 3000 bytes of code, and SPI costs about 4400 bytes.
-
Damien George authored
This matches CPython behaviour on Linux: a socket that is new and not listening or connected is considered "hung up". Thanks to @rkojedzinszky for the initial patch, PR #3457.
-
Damien George authored
Instead of crashing due to out-of-bounds array access. Fixes #3348.
-
Damien George authored
Instead of crashing due to NULL pointer dereference. Fixes issue #3341.
-
Damien George authored
To make it easier/simpler to write code that can run under both CPython and on an ESP8266 board.
-
Damien George authored
-
Damien George authored
lwIP v2.0.3 has been tested with this lwip module and it works very well.
-
Tom Collins authored
This patch fixes the macro so you can pass any name in, and the macro will make more sense if you're reading it on its own. It worked previously because n_state is always passed in as n_state_out_var.
-
- May 16, 2018
-
-
Damien George authored
Having balanced braces { and } makes it easier to navigate the function.
-
Ryan Shaw authored
-
- May 15, 2018
-
-
Damien George authored
WIFI_MODE_NULL is no longer supported by the ESP IDF, instead one must use esp_wifi_start/esp_wifi_stop.
-
Damien George authored
gcc 8.0 supports the naked attribute for x86 systems so it can now be used here. And in fact it is necessary to use this for nlr_push because gcc 8.0 no longer generates a prelude for this function (even without the naked attribute).
-
- May 14, 2018
-
-
Damien George authored
Some compilers cannot deduce that cdc will always be written before being used.
-
Damien George authored
This patch adds the configuration MICROPY_HW_USB_ENABLE_CDC2 which enables a new USB device configuration at runtime: VCP+VCP+MSC. It will give two independent VCP interfaces available via pyb.USB_VCP(0) and pyb.USB_VCP(1). The first one is the usual one and has the REPL on it. The second one is available for general use. This configuration is disabled by default because if the mode is not used then it takes up about 2200 bytes of RAM. Also, F4 MCUs can't support this mode on their USB FS peripheral (eg PYBv1.x) because they don't have enough endpoints. The USB HS peripheral of an F4 supports it, as well as both the USB FS and USB HS peripherals of F7 MCUs.
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
The documentation (including the examples) for elapsed_millis and elapsed_micros can be found in docs/library/pyb.rst so doesn't need to be written in full in the source code.
-
Damien George authored
When disabled, the pyb.I2C class saves around 8k of code space and 172 bytes of RAM. The same functionality is now available in machine.I2C (for F4 and F7 MCUs). It is still enabled by default.
-
Damien George authored
This is enabled by default. When it is disabled all legacy functions and classes in the pyb module are excluded from the build.
-
Damien George authored
-
Damien George authored
And remove the old one based on ST code.
-
Damien George authored
This driver uses low-level register access to control the I2C peripheral (ie it doesn't rely on the ST HAL) and provides the same C-level API as the existing F7 hardware driver.
-
Peter D. Gray authored
The USB IRQ may fire once USBD_HID_ClearNAK() is called and then change the last_read_len value.
-
Peter D. Gray authored
USB_HID.send() should now return 0 if it could not send the report to the host.
-
Bas Wijnen authored
- Updated supported git hash to current IDF version. - Added missing targets and includes to Makefile. - Updated error codes for networking module. - Added required constant to sdkconfig configuration.
-
- May 13, 2018
-
-
Damien George authored
This patch moves the start of the root pointer section in mp_state_ctx_t so that it skips entries that are not pointers and don't need scanning. Previously, the start of the root pointer section was at the very beginning of the mp_state_ctx_t struct (which is the beginning of mp_state_thread_t). This was the original assembler version of the NLR code was hard-coded to have the nlr_top pointer at the start of this state structure. But now that the NLR code is partially written in C there is no longer this restriction on the location of nlr_top (and a comment to this effect has been removed in this patch). So now the root pointer section starts part way through the mp_state_thread_t structure, after the entries which are not root pointers. This patch also moves the non-pointer entries for MICROPY_ENABLE_SCHEDULER outside the root pointer section. Moving non-pointer entries out of the root pointer section helps to make the GC more precise and should help to prevent some cases of collectable garbage being kept. This patch also has a measurable improvement in performance of the pystone.py benchmark: on unix x86-64 and stm32 there was an improvement of roughly 0.6% (tested with both gcc 7.3 and gcc 8.1).
-
- May 11, 2018
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
Also remove trailing whitespace and convert tabs to spaces.
-
Damien George authored
This patch is only cosmetic and has no functional change.
-
Damien George authored
-
Damien George authored
This patch changes 2 things in the endianness detection: 1. Don't assume that __BYTE_ORDER__ not being __ORDER_LITTLE_ENDIAN__ means that the machine is big endian, so add an explicit check that this macro is indeed __ORDER_BIG_ENDIAN__ (same with __BYTE_ORDER, __LITTLE_ENDIAN and __BIG_ENDIAN). A machine could have PDP endianness. 2. Remove the checks which base their autodetection decision on whether any little or big endian macros are defined (eg __LITTLE_ENDIAN__ or __BIG_ENDIAN__). Just because a system defines these does not mean it has that endianness. See issue #3760.
-
Damien George authored
These special methods are all available if MICROPY_PY_ALL_SPECIAL_METHODS is enabled.
-