summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-07-12 01:55:33 +0700
committerhathach <[email protected]>2022-07-12 01:55:33 +0700
commit4ea27acd1da9e0144dbfbf805b87b22d16f7db8c (patch)
treef86f35ea7d4d1ab3e6d9648edfa35a39456bf7c8
parent345558307d06338fdc2c79d88c95c8d97bdeeeb0 (diff)
minor update to webusb serial example
-rw-r--r--examples/device/webusb_serial/src/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/device/webusb_serial/src/main.c b/examples/device/webusb_serial/src/main.c
index 8eaad7706..604d30a83 100644
--- a/examples/device/webusb_serial/src/main.c
+++ b/examples/device/webusb_serial/src/main.c
@@ -71,7 +71,7 @@ enum {
static uint32_t blink_interval_ms = BLINK_NOT_MOUNTED;
-#define URL "example.tinyusb.org/webusb-serial/"
+#define URL "example.tinyusb.org/webusb-serial/index.html"
const tusb_desc_webusb_url_t desc_url =
{
@@ -114,6 +114,7 @@ void echo_all(uint8_t buf[], uint32_t count)
if ( web_serial_connected )
{
tud_vendor_write(buf, count);
+ tud_vendor_flush();
}
// echo to cdc
@@ -211,7 +212,8 @@ bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_requ
board_led_write(true);
blink_interval_ms = BLINK_ALWAYS_ON;
- tud_vendor_write_str("\r\nTinyUSB WebUSB device example\r\n");
+ tud_vendor_write_str("\r\nWebUSB interface connected\r\n");
+ tud_vendor_flush();
}else
{
blink_interval_ms = BLINK_MOUNTED;