Skip to content

Commit 4ea27ac

Browse files
committed
minor update to webusb serial example
1 parent 3455583 commit 4ea27ac

File tree

1 file changed

+4
-2
lines changed
  • examples/device/webusb_serial/src

1 file changed

+4
-2
lines changed

examples/device/webusb_serial/src/main.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ enum {
7171

7272
static uint32_t blink_interval_ms = BLINK_NOT_MOUNTED;
7373

74-
#define URL "example.tinyusb.org/webusb-serial/"
74+
#define URL "example.tinyusb.org/webusb-serial/index.html"
7575

7676
const tusb_desc_webusb_url_t desc_url =
7777
{
@@ -114,6 +114,7 @@ void echo_all(uint8_t buf[], uint32_t count)
114114
if ( web_serial_connected )
115115
{
116116
tud_vendor_write(buf, count);
117+
tud_vendor_flush();
117118
}
118119

119120
// echo to cdc
@@ -211,7 +212,8 @@ bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_requ
211212
board_led_write(true);
212213
blink_interval_ms = BLINK_ALWAYS_ON;
213214

214-
tud_vendor_write_str("\r\nTinyUSB WebUSB device example\r\n");
215+
tud_vendor_write_str("\r\nWebUSB interface connected\r\n");
216+
tud_vendor_flush();
215217
}else
216218
{
217219
blink_interval_ms = BLINK_MOUNTED;

0 commit comments

Comments
 (0)