micropython/ports
Andrew Leech 8809ae7161 shared/tinyusb: Buffer startup CDC data to send to host on connection.
At startup, buffer initial stdout / MicroyPthon banner so that it can be
sent to the host on initial connection of the USB serial port.  This
buffering also works for when the CDC becomes disconnected and the device
is still printing to stdout, and when CDC is reconnected the most recent
part of stdout (depending on how big the internal USB FIFO is) is flushed
to the host.

This change is most obvious when you've first plugged in a MicroPython
device (or hit reset), when it's a board that uses USB (CDC) serial in the
chip itself for the REPL interface.  This doesn't apply to UART going via a
separate USB-serial chip.

The stm32 port already has this buffering behaviour (it doesn't use
TinyUSB) and this commit extends such behaviour to rp2, mimxrt, samd and
renesas-ra ports, which do use TinyUSB.

Signed-off-by: Andrew Leech <andrew@alelec.net>
2024-06-04 17:49:19 +10:00
..
bare-arm shared/libc/string0: Don't deref args for n==0 case. 2023-11-07 16:01:50 +11:00
cc3200 cc3200/mods: Implement network.ipconfig and network.WLAN.ipconfig. 2024-06-04 12:45:01 +10:00
embed all: Prune trailing whitespace. 2024-03-07 16:25:17 +11:00
esp32 esp32/network_ppp: Implement network.PPP.ipconfig method. 2024-06-04 12:45:01 +10:00
esp8266 esp8266/network_wlan: Implement network.ipconfig and WLAN.ipconfig. 2024-06-04 12:45:01 +10:00
mimxrt shared/tinyusb: Buffer startup CDC data to send to host on connection. 2024-06-04 17:49:19 +10:00
minimal minimal: Use printf instead of echo -e. 2024-02-15 16:36:22 +11:00
nrf shared/tinyusb: Allow ports to use 1200bps-touch without other CDC code. 2024-06-02 23:27:33 +10:00
pic16bit all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
powerpc py/mpconfig: Disable qstr hashing at minimum feature level. 2024-01-25 16:38:17 +11:00
qemu-arm all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
renesas-ra renesas-ra/mphalport: Refactor to use shared TinyUSB CDC functions. 2024-05-31 19:47:37 +10:00
rp2 rp2/CMakeLists: Use MICROPY_BOARD_DIR to find pins.csv. 2024-06-03 16:26:08 +10:00
samd samd/mphalport: Refactor to use shared TinyUSB CDC functions. 2024-05-31 19:47:55 +10:00
stm32 esp32,mimxrt,stm32: Implement ipconfig() for more network interfaces. 2024-06-04 12:45:01 +10:00
unix unix/variants: Don't use native _Float16 type. 2024-03-20 14:13:49 +11:00
webassembly webassembly/modjsffi: Add mem_info function to get detailed stats. 2024-05-22 17:37:37 +10:00
windows py/objdeque: Expand implementation to be doubly-ended and support iter. 2024-03-18 14:10:14 +11:00
zephyr all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00