summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-04-18 15:54:56 +0100
committerDamien George <damien.p.george@gmail.com>2015-04-18 21:40:58 +0100
commit73f1a49137eff094f25bb0049b14cb848a8486c4 (patch)
tree02aa67ab557c990015459cfd22c144ea5ec93841
parentc92c7a69fd87ad0c2d330271bc67aaf9d4838fc3 (diff)
downloadmicropython-73f1a49137eff094f25bb0049b14cb848a8486c4.tar.gz
micropython-73f1a49137eff094f25bb0049b14cb848a8486c4.zip
stmhal: Exclude USB HS code when USB HS mode not enabled.
-rw-r--r--stmhal/usbd_conf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/stmhal/usbd_conf.c b/stmhal/usbd_conf.c
index e599b0ebf9..c55db33c96 100644
--- a/stmhal/usbd_conf.c
+++ b/stmhal/usbd_conf.c
@@ -94,6 +94,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd)
HAL_NVIC_EnableIRQ(OTG_FS_IRQn);
}
+ #if defined(USE_USB_HS)
else if(hpcd->Instance == USB_OTG_HS)
{
/* Configure USB FS GPIOs */
@@ -158,6 +159,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd)
/* Enable USBHS Interrupt */
HAL_NVIC_EnableIRQ(OTG_HS_IRQn);
}
+ #endif
}
/**
* @brief DeInitializes the PCD MSP.
@@ -172,12 +174,14 @@ void HAL_PCD_MspDeInit(PCD_HandleTypeDef *hpcd)
__USB_OTG_FS_CLK_DISABLE();
__SYSCFG_CLK_DISABLE();
}
+ #if defined(USE_USB_HS)
else if(hpcd->Instance == USB_OTG_HS)
{
/* Disable USB FS Clocks */
__USB_OTG_HS_CLK_DISABLE();
__SYSCFG_CLK_DISABLE();
}
+ #endif
}
/*******************************************************************************