Commit 58b37007 authored by Johann Fischer's avatar Johann Fischer Committed by Benjamin Cabé
Browse files

drivers: udc_stm32: fix remote wakeup handling



Clear the suspended status and submit the resume event once the remote
wakeup signaling is finished. Clear the suspended status on bus reset as
well.

Signed-off-by: default avatarJohann Fischer <johann.fischer@nordicsemi.no>
parent bd5dcc60
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -132,6 +132,7 @@ void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd)
				EP_TYPE_CTRL);
	}

	udc_set_suspended(dev, false);
	udc_submit_event(priv->dev, UDC_EVT_RESET, 0);
}

@@ -750,6 +751,9 @@ static int udc_stm32_host_wakeup(const struct device *dev)
		return -EIO;
	}

	udc_set_suspended(dev, false);
	udc_submit_event(dev, UDC_EVT_RESUME, 0);

	return 0;
}