diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-09 16:39:59 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-09 16:39:59 +0000 |
commit | 126b87e92e4e865bd17be99dd4b807655c4a97a8 (patch) | |
tree | c44f20bae049c2ffb0aa61f8e5099e986e98f8a9 /nuttx/arch/arm/src/stm32/stm32_rtc.c | |
parent | 9f1b0571589985f9aaed28f12a0af9c55c56a0c1 (diff) | |
download | px4-nuttx-126b87e92e4e865bd17be99dd4b807655c4a97a8.tar.gz px4-nuttx-126b87e92e4e865bd17be99dd4b807655c4a97a8.tar.bz2 px4-nuttx-126b87e92e4e865bd17be99dd4b807655c4a97a8.zip |
Updates for STM32 F3 SPI and RTC
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5631 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/stm32/stm32_rtc.c')
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_rtc.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_rtc.c b/nuttx/arch/arm/src/stm32/stm32_rtc.c index b79a74dcb..5d4e0896e 100644 --- a/nuttx/arch/arm/src/stm32/stm32_rtc.c +++ b/nuttx/arch/arm/src/stm32/stm32_rtc.c @@ -65,16 +65,22 @@ * for the selected STM32 family. The correct file cannot be selected by * the make system because it needs the intelligence that only exists in * chip.h that can associate an STM32 part number with an STM32 family. - * - * The STM32 F4 RTC differs dramatically the F1 RTC. The F1 RTC is a simple - * battery-backed counter; the F4 RTC is provides broken-out data/time in BCD - * format. + */ + +/* The STM32 F1 has a simple battery-backed counter for its RTC and has a separate + * block for the BKP registers. */ #if defined(CONFIG_STM32_STM32F10XX) -# include "stm32f10xxx_rtc.c" -#elif defined(CONFIG_STM32_STM32F20XX) -# include "stm32f20xxx_rtc.c" -#elif defined(CONFIG_STM32_STM32F40XX) -# include "stm32f40xxx_rtc.c" +# include "stm32_rtcounter.c" + +/* The other families use a more traditional Realtime Clock/Calendar (RTCC) with + * broken-out data/time in BCD format. The backup registers are integrated into + * the RTCC in these families. + */ + +#elif defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F30XX) ||\ + defined(CONFIG_STM32_STM32F40XX) +# include "stm32_rtcc.c" #endif + |