406e46f46b
When the USB serial buffer is full, the Ctrl-C code to send KeyboardInterrupt can't be sent, which creates a problem if you've pasted code or otherwise filled the buffer and need to recover. A similar problem affects advanced UIs that interact with CircuitPython and may send characters when they're unexpected, such as mu when it tries to move the cursor based on the user clicking on the screen. The main way forward seems to be to use some kind of message that can still reach CircuitPython when its internal serial recieve buffer is full. RS232 defines a "break" signal, in which the transmitting device holds its data line in the "space" state for many entire character times. This still exists in the world of USB serial. This does work, sort of, except that your host computer software will need to properly handle blocking serial writes; tio can send a break with the **ctrl-c b** sequence, but this only works if it hasn't yet written too much data, so it doesn't actually help in most situations :-/ |
||
---|---|---|
.. | ||
messages | ||
shared | ||
stub | ||
background_callback.h | ||
board.h | ||
cpu.h | ||
fatfs_port.h | ||
filesystem.h | ||
flash_root_pointers.h | ||
flash.h | ||
linker.h | ||
memory.h | ||
port.h | ||
serial.h | ||
spi_flash_api.h | ||
supervisor.mk | ||
usb.h | ||
workflow.h |