trezorhal: fix missing rx_buffer

pull/25/head
Jan Pochyla 8 years ago committed by Pavol Rusnak
parent c258bfdd90
commit 3a4cbacbff

@ -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,

@ -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
}

Loading…
Cancel
Save