summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/stm32/stm32_rtc.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-02-09 16:39:59 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-02-09 16:39:59 +0000
commit126b87e92e4e865bd17be99dd4b807655c4a97a8 (patch)
treec44f20bae049c2ffb0aa61f8e5099e986e98f8a9 /nuttx/arch/arm/src/stm32/stm32_rtc.h
parent9f1b0571589985f9aaed28f12a0af9c55c56a0c1 (diff)
downloadpx4-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.h')
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_rtc.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_rtc.h b/nuttx/arch/arm/src/stm32/stm32_rtc.h
index 11822f76c..8e529cb61 100644
--- a/nuttx/arch/arm/src/stm32/stm32_rtc.h
+++ b/nuttx/arch/arm/src/stm32/stm32_rtc.h
@@ -2,7 +2,9 @@
* arch/arm/src/stm32/stm32_rtc.h
*
* Copyright (C) 2011 Uros Platise. All rights reserved.
- * Author: Uros Platise <uros.platise@isotel.eu>
+ * Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
+ * Author: Uros Platise <uros.platise@isotel.eu> (Original for the F1)
+ * Gregory Nutt <gnutt@nuttx.org> (On-going support and development)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -43,13 +45,23 @@
#include <nuttx/config.h>
#include "chip.h"
+
+/* 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 "chip/stm32f10xxx_rtc.h"
+# include "chip/stm32_rtc.h"
# include "chip/stm32_bkp.h"
-#elif defined(CONFIG_STM32_STM32F20XX)
-# include "chip/stm32f20xxx_rtc.h"
-#elif defined(CONFIG_STM32_STM32F40XX)
-# include "chip/stm32f40xxx_rtc.h"
+
+/* 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 "chip/stm32_rtcc.h"
#endif
/************************************************************************************