From a939810940fa475edebf4dc044b4943683159469 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Tue, 3 Nov 2015 23:34:36 +0000 Subject: [PATCH] stm32f0: Add rcc compatibility aliases Many stm32 families have multiple ADC and DAC peripherals. F0 (so far) only has one. To make it easier to use the same code on many stm32 families, provide an alias for ADC1 to ADC. --- include/libopencm3/stm32/f0/rcc.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/libopencm3/stm32/f0/rcc.h b/include/libopencm3/stm32/f0/rcc.h index ead1ba64..7315381f 100644 --- a/include/libopencm3/stm32/f0/rcc.h +++ b/include/libopencm3/stm32/f0/rcc.h @@ -405,6 +405,7 @@ enum rcc_periph_clken { /* APB2 peripherals */ RCC_SYSCFG_COMP = _REG_BIT(0x18, 0), RCC_ADC = _REG_BIT(0x18, 9), + RCC_ADC1 = _REG_BIT(0x18, 9), /* Compatibility alias */ RCC_TIM1 = _REG_BIT(0x18, 11), RCC_SPI1 = _REG_BIT(0x18, 12), RCC_USART1 = _REG_BIT(0x18, 14), @@ -431,6 +432,7 @@ enum rcc_periph_clken { RCC_CRS = _REG_BIT(0x1C, 27), RCC_PWR = _REG_BIT(0x1C, 28), RCC_DAC = _REG_BIT(0x1C, 29), + RCC_DAC1 = _REG_BIT(0x1C, 29), /* Compatibility alias */ RCC_CEC = _REG_BIT(0x1C, 30), /* Advanced peripherals */ @@ -441,6 +443,7 @@ enum rcc_periph_rst { /* APB2 peripherals */ RST_SYSCFG = _REG_BIT(0x0C, 0), RST_ADC = _REG_BIT(0x0C, 9), + RST_ADC1 = _REG_BIT(0x0C, 9), /* Compatibility alias */ RST_TIM1 = _REG_BIT(0x0C, 11), RST_SPI1 = _REG_BIT(0x0C, 12), RST_USART1 = _REG_BIT(0x0C, 14), @@ -467,6 +470,7 @@ enum rcc_periph_rst { RST_CRS = _REG_BIT(0x10, 27), RST_PWR = _REG_BIT(0x10, 28), RST_DAC = _REG_BIT(0x10, 29), + RST_DAC1 = _REG_BIT(0x10, 29), /* Compatibility alias */ RST_CEC = _REG_BIT(0x10, 30), /* Advanced peripherals */