8809ae7161
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> |
||
---|---|---|
.. | ||
mp_usbd_cdc.c | ||
mp_usbd_cdc.h | ||
mp_usbd_descriptor.c | ||
mp_usbd_runtime.c | ||
mp_usbd.c | ||
mp_usbd.h | ||
tusb_config.h |