aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/OTGv1
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/ports/STM32/LLD/OTGv1')
-rw-r--r--os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c3
-rw-r--r--os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h18
2 files changed, 16 insertions, 5 deletions
diff --git a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c
index b1802bc71..7cf690f5d 100644
--- a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c
+++ b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c
@@ -556,9 +556,6 @@ static void usb_lld_serve_interrupt(USBDriver *usbp) {
otgp->PCGCCTL &= ~(PCGCCTL_STPPCLK | PCGCCTL_GATEHCLK);
}
- /* Clear the Remote Wake-up Signaling.*/
- otgp->DCTL |= DCTL_RWUSIG;
-
_usb_wakeup(usbp);
}
diff --git a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h
index 5f94a67ab..4c4177133 100644
--- a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h
+++ b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h
@@ -541,7 +541,7 @@ struct USBDriver {
/**
* @brief Connects the USB device.
*
- * @api
+ * @notapi
*/
#if (STM32_OTG_STEPPING == 1) || defined(__DOXYGEN__)
#define usb_lld_connect_bus(usbp) ((usbp)->otg->GCCFG |= GCCFG_VBUSBSEN)
@@ -552,7 +552,7 @@ struct USBDriver {
/**
* @brief Disconnect the USB device.
*
- * @api
+ * @notapi
*/
#if (STM32_OTG_STEPPING == 1) || defined(__DOXYGEN__)
#define usb_lld_disconnect_bus(usbp) ((usbp)->otg->GCCFG &= ~GCCFG_VBUSBSEN)
@@ -560,6 +560,20 @@ struct USBDriver {
#define usb_lld_disconnect_bus(usbp) ((usbp)->otg->DCTL |= DCTL_SDIS)
#endif
+/**
+ * @brief Start of host wake-up procedure.
+ *
+ * @notapi
+ */
+#define usb_lld_start_wakeup_host(usbp) ((usbp)->otg->DCTL |= DCTL_RWUSIG)
+
+/**
+ * @brief Stop of host wake-up procedure.
+ *
+ * @notapi
+ */
+#define usb_lld_stop_wakeup_host(usbp) ((usbp)->otg->DCTL &= ~DCTL_RWUSIG)
+
/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/