1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-19 14:08:11 +00:00

trezorhal: fix simple interface behaviour on windows

This commit is contained in:
Pavol Rusnak 2018-01-28 02:18:39 +01:00
parent 399d6d2f65
commit 1b712a0446
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -289,7 +289,6 @@ USBD_StatusTypeDef USBD_LL_SetupStage(USBD_HandleTypeDef *pdev, uint8_t *psetup)
break; break;
case USB_REQ_TYPE_CLASS: case USB_REQ_TYPE_CLASS:
case USB_REQ_TYPE_VENDOR:
if (pdev->dev_state == USBD_STATE_CONFIGURED) { if (pdev->dev_state == USBD_STATE_CONFIGURED) {
if (pdev->pClass->Setup != NULL) if (pdev->pClass->Setup != NULL)
pdev->pClass->Setup(pdev, &pdev->request); pdev->pClass->Setup(pdev, &pdev->request);
@ -297,6 +296,15 @@ USBD_StatusTypeDef USBD_LL_SetupStage(USBD_HandleTypeDef *pdev, uint8_t *psetup)
USBD_CtlError(pdev, &pdev->request); USBD_CtlError(pdev, &pdev->request);
} }
break; break;
case USB_REQ_TYPE_VENDOR:
if (pdev->dev_state == USBD_STATE_CONFIGURED || pdev->dev_state == USBD_STATE_ADDRESSED) {
if (pdev->pClass->Setup != NULL)
pdev->pClass->Setup(pdev, &pdev->request);
} else {
USBD_CtlError(pdev, &pdev->request);
}
break;
} }
return USBD_OK; return USBD_OK;