summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJames Smith <{ID}+{username}@users.noreply.github.com>2025-12-20 13:27:29 -0700
committerJames Smith <{ID}+{username}@users.noreply.github.com>2025-12-20 13:36:54 -0700
commit185757ed413fc7bdc65cf494a6079cfed049f98e (patch)
tree294b6d253af8904322f1dedbb3fb3da7cd114155 /examples
parent83fa3bbffe2237303ff1ae92fe0b6c8384073993 (diff)
Added tud_vendor_write_clear() which forcefully clears TX buffer
Diffstat (limited to 'examples')
-rw-r--r--examples/device/webusb_serial/src/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/device/webusb_serial/src/main.c b/examples/device/webusb_serial/src/main.c
index 50794bdba..155768b76 100644
--- a/examples/device/webusb_serial/src/main.c
+++ b/examples/device/webusb_serial/src/main.c
@@ -196,6 +196,7 @@ bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_requ
tud_vendor_write_str("\r\nWebUSB interface connected\r\n");
tud_vendor_write_flush();
} else {
+ tud_vendor_write_clear(); // anything left in the buffer is now thrown out
blink_interval_ms = BLINK_MOUNTED;
}