mirror of
https://github.com/licsber/micropython.git
synced 2024-09-20 09:00:23 +08:00
5873390226
Prior to this commit, the USB CDC OUT endpoint got NACK'd if a character was received but not consumed by the application, e.g. via sys.stdin.read(). This meant that USB CDC was blocked and no additional characters could be sent from the host. In particular a ctrl-C could not interrupt the application if another character was pending. To fix the issue, the approach in this commit uses a callback tud_cdc_rx_cb which is called by the TinyUSB stack on reception of new CDC data. By consuming the data immediately, the endpoint does not stall anymore. The previous handler tud_cdc_rx_wanted_cb was made obsolete and removed. In addition some cleanup was done along the way: by adding interrupt_char.c and removing the existing code mp_hal_set_interrupt_char(). Also, there is now only one (stdin) ringbuffer. Fixes issue #7996. |
||
---|---|---|
.. | ||
bare-arm | ||
cc3200 | ||
esp32 | ||
esp8266 | ||
javascript | ||
mimxrt | ||
minimal | ||
nrf | ||
pic16bit | ||
powerpc | ||
qemu-arm | ||
rp2 | ||
samd | ||
stm32 | ||
teensy | ||
unix | ||
windows | ||
zephyr |