diff options
| author | hathach <[email protected]> | 2019-07-16 18:43:06 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-07-16 18:43:06 +0700 |
| commit | 83f7aacbb1f3335b968da02c1e3b554bb9f35c86 (patch) | |
| tree | fc24c0c611fd526e09a6e2d50f26a9d2ce82d4bf /examples | |
| parent | 036e858543dce1c19ff789b69907680500e28ca6 (diff) | |
clean up
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/device/webusb/src/usb_descriptors.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/examples/device/webusb/src/usb_descriptors.c b/examples/device/webusb/src/usb_descriptors.c index 97c05e5d0..cd9b6bc1a 100644 --- a/examples/device/webusb/src/usb_descriptors.c +++ b/examples/device/webusb/src/usb_descriptors.c @@ -180,20 +180,12 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index) //--------------------------------------------------------------------+ #define URL "github.com/hathach/tinyusb" -typedef struct TU_ATTR_PACKED -{ - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bScheme; - char url[]; -} tusb_desc_webusb_url_t; - const tusb_desc_webusb_url_t desc_url = { - .bLength = 3 + sizeof(URL) - 1, + .bLength = 3 + sizeof(URL) - 1, .bDescriptorType = 3, // WEBUSB URL type - .bScheme = 1, // 0: http, 1: https - .url = URL + .bScheme = 1, // 0: http, 1: https + .url = URL }; bool tud_control_vendor_request_cb(uint8_t rhport, tusb_control_request_t const * request) |
