1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 15:38:11 +00:00

trezorhal: fix missing rx_buffer

This commit is contained in:
Jan Pochyla 2017-03-28 00:42:06 +02:00 committed by Pavol Rusnak
parent c258bfdd90
commit 3a4cbacbff
2 changed files with 3 additions and 1 deletions

View File

@ -40,6 +40,7 @@ int usb_init_all(void) {
.ep_out = 0x01,
.subclass = 0,
.protocol = 0,
.rx_buffer = rx_buffer,
.max_packet_len = sizeof(rx_buffer),
.polling_interval = 1,
.report_desc_len = 34,

View File

@ -18,7 +18,8 @@ int usb_hid_add(const usb_hid_info_t *info) {
if ((info->iface_num < usb_config_desc->bNumInterfaces) ||
(info->iface_num >= USBD_MAX_NUM_INTERFACES) ||
((info->ep_in & 0x80) == 0) ||
((info->ep_out & 0x80) != 0)) {
((info->ep_out & 0x80) != 0) ||
(info->rx_buffer == NULL)) {
return 1; // Invalid configuration values
}