Tell the compiler we know what we are doing, and that the bytes are
correctly aligned, to avoid compiler warning:
error: cast increases required alignment of target type
Previously the only other way of determining whether the Vfs has been mounted
read-write or read-only appears to be to attempt a write operation and detect a
possible OSError.
It wasn't possible for the user code to keep track of the state of the state
since the boot VM has to decide whether to (re)mount read-write or read-only,
but can't (easily) pass this information on to the runtime VM.
supervisor_ticks_ms is ALREADY a small int, so passing it to
MP_OBJ_SMALL_INT again messes things up. I don't know why this passed
muster with the C type system, but oh well.
A task that has been sent to the loop's exception handler due to being
re-scheduled twice will then subsequently cause a `raise None` if it is
subsequently awaited. In the C version of task.py, this causes a segfault.
This makes the await succeed (via raising StopIteration instead).
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
.. since Adafruit_CircuitPython_asyncio is hard-coded to this _TICKS_PERIOD
not the one that would otherwise be used on Unix
This fixes all the uasyncio test failures on Unix
We adopted the file "py/ioctl.h" and the ioctl names beginning
with MP_IOCTL_POLL while micropython went with "py/stream.h" and
MP_STREAM_POLL.
Align with upstream.
Closes#6711
When MICROPY_PY_MACHINE_I2C_TRANSFER_WRITE1 is enabled the port's hardware
I2C transfer functions should support the MP_MACHINE_I2C_FLAG_WRITE1
option, but software I2C will not. So add a flag to the I2C protocol
struct so each individual protocol can indicate whether it supports this
option or not.
Fixes issue #8765.
Signed-off-by: Damien George <damien@micropython.org>
* The mbedtls config file path is hard-coded to the config file in
the stm32 port. Any port using this cmake fragment is not actually
using its own config file.
Otherwise include directories are added unconditionally to the build
variables if the component (submodule) is checked out. This can lead to,
eg, the esp32 build using lib/lwip header files, instead of lwip header
files from the IDF.
Fixes issue #8727.
Signed-off-by: Damien George <damien@micropython.org>
Otherwise this is essentially an infinite loop on ports that do not use
interrupts to service network interfaces.
Signed-off-by: Andrew Leech <andrew@alelec.net>