- 26 Jul, 2020 2 commits
-
-
Damien George authored
These tests are specific to MicroPython so have a better home in the micropython/ test subdir, and putting them here allows them to be run by all targets, not just those that have access to the local filesystem (eg the unix port). Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
To make this code more portable, across different platforms. Signed-off-by: Damien George <damien@micropython.org>
-
- 25 Jul, 2020 1 commit
-
-
Damien George authored
It raises on EOFError instead of an IncompleteReadError (which is what CPython does). But the latter is derived from EOFError so code compatible with MicroPython and CPython can be written by catching EOFError (eg see included test). Fixes issue #6156. Signed-off-by: Damien George <damien@micropython.org>
-
- 24 Jul, 2020 6 commits
-
-
Damien George authored
The SCSI driver calls GetCapacity to get the block size and number of blocks of the underlying block-device/LUN. It caches these values and uses them later on to verify that reads/writes are within the bounds of the LUN. But, prior to this commit, there was only one set of cached values for all LUNs, so the bounds checking for a LUN could use incorrect values, values from one of the other LUNs that most recently updated the cached values. This would lead to failed SCSI requests. This commit fixes this issue by having separate cached values for each LUN. Signed-off-by: Damien George <damien@micropython.org>
-
Jonathan Hogg authored
MicroPython's original implementation of __aiter__ was correct for an earlier (provisional) version of PEP492 (CPython 3.5), where __aiter__ was an async-def function. But that changed in the final version of PEP492 (in CPython 3.5.2) where the function was changed to a normal one. See https://www.python.org/dev/peps/pep-0492/#why-aiter-does-not-return-an-awaitable See also the note at the end of this subsection in the docs: https://docs.python.org/3.5/reference/datamodel.html#asynchronous-iterators And for completeness the BPO: https://bugs.python.org/issue27243 To be consistent with the Python spec as it stands today (and now that PEP492 is final) this commit changes MicroPython's behaviour to match CPython: __aiter__ should return an async-iterable object, but is not itself awaitable. The relevant tests are updated to match. See #6267.
-
Josh Lloyd authored
Also remove trailing spaces on other lines.
-
Howard Lovatt authored
On original pyboard UART 5 isn't available; added pyboard D availability.
-
Howard Lovatt authored
-
Howard Lovatt authored
-
- 22 Jul, 2020 3 commits
-
-
Glenn Ruben Bakke authored
Enabling the following features for all targets, except for nrf51 targets compiled to be used with SoftDevice: - MICROPY_PY_ARRAY_SLICE_ASSIGN - MICROPY_PY_SYS_STDFILES - MICROPY_PY_UBINASCII
-
Glenn Ruben Bakke authored
Splitting mpconfigport.h into multiple device specific files in order to facilitate variations between devices. Due to the fact that the devices might have variations in features and also variations in flash size it makes sense that some devices offers more functionality than others without being limited by restricted devices. For example more micropython features can be activated for nrf52840 with 1MB flash, compared to nrf51 with 256KB.
-
Damien George authored
Fixing 98e58343, the semantics of strncpy require that the remainder of dst be filled with null bytes. Signed-off-by: Damien George <damien@micropython.org>
-
- 21 Jul, 2020 1 commit
-
-
Zoltán Vörös authored
This code is imported from musl, to match existing code in libm_dbl. The file is also added to the build in stm32/Makefile. It's not needed by the core code but, similar to c5cc6417, allows round() to be used by user C modules or board extensions.
-
- 20 Jul, 2020 14 commits
-
-
Damien George authored
Because the argument arrays may overlap, as show by the new tests in this commit. Also remove the debugging comments for these macros, add a new comment about overlapping regions, and separate the macros by blank lines to make them easier to read. Fixes issue #6244. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Changes in this new library version are: - Update H7 HAL to v1.6.0. - Update WB HAL to v1.6.0. - Add patches to fix F4 ll_uart clock selection for UART9/UART10. Signed-off-by: Damien George <damien@micropython.org>
-
Kenneth Ryerson authored
Signed-off-by: Kenneth Ryerson <kenneth.ryerson@gmail.com>
-
Jonathan Hogg authored
This explains how looping now works, and removes the warning about calling wait_done().
-
Jonathan Hogg authored
A previous commit 3a9d9480 can cause lock-ups of the RMT driver, so this commit reverses that, adds a loop_en flag, and explicitly controls the TX interrupt in write_pulses(). This provides correct looping, non-blocking writes and sensible behaviour for wait_done(). See also #6167.
-
Thorsten von Eicken authored
The stm32 and esp32 ports now use shorter error strings for mbedtls errors. Also, MBEDTLS_ERROR_C is enabled on stm32 by default to get these strings.
-
Thorsten von Eicken authored
The file `mbedtls_errors/mp_mbedtls_errors.c` can be used instead of `mbedtls/library/error.c` to give shorter error strings, reducing the build size of the error strings from about 12-16kB down to about 2-5kB.
-
Thorsten von Eicken authored
-
Thorsten von Eicken authored
This commit adds human readable error messages when mbedtls or axtls raise an exception. Currently often just an EIO error is raised so the user is lost and can't tell whether it's a cert error, buffer overrun, connecting to a non-ssl port, etc. The axtls and mbedtls error raising in the ussl module is modified to raise: OSError(-err_num, "error string") For axtls a small error table of strings is added and used for the second argument of the OSErrer. For mbedtls the code uses mbedtls' built-in strerror function, and if there is an out of memory condition it just produces OSError(-err_num). Producing the error string for mbedtls is conditional on them being included in the mbedtls build, via MBEDTLS_ERROR_C.
-
Jim Mussared authored
-
Jim Mussared authored
This commit adds the IRQ_GATTS_INDICATE_DONE BLE event which will be raised with the status of gatts_indicate (unlike notify, indications require acknowledgement). An example of its use is added to ble_temperature.py, and to the multitests in ble_characteristic.py. Implemented for btstack and nimble bindings, tested in both directions between unix/btstack and pybd/nimble.
-
Jim Mussared authored
-
Jim Mussared authored
-
- 18 Jul, 2020 5 commits
-
-
Jim Mussared authored
Also clarify behavior of `gatts_notify` and add some TODOs about adding an event for indication acknowledgement.
-
Jim Mussared authored
-
Jim Mussared authored
The goal of this commit is to allow using ble.gatts_notify() at any time, even if the stack is not ready to send the notification right now. It also addresses the same issue for ble.gatts_indicate() and ble.gattc_write() (without response). In addition this commit fixes the case where the buffer passed to write-with-response wasn't copied, meaning it could be modified by the caller, affecting the in-progress write. The changes are: - gatts_notify/indicate will now run in the background if the ACL buffer is currently full, meaning that notify/indicate can be called at any time. - gattc_write(mode=0) (no response) will now allow for one outstanding write. - gattc_write(mode=1) (with response) will now copy the buffer so that it can't be modified by the caller while the write is in progress. All four paths also now track the buffer while the operation is in progress, which prevents the GC free'ing the buffer while it's still needed.
-
Jim Mussared authored
-
Jim Mussared authored
This mutex is used to make the unix port behave more like bare metal, i.e. it allows "IRQ handlers" to run exclusively by making the mutex recursive.
-
- 17 Jul, 2020 1 commit
-
-
Glenn Ruben Bakke authored
It might compile fine with S132 as SoftDevice for nRF52840. However, there might be different hardware on the SoC which in turn could make it fail. SoftDevice S140 is correct BLE stack for nRF52840 SoC and would provide a more accurate test build.
-
- 16 Jul, 2020 5 commits
-
-
Matt Trentini authored
-
Glenn Ruben Bakke authored
-
Glenn Ruben Bakke authored
Update toolchain to GNU Arm Embedded Toolchain.
-
Glenn Ruben Bakke authored
Resolves dependencies for MICROPY_PY_TIME_TICKS which requires to link against nrfx_rtc.c functions by setting MICROPY_PY_MACHINE_RTCOUNTER to 1.
-
Glenn Ruben Bakke authored
nRF9160 does not have any RTC2. Disable the configuration in case of NRF9160_XXAA.
-
- 10 Jul, 2020 1 commit
-
-
Alex Tsamakos authored
Example make command: make BOARD=actinius_icarus
-
- 09 Jul, 2020 1 commit
-
-
Thomas Friebel authored
In case of error, NimBLE calls the read callback with attr = NULL.
-