diff options
Diffstat (limited to 'os/hal/ports/STM32/LLD/OTGv1/usb_lld.h')
-rw-r--r-- | os/hal/ports/STM32/LLD/OTGv1/usb_lld.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/os/hal/ports/STM32/LLD/OTGv1/usb_lld.h b/os/hal/ports/STM32/LLD/OTGv1/usb_lld.h index 293c94b02..8a1b26872 100644 --- a/os/hal/ports/STM32/LLD/OTGv1/usb_lld.h +++ b/os/hal/ports/STM32/LLD/OTGv1/usb_lld.h @@ -501,14 +501,14 @@ struct USBDriver { *
* @api
*/
-#define usb_lld_connect_bus(usbp) ((usbp)->otg->GCCFG |= GCCFG_VBUSBSEN)
+#define usb_lld_connect_bus(usbp) ((usbp)->otg->DCTL &= ~DCTL_SDIS)
/**
* @brief Disconnect the USB device.
*
* @api
*/
-#define usb_lld_disconnect_bus(usbp) ((usbp)->otg->GCCFG &= ~GCCFG_VBUSBSEN)
+#define usb_lld_disconnect_bus(usbp) ((usbp)->otg->DCTL |= DCTL_SDIS)
/*===========================================================================*/
/* External declarations. */
|