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

trezorhal: disable interfaces on deinit

This commit is contained in:
Jan Pochyla 2017-04-13 19:30:05 +02:00
parent b8f15a78ba
commit 03aac60681

View File

@ -100,15 +100,21 @@ int usb_init(const usb_dev_info_t *dev_info) {
}
int usb_deinit(void) {
return USBD_DeInit(&usb_dev_handle);
USBD_DeInit(&usb_dev_handle);
for (int i = 0; i < USBD_MAX_NUM_INTERFACES; i++) {
usb_ifaces[i].type = USB_IFACE_TYPE_DISABLED;
}
return 0;
}
int usb_start(void) {
return USBD_Start(&usb_dev_handle);
USBD_Start(&usb_dev_handle);
return 0;
}
int usb_stop(void) {
return USBD_Stop(&usb_dev_handle);
USBD_Stop(&usb_dev_handle);
return 0;
}
/*