mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-19 05:42:28 +00:00
minor update to webusb serial example
This commit is contained in:
parent
345558307d
commit
4ea27acd1d
@ -71,7 +71,7 @@ enum {
|
|||||||
|
|
||||||
static uint32_t blink_interval_ms = BLINK_NOT_MOUNTED;
|
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 =
|
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 )
|
if ( web_serial_connected )
|
||||||
{
|
{
|
||||||
tud_vendor_write(buf, count);
|
tud_vendor_write(buf, count);
|
||||||
|
tud_vendor_flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
// echo to cdc
|
// 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);
|
board_led_write(true);
|
||||||
blink_interval_ms = BLINK_ALWAYS_ON;
|
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
|
}else
|
||||||
{
|
{
|
||||||
blink_interval_ms = BLINK_MOUNTED;
|
blink_interval_ms = BLINK_MOUNTED;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user