1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 03:30:02 +00:00

firmware: don't use WebUSB landing page for firmware, it's annoying

This commit is contained in:
Pavol Rusnak 2018-08-27 17:37:53 +02:00
parent de96efdb1d
commit 23f03cb6d3
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
3 changed files with 14 additions and 1 deletions

View File

@ -334,7 +334,7 @@ static usbd_device *usbd_dev;
static uint8_t usbd_control_buffer[256] __attribute__ ((aligned (2)));
static const struct usb_device_capability_descriptor* capabilities[] = {
(const struct usb_device_capability_descriptor*)&webusb_platform_capability_descriptor,
(const struct usb_device_capability_descriptor*)&webusb_platform_capability_descriptor_no_landing_page,
};
static const struct usb_bos_descriptor bos_descriptor = {

View File

@ -33,6 +33,17 @@ const struct webusb_platform_descriptor webusb_platform_capability_descriptor =
.iLandingPage = 1
};
const struct webusb_platform_descriptor webusb_platform_capability_descriptor_no_landing_page = {
.bLength = WEBUSB_PLATFORM_DESCRIPTOR_SIZE,
.bDescriptorType = USB_DT_DEVICE_CAPABILITY,
.bDevCapabilityType = USB_DC_PLATFORM,
.bReserved = 0,
.platformCapabilityUUID = WEBUSB_UUID,
.bcdVersion = 0x0100,
.bVendorCode = WEBUSB_VENDOR_CODE,
.iLandingPage = 0
};
static const char* webusb_https_url;
static int webusb_control_vendor_request(usbd_device *usbd_dev,

View File

@ -26,6 +26,8 @@
#define WEBUSB_VENDOR_CODE 0x01
extern const struct webusb_platform_descriptor webusb_platform_capability_descriptor;
extern const struct webusb_platform_descriptor webusb_platform_capability_descriptor_no_landing_page;
extern void webusb_setup(usbd_device* usbd_dev, const char* https_url);
#endif