micropython/ports
Martin Fischer 5873390226 rp2/mphalport: Fix USB CDC RX handling to not block when unprocessed.
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.
2022-04-05 10:47:19 +10:00
..
bare-arm bare-arm/mpconfigport.h: Disable remaining optional features. 2021-11-01 14:23:06 +11:00
cc3200 ports: Consolidate inclusion of umachine module in built-ins. 2022-02-03 10:08:54 +11:00
esp32 esp32: Allow overriding cmake frozen manifest from the command line. 2022-04-04 23:49:10 +10:00
esp8266 esp8266/modesp: Remove esp.info() function. 2022-03-22 11:03:29 +11:00
javascript py/runtime: Allow initialising sys.path/argv with defaults. 2021-12-18 00:08:07 +11:00
mimxrt mixmrt/machine_i2s: Add I2S protocol support. 2022-03-30 14:12:40 +11:00
minimal ports: Recompile bytecode tests now that .mpy format changed. 2022-02-24 18:29:02 +11:00
nrf nrf/modules: Include uasyncio in default board manifest. 2022-03-30 15:37:49 +11:00
pic16bit all: Update to point to files in new shared/ directory. 2021-07-12 17:08:10 +10:00
powerpc ports: Recompile bytecode tests now that .mpy format changed. 2022-02-24 18:29:02 +11:00
qemu-arm qemu-arm/moduos: Convert module to use extmod version. 2022-03-09 10:03:23 +11:00
rp2 rp2/mphalport: Fix USB CDC RX handling to not block when unprocessed. 2022-04-05 10:47:19 +10:00
samd samd/moduos: Convert module to use extmod version. 2022-03-09 10:03:23 +11:00
stm32 stm32/Makefile: Allow overriding COPT in Makefile. 2022-04-04 23:12:15 +10:00
teensy py/runtime: Allow initialising sys.path/argv with defaults. 2021-12-18 00:08:07 +11:00
unix unix/variants: Enable a few optimisations and features on dev, coverage. 2022-03-10 13:34:43 +11:00
windows windows: Switch to VFS subsystem and use VfsPosix. 2022-03-10 00:26:36 +11:00
zephyr zephyr/moduos: Convert module to use extmod version. 2022-03-09 10:03:23 +11:00