mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-12 18:49:07 +00:00
firmware: don't use WebUSB landing page for firmware, it's annoying
This commit is contained in:
parent
de96efdb1d
commit
23f03cb6d3
@ -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 = {
|
||||
|
11
webusb.c
11
webusb.c
@ -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,
|
||||
|
2
webusb.h
2
webusb.h
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user