mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
trezorhal: added calls to USBD_LL_FlushEP in deinit functions
This commit is contained in:
parent
9e31e0f4d4
commit
8bd258db6f
@ -233,6 +233,9 @@ static void usb_hid_class_init(USBD_HandleTypeDef *dev, usb_hid_state_t *state,
|
||||
}
|
||||
|
||||
static void usb_hid_class_deinit(USBD_HandleTypeDef *dev, usb_hid_state_t *state, uint8_t cfg_idx) {
|
||||
// Flush endpoints
|
||||
USBD_LL_FlushEP(dev, state->ep_in);
|
||||
USBD_LL_FlushEP(dev, state->ep_out);
|
||||
// Close endpoints
|
||||
USBD_LL_CloseEP(dev, state->ep_in);
|
||||
USBD_LL_CloseEP(dev, state->ep_out);
|
||||
|
@ -331,6 +331,10 @@ static void usb_vcp_class_init(USBD_HandleTypeDef *dev, usb_vcp_state_t *state,
|
||||
}
|
||||
|
||||
static void usb_vcp_class_deinit(USBD_HandleTypeDef *dev, usb_vcp_state_t *state, uint8_t cfg_idx) {
|
||||
// Flush endpoints
|
||||
USBD_LL_FlushEP(dev, state->ep_in);
|
||||
USBD_LL_FlushEP(dev, state->ep_out);
|
||||
USBD_LL_FlushEP(dev, state->ep_cmd);
|
||||
// Close endpoints
|
||||
USBD_LL_CloseEP(dev, state->ep_in);
|
||||
USBD_LL_CloseEP(dev, state->ep_out);
|
||||
|
Loading…
Reference in New Issue
Block a user