mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-16 17:42:02 +00:00
trezorhal: fix missing rx_buffer
This commit is contained in:
parent
c258bfdd90
commit
3a4cbacbff
@ -40,6 +40,7 @@ int usb_init_all(void) {
|
|||||||
.ep_out = 0x01,
|
.ep_out = 0x01,
|
||||||
.subclass = 0,
|
.subclass = 0,
|
||||||
.protocol = 0,
|
.protocol = 0,
|
||||||
|
.rx_buffer = rx_buffer,
|
||||||
.max_packet_len = sizeof(rx_buffer),
|
.max_packet_len = sizeof(rx_buffer),
|
||||||
.polling_interval = 1,
|
.polling_interval = 1,
|
||||||
.report_desc_len = 34,
|
.report_desc_len = 34,
|
||||||
|
@ -18,7 +18,8 @@ int usb_hid_add(const usb_hid_info_t *info) {
|
|||||||
if ((info->iface_num < usb_config_desc->bNumInterfaces) ||
|
if ((info->iface_num < usb_config_desc->bNumInterfaces) ||
|
||||||
(info->iface_num >= USBD_MAX_NUM_INTERFACES) ||
|
(info->iface_num >= USBD_MAX_NUM_INTERFACES) ||
|
||||||
((info->ep_in & 0x80) == 0) ||
|
((info->ep_in & 0x80) == 0) ||
|
||||||
((info->ep_out & 0x80) != 0)) {
|
((info->ep_out & 0x80) != 0) ||
|
||||||
|
(info->rx_buffer == NULL)) {
|
||||||
|
|
||||||
return 1; // Invalid configuration values
|
return 1; // Invalid configuration values
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user