From e11e64330c89674b24d05b4d338eae90f2186f46 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Tue, 4 Jul 2017 23:24:49 +0000 Subject: [PATCH] stm32f0: can: add to build Added the CAN1 compatibility aliases as has been done for adc and dac to make code reuse easier. Only for the magic enums, the raw bit definitions remain as per the ref mans Originally suggested as https://github.com/libopencm3/libopencm3/pull/802 --- include/libopencm3/stm32/f0/rcc.h | 2 ++ lib/stm32/f0/Makefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/libopencm3/stm32/f0/rcc.h b/include/libopencm3/stm32/f0/rcc.h index a1f87f8c..bb1dd981 100644 --- a/include/libopencm3/stm32/f0/rcc.h +++ b/include/libopencm3/stm32/f0/rcc.h @@ -437,6 +437,7 @@ enum rcc_periph_clken { RCC_I2C2 = _REG_BIT(0x1C, 22), RCC_USB = _REG_BIT(0x1C, 23), RCC_CAN = _REG_BIT(0x1C, 25), + RCC_CAN1 = _REG_BIT(0x1C, 25), /* Compatibility alias */ RCC_CRS = _REG_BIT(0x1C, 27), RCC_PWR = _REG_BIT(0x1C, 28), RCC_DAC = _REG_BIT(0x1C, 29), @@ -475,6 +476,7 @@ enum rcc_periph_rst { RST_I2C2 = _REG_BIT(0x10, 22), RST_USB = _REG_BIT(0x10, 23), RST_CAN = _REG_BIT(0x10, 25), + RST_CAN1 = _REG_BIT(0x10, 25), /* Compatibility alias */ RST_CRS = _REG_BIT(0x10, 27), RST_PWR = _REG_BIT(0x10, 28), RST_DAC = _REG_BIT(0x10, 29), diff --git a/lib/stm32/f0/Makefile b/lib/stm32/f0/Makefile index f901ef6e..cb866b9a 100644 --- a/lib/stm32/f0/Makefile +++ b/lib/stm32/f0/Makefile @@ -36,7 +36,7 @@ TGT_CFLAGS += $(STANDARD_FLAGS) ARFLAGS = rcs -OBJS = flash.o rcc.o usart.o dma.o rtc.o comparator.o crc.o \ +OBJS = can.o flash.o rcc.o usart.o dma.o rtc.o comparator.o crc.o \ dac.o iwdg.o pwr.o gpio.o timer.o adc.o desig.o OBJS += gpio_common_all.o gpio_common_f0234.o crc_common_all.o \