drivers: udc_stm32: set address only for standard device requests
Any request 5 did set the address even if it's a non standard request like vendor specific requests. Signed-off-by: David Schneider <schneidav81@gmail.com>
This commit is contained in:
parent
8ac483fdd4
commit
ded2e0ba4a
1 changed files with 2 additions and 1 deletions
|
|
@ -168,7 +168,8 @@ void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setup->bRequest == USB_SREQ_SET_ADDRESS) {
|
if ((setup->bmRequestType == 0) &&
|
||||||
|
(setup->bRequest == USB_SREQ_SET_ADDRESS)) {
|
||||||
/* HAL requires we set the address before submitting status */
|
/* HAL requires we set the address before submitting status */
|
||||||
HAL_PCD_SetAddress(&priv->pcd, setup->wValue);
|
HAL_PCD_SetAddress(&priv->pcd, setup->wValue);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue