From d67aec1cc8d582fef3d1018a389a70e985df92cf Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Sat, 3 Oct 2015 18:00:13 +0000 Subject: [PATCH] stm32: Clock Recovery System is a common peripheral. Pull it out of the F0 directory ready to be used by other devices with this peripheral. --- .../libopencm3/stm32/{f0/crs.h => common/crs_common_all.h} | 4 ++-- include/libopencm3/stm32/crs.h | 6 +++--- lib/stm32/{f0/crs.c => common/crs_common_all.c} | 6 +++--- lib/stm32/f0/Makefile | 3 ++- 4 files changed, 10 insertions(+), 9 deletions(-) rename include/libopencm3/stm32/{f0/crs.h => common/crs_common_all.h} (97%) rename lib/stm32/{f0/crs.c => common/crs_common_all.c} (88%) diff --git a/include/libopencm3/stm32/f0/crs.h b/include/libopencm3/stm32/common/crs_common_all.h similarity index 97% rename from include/libopencm3/stm32/f0/crs.h rename to include/libopencm3/stm32/common/crs_common_all.h index dc7eeee0..2ce29f36 100644 --- a/include/libopencm3/stm32/f0/crs.h +++ b/include/libopencm3/stm32/common/crs_common_all.h @@ -1,8 +1,8 @@ /** @defgroup CRS_defines CRS Defines * - * @brief Defined Constants and Types for the STM32F0xx Clock Recovery + * @brief STM32 Clock Recovery System: Defined Constants and Types * - * @ingroup STM32F0xx_defines + * @ingroup STM32_defines * * @version 1.0.0 * diff --git a/include/libopencm3/stm32/crs.h b/include/libopencm3/stm32/crs.h index d75a624a..95c3985d 100644 --- a/include/libopencm3/stm32/crs.h +++ b/include/libopencm3/stm32/crs.h @@ -1,4 +1,4 @@ -/* This provides unification of code over STM32F subfamilies */ +/* This provides unification of code over STM32 subfamilies */ /* * This file is part of the libopencm3 project. @@ -21,8 +21,8 @@ #include #if defined(STM32F0) -# include +# include #else -# error "stm32 family not defined." +# error "stm32 family not defined or not supported for this peripheral" #endif diff --git a/lib/stm32/f0/crs.c b/lib/stm32/common/crs_common_all.c similarity index 88% rename from lib/stm32/f0/crs.c rename to lib/stm32/common/crs_common_all.c index 63f3e341..5cb73bfd 100644 --- a/lib/stm32/f0/crs.c +++ b/lib/stm32/common/crs_common_all.c @@ -1,8 +1,8 @@ /** @defgroup crs_file CRS * - * @ingroup STM32F0xx + * @ingroup STM32xx * - * @brief libopencm3 STM32F0xx Clock Recovery Subsystem + * @brief libopencm3 STM32 Clock Recovery Subsystem * * @version 1.0.0 * @@ -32,7 +32,7 @@ #include /** - * This function enables autonatic trimming of internal RC oscillator by USB SOF + * This function enables automatic trimming of internal RC oscillator by USB SOF * frames */ void crs_autotrim_usb_enable(void) diff --git a/lib/stm32/f0/Makefile b/lib/stm32/f0/Makefile index 152f2d7a..3c3b45a5 100644 --- a/lib/stm32/f0/Makefile +++ b/lib/stm32/f0/Makefile @@ -42,7 +42,8 @@ OBJS += gpio_common_all.o gpio_common_f0234.o crc_common_all.o \ pwr_common_all.o iwdg_common_all.o rtc_common_l1f024.o \ dma_common_l1f013.o exti_common_all.o spi_common_all.o \ spi_common_f03.o flash_common_f01.o dac_common_all.o \ - timer_common_all.o rcc_common_all.o crs.o + timer_common_all.o rcc_common_all.o +OBJS += crs_common_all.o OBJS += usb.o usb_control.o usb_standard.o OBJS += st_usbfs_core.o st_usbfs_v2.o