Browse Source

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
pull/769/head
Karl Palsson 7 years ago
parent
commit
e11e64330c
  1. 2
      include/libopencm3/stm32/f0/rcc.h
  2. 2
      lib/stm32/f0/Makefile

2
include/libopencm3/stm32/f0/rcc.h

@ -437,6 +437,7 @@ enum rcc_periph_clken {
RCC_I2C2 = _REG_BIT(0x1C, 22), RCC_I2C2 = _REG_BIT(0x1C, 22),
RCC_USB = _REG_BIT(0x1C, 23), RCC_USB = _REG_BIT(0x1C, 23),
RCC_CAN = _REG_BIT(0x1C, 25), RCC_CAN = _REG_BIT(0x1C, 25),
RCC_CAN1 = _REG_BIT(0x1C, 25), /* Compatibility alias */
RCC_CRS = _REG_BIT(0x1C, 27), RCC_CRS = _REG_BIT(0x1C, 27),
RCC_PWR = _REG_BIT(0x1C, 28), RCC_PWR = _REG_BIT(0x1C, 28),
RCC_DAC = _REG_BIT(0x1C, 29), RCC_DAC = _REG_BIT(0x1C, 29),
@ -475,6 +476,7 @@ enum rcc_periph_rst {
RST_I2C2 = _REG_BIT(0x10, 22), RST_I2C2 = _REG_BIT(0x10, 22),
RST_USB = _REG_BIT(0x10, 23), RST_USB = _REG_BIT(0x10, 23),
RST_CAN = _REG_BIT(0x10, 25), RST_CAN = _REG_BIT(0x10, 25),
RST_CAN1 = _REG_BIT(0x10, 25), /* Compatibility alias */
RST_CRS = _REG_BIT(0x10, 27), RST_CRS = _REG_BIT(0x10, 27),
RST_PWR = _REG_BIT(0x10, 28), RST_PWR = _REG_BIT(0x10, 28),
RST_DAC = _REG_BIT(0x10, 29), RST_DAC = _REG_BIT(0x10, 29),

2
lib/stm32/f0/Makefile

@ -36,7 +36,7 @@ TGT_CFLAGS += $(STANDARD_FLAGS)
ARFLAGS = rcs 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 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 \ OBJS += gpio_common_all.o gpio_common_f0234.o crc_common_all.o \

Loading…
Cancel
Save