Some serial sources clear their RX buffers and others didn't. This
cause CP to skip into the REPL based on characters typed before the
CTRL-C. The serial file transfer code looks for "press any key"
which is skipped in this case.
Fixes https://github.com/circuitpython/web-editor/issues/238
Espressif's Characteristics allocate memory that may be on the
supervisor heap. We need to free it when stopping BLE workflow.
Otherwise, we leak the memory and eventually safe mode.
Fixes#9599
The Funhouse problem was due to a locking change for SPI. The
Funhouse is one of a few boards with DotStar status LEDs that use
SPI and have this bug.
I thought it might be IDF related so I updated it first. :-)
Fixes#9486
In 9.0.x, serial_bytes_available returned a bool and tud_cdc_available was
harmlessly checked twice for any characters.
When the routine was changed to return an int, the double checking led to
over-reporting the number of characters available. In code that would attempt
to read this many bytes from sys.stdin, this made the read call block since
only 1 byte was actually available.
This behavior came up in the discussion of #9393. I don't mark this bug as
closing that one, because that issue seems to be reporting multiple things that
this change would not address, such as delays in `sys.stdout.write()` or
problems seen while using webserial.
The previous implementation would always start BLE and rely on
advertising logic to make the workflow not available when on USB.
This change removes the "always enable" call in favor of a default
value that is on if 1) we determine we should be discoverable or 2)
we're already bonded over BLE.
This runs in the Renode simulator and enables easier tracing and
debugging of the CircuitPython core. This port can also serve as
a starting point for new ports because it implements the minimal
necessary for the CP core to run.
It is enabled on:
* SAMD51 boards with 1MB flash (SKU ending in 20A)
* Feather RP2040 DVI. Others have PIO usb host.
* All ESP32 boards.
* All nRF boards
Fixes#8676
The guard against running when flash is disabled isn't perfect and
may lead to calling the row handler anyway. We were crashing due
to mp_hal_delay_us being in flash. So, move it to RAM.
Also move the panic handler to IRAM so we get nice output when this
happens.
Turn off JTAG by default so its pins can be used by code.py.
Fixes#8987
I tested this by fetching a .txt file repeatedly using curl while
running the fancy camera demo. (100+ times without failure). I also
repeatedly loaded the filesystem view http://.../fs/#/sd/ which worked
10+ times without failure, but does take some time (multiple seconds) to
show a listing with a few dozen files.
(I suspect there's an accidentally quadratic behavior in oofatfs to stat
every file in a directory, because it repeatedly does a linear search of
the directory for the stat information of each file, but that's not an
issue for Right Now(TM))
Closes: #8980
- add tuh_event_hook_cb() in SRAM, required when updated to latest tinyusb
- bump up pico-pio-usb to latest
- bump up tinyusb to latest for new tuh_hid_receive_abort(), and all endpoint abort when
SET_CONFIGURATION
Some ports implement their own protection against this at a low level
but it doesn't hurt to add it here instead.
Based on a patch from @drath42
Closes: #8788
Once the buffer has less that an endpoint's worth, TinyUSB won't
request more from the host. When that happens, ctrl-c will no
longer be sent to the device and TinyUSB won't find the wanted
character.
Fixes#4444
Greedily grab as much RMT memory as we can. It blocks other RMT
transmit channels but we only use it temporarily anyway. The more
we can grab, the fewer interrupts are needed to keep the transmit
going.
Flickers may still happen due to file system writes but most of the
time the animation just pauses.
On ESP32, move CircuitPython to the second core. This helps NeoPixel
by moving the RMT interrupt to the second core as well.
When testing ESP32 I noticed that settings.toml writes won't apply
until after hard reset. This removes that constraint but still
requires the password to enable the web workflow.
Fixes#3835
this means that the test for FLAG_CTRL together with FLAG_STRING is
not needed. Instead, the FLAG_STRING | FLAG_CTRL row, when
encountered earlier, will automatically take precedence.