From 0a64c92a9c3bd7d648c8a0d087fa7e739a5eeaa3 Mon Sep 17 00:00:00 2001 From: Dave Hylands Date: Fri, 14 Mar 2014 00:51:26 -0700 Subject: 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 --- stmhal/stm32f4xx_it.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'stmhal/stm32f4xx_it.c') 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. -- cgit v1.2.3