* Make SDRAM test cache-aware for newer MCUs.
* Use the defined data bus width (instead of the fixed 8-bits).
* Allow optional failure on error with verbose error messages.
* Test speed is now inverted (test accepts exhaustive instead fast).
This helps the OS switch to and give other threads processing time during
the sleep. It also ensures that pending events are handled, even when
sleeping for 0ms.
Fixes issue #5344.
Signed-off-by: Damien George <damien@micropython.org>
Call MICROPY_EVENT_POLL_HOOK even on very short delays so that busy loops
that call sleep_ms still yield to events and other threads.
See related issue #5344.
Replace "master" with "controller" and "slave" with "peripheral" in
comments, errors, and debug messages.
Add CONTROLLER and PERIPHERAL constants to pyb.SPI and pyb.I2C classes;
retain MASTER and SLAVE constants for backward compatiblity.
In 2ae3c890bd, -Wimplicit-fallthrough=0 was
added to get the build to pass. This option is equivalent to
-Wno-implicit-fallthrough, and the latter is compatible with clang (while
the former is not).
Fixes issue #7546.
Signed-off-by: Damien George <damien@micropython.org>
A correctly-behaved application shouldn't do this, but in the
case where the channel is stalled, there's still enough room
in the mbuf pool, then we'll fail the send (BLE_HS_EBUSY) so
the mbuf needs to be freed.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This adds #if MICROPY_PY_USELECT_SELECT around the uselect.select()
function. According to the docs, this function is only for CPython
compatibility and should not normally be used. So we can disable it
and save a few bytes of flash space where possible.
Signed-off-by: David Lechner <david@pybricks.com>
Using a 2-item transaction queue instead of 1 allows long transfers to
be executed with the minimum inter-transaction delay. Limit maximum
transaction length to ensure an integer multiple of the SPI `bits`
setting are transferred. Fixes#7511.
The MP_OBJ_STOP_ITERATION optimisation is a shortcut for creating a
StopIteration() exception object, and means that heap memory does not need
to be allocated for the exception (in cases where it can be used). This
commit allows this optimised object to take an optional argument (before,
it could only have no argument).
The commit also adds some new tests to cover corner cases with
StopIteration and generators that previously did not work.
Signed-off-by: Damien George <damien@micropython.org>
MicroPython implements some 3.5+ features, and this change helps to reduce
the need for some .exp files in the test suite.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit moves all first-party code developed for this project from lib/
to shared/, so that lib/ now only contains third-party code.
The following directories are moved as-is from lib to shared:
lib/libc -> shared/libc
lib/memzip -> shared/memzip
lib/netutils -> shared/netutils
lib/timeutils -> shared/timeutils
lib/upytesthelper -> shared/upytesthelper
All files in lib/embed/ have been moved to shared/libc/.
lib/mp-readline has been moved to shared/readline.
lib/utils has been moved to shared/runtime, with the exception of
lib/utils/printf.c which has been moved to shared/libc/printf.c.
Signed-off-by: Damien George <damien@micropython.org>