update example

This commit is contained in:
hathach
2025-07-02 15:38:14 +07:00
parent 0388700ad7
commit a8b5e2bfc0
3 changed files with 21 additions and 11 deletions

View File

@@ -72,7 +72,10 @@ void tuh_cdc_rx_cb(uint8_t idx) {
if (count) {
buf[count] = 0;
printf("%s", (char*) buf);
fflush(stdout);
#ifndef __ICCARM__ // TODO IAR doesn't support stream control ?
fflush(stdout);// flush right away, else nanolib will wait for newline
#endif
}
}