mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-17 01:52:02 +00:00
trezorhal: disable interfaces on deinit
This commit is contained in:
parent
b8f15a78ba
commit
03aac60681
@ -100,15 +100,21 @@ int usb_init(const usb_dev_info_t *dev_info) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int usb_deinit(void) {
|
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) {
|
int usb_start(void) {
|
||||||
return USBD_Start(&usb_dev_handle);
|
USBD_Start(&usb_dev_handle);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int usb_stop(void) {
|
int usb_stop(void) {
|
||||||
return USBD_Stop(&usb_dev_handle);
|
USBD_Stop(&usb_dev_handle);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user