From fb061ae2e50a81904797146c3b5de8156dfd3f91 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Thu, 5 Apr 2012 16:44:11 -0400 Subject: Don't conditionally compile rcc_clk_id or nvic_irq_num enumerators. Whether or not a given peripheral is present on an F1 series MCU doesn't matter. It doesn't take up any extra space to include these enumerators, and it's convenient to have them defined so portable libmaple routines can safely refer to them. This can prevent the need for special series-specific versions of some functions. Signed-off-by: Marti Bolivar --- libmaple/stm32f1/include/series/nvic.h | 2 -- libmaple/stm32f1/include/series/rcc.h | 4 ---- 2 files changed, 6 deletions(-) (limited to 'libmaple') diff --git a/libmaple/stm32f1/include/series/nvic.h b/libmaple/stm32f1/include/series/nvic.h index 69fd945..33783f3 100644 --- a/libmaple/stm32f1/include/series/nvic.h +++ b/libmaple/stm32f1/include/series/nvic.h @@ -102,7 +102,6 @@ typedef enum nvic_irq_num { NVIC_TIMER8_UP = 44, /**< Timer 8 update */ NVIC_TIMER8_TRG_COM = 45, /**< Timer 8 trigger and commutation */ NVIC_TIMER8_CC = 46, /**< Timer 8 capture/compare */ -#ifdef STM32_HIGH_DENSITY NVIC_ADC3 = 47, /**< ADC3 */ NVIC_FSMC = 48, /**< FSMC */ NVIC_SDIO = 49, /**< SDIO */ @@ -116,7 +115,6 @@ typedef enum nvic_irq_num { NVIC_DMA2_CH2 = 57, /**< DMA2 channel 2 */ NVIC_DMA2_CH3 = 58, /**< DMA2 channel 3 */ NVIC_DMA2_CH_4_5 = 59, /**< DMA2 channels 4 and 5 */ -#endif } nvic_irq_num; static inline void nvic_irq_disable_all(void) { diff --git a/libmaple/stm32f1/include/series/rcc.h b/libmaple/stm32f1/include/series/rcc.h index 1eb913a..f60b07b 100644 --- a/libmaple/stm32f1/include/series/rcc.h +++ b/libmaple/stm32f1/include/series/rcc.h @@ -421,7 +421,6 @@ typedef enum rcc_clk_id { RCC_FLITF, RCC_SRAM, RCC_USB, -#if defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY) RCC_GPIOE, RCC_GPIOF, RCC_GPIOG, @@ -436,15 +435,12 @@ typedef enum rcc_clk_id { RCC_DMA2, RCC_SDIO, RCC_SPI3, -#endif -#ifdef STM32_XL_DENSITY RCC_TIMER9, RCC_TIMER10, RCC_TIMER11, RCC_TIMER12, RCC_TIMER13, RCC_TIMER14, -#endif } rcc_clk_id; /** -- cgit v1.2.3