|
|
@ -474,12 +474,12 @@ USBD_StatusTypeDef USBD_SetSpeed(USBD_HandleTypeDef *pdev, USBD_SpeedTypeDef sp
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
USBD_StatusTypeDef USBD_Suspend(USBD_HandleTypeDef *pdev)
|
|
|
|
USBD_StatusTypeDef USBD_Suspend(USBD_HandleTypeDef *pdev)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if ((pdev->dev_state > USBD_STATE_DEFAULT) &&
|
|
|
|
|
|
|
|
(pdev->dev_state < USBD_STATE_SUSPENDED))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
pdev->dev_old_state = pdev->dev_state;
|
|
|
|
pdev->dev_old_state = pdev->dev_state;
|
|
|
|
pdev->dev_state = USBD_STATE_SUSPENDED;
|
|
|
|
pdev->dev_state = USBD_STATE_SUSPENDED;
|
|
|
|
|
|
|
|
|
|
|
|
if (pdev->dev_old_state > USBD_STATE_DEFAULT)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Upstream_StateMachine_Suspend();
|
|
|
|
Upstream_StateMachine_Suspend();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return USBD_OK;
|
|
|
|
return USBD_OK;
|
|
|
|