diff options
author | Dave Hylands <dhylands@gmail.com> | 2014-03-14 00:51:26 -0700 |
---|---|---|
committer | Dave Hylands <dhylands@gmail.com> | 2014-03-14 09:48:49 -0700 |
commit | 0a64c92a9c3bd7d648c8a0d087fa7e739a5eeaa3 (patch) | |
tree | 0d36bb17c7bbb00c14a61a072d667162d7c9ff8f /stmhal/stm32f4xx_it.c | |
parent | 33bdd2119d9ca28404acc2b0891d5a74997a0d05 (diff) | |
download | micropython-0a64c92a9c3bd7d648c8a0d087fa7e739a5eeaa3.tar.gz micropython-0a64c92a9c3bd7d648c8a0d087fa7e739a5eeaa3.zip |
stmhal - add led support. Add netduino_plus_2 support
Tweaked a couple of the USB files to compile if neither dev nor host was defined.
Tested on netduiono plus 2 and stm32f4discovery boards
Diffstat (limited to 'stmhal/stm32f4xx_it.c')
-rw-r--r-- | stmhal/stm32f4xx_it.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/stmhal/stm32f4xx_it.c b/stmhal/stm32f4xx_it.c index 4be78deddb..b9651aa651 100644 --- a/stmhal/stm32f4xx_it.c +++ b/stmhal/stm32f4xx_it.c @@ -182,25 +182,28 @@ void SysTick_Handler(void) * @param None
* @retval None
*/
-#ifdef USE_USB_FS
-void OTG_FS_IRQHandler(void)
+#if defined(USE_USB_FS)
+#define OTG_XX_IRQHandler OTG_FS_IRQHandler
+#define OTG_XX_WKUP_IRQHandler OTG_FS_WKUP_IRQHandler
#elif defined(USE_USB_HS)
-void OTG_HS_IRQHandler(void)
+#define OTG_XX_IRQHandler OTG_HS_IRQHandler
+#define OTG_XX_WKUP_IRQHandler OTG_HS_WKUP_IRQHandler
#endif
+
+#if defined(OTG_XX_IRQHandler)
+void OTG_XX_IRQHandler(void)
{
HAL_PCD_IRQHandler(&hpcd);
}
+#endif
/**
* @brief This function handles USB OTG FS or HS Wakeup IRQ Handler.
* @param None
* @retval None
*/
-#ifdef USE_USB_FS
-void OTG_FS_WKUP_IRQHandler(void)
-#elif defined(USE_USB_HS)
-void OTG_HS_WKUP_IRQHandler(void)
-#endif
+#if defined(OTG_XX_WKUP_IRQHandler)
+void OTG_XX_WKUP_IRQHandler(void)
{
if((&hpcd)->Init.low_power_enable)
@@ -242,6 +245,7 @@ void OTG_HS_WKUP_IRQHandler(void) #endif
}
+#endif
/**
* @brief This function handles PPP interrupt request.
|