aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32F1xx
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-20 07:02:14 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-20 07:02:14 +0000
commitda3d1eae7b4035fb916e14ba853a5cf2aa0f70cd (patch)
tree3f4c43f9890533fe1e49188a17436cae24887e16 /os/hal/platforms/STM32F1xx
parentbe4e2ca38d85319cfa5e0b3ea8849ee327e8c7a6 (diff)
downloadChibiOS-da3d1eae7b4035fb916e14ba853a5cf2aa0f70cd.tar.gz
ChibiOS-da3d1eae7b4035fb916e14ba853a5cf2aa0f70cd.tar.bz2
ChibiOS-da3d1eae7b4035fb916e14ba853a5cf2aa0f70cd.zip
RTC. Code reorganization to correspond ChibiOS rules.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3356 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32F1xx')
-rw-r--r--os/hal/platforms/STM32F1xx/hal_lld_f100.h7
-rw-r--r--os/hal/platforms/STM32F1xx/hal_lld_f103.h11
-rw-r--r--os/hal/platforms/STM32F1xx/hal_lld_f105_f107.h7
3 files changed, 25 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32F1xx/hal_lld_f100.h b/os/hal/platforms/STM32F1xx/hal_lld_f100.h
index aad199528..60e42ece4 100644
--- a/os/hal/platforms/STM32F1xx/hal_lld_f100.h
+++ b/os/hal/platforms/STM32F1xx/hal_lld_f100.h
@@ -228,6 +228,13 @@
#define STM32_MCO STM32_MCO_NOCLOCK
#endif
+/**
+ * @brief Clock source selecting. LSI by default.
+ */
+#if !defined(STM32_RTC) || defined(__DOXYGEN__)
+#define STM32_RTC STM32_RTC_LSI
+#endif
+
/*===========================================================================*/
/* Derived constants and error checks. */
/*===========================================================================*/
diff --git a/os/hal/platforms/STM32F1xx/hal_lld_f103.h b/os/hal/platforms/STM32F1xx/hal_lld_f103.h
index 4421663a0..f14ab5dc4 100644
--- a/os/hal/platforms/STM32F1xx/hal_lld_f103.h
+++ b/os/hal/platforms/STM32F1xx/hal_lld_f103.h
@@ -90,6 +90,11 @@
#define STM32_MCO_HSE (6 << 24) /**< HSE clock on MCO pin. */
#define STM32_MCO_PLLDIV2 (7 << 24) /**< PLL/2 clock on MCO pin. */
+#define STM32_RTC_NOCLOCK (0 << 8) /**< No clock */
+#define STM32_RTC_LSE (1 << 8) /**< LSE used as RTC clock */
+#define STM32_RTC_LSI (2 << 8) /**< LSI used as RTC clock */
+#define STM32_RTC_HSE (3 << 8) /**< HSE divided by 128 used as RTC clock */
+
/*===========================================================================*/
/* Platform specific friendly IRQ names. */
/*===========================================================================*/
@@ -251,6 +256,12 @@
#define STM32_MCO STM32_MCO_NOCLOCK
#endif
+/**
+ * @brief Clock source selecting. LSI by default.
+ */
+#if !defined(STM32_RTC) || defined(__DOXYGEN__)
+#define STM32_RTC STM32_RTC_LSI
+#endif
/*===========================================================================*/
/* Derived constants and error checks. */
/*===========================================================================*/
diff --git a/os/hal/platforms/STM32F1xx/hal_lld_f105_f107.h b/os/hal/platforms/STM32F1xx/hal_lld_f105_f107.h
index 27a840ba8..52c124d2d 100644
--- a/os/hal/platforms/STM32F1xx/hal_lld_f105_f107.h
+++ b/os/hal/platforms/STM32F1xx/hal_lld_f105_f107.h
@@ -317,6 +317,13 @@
#define STM32_MCO STM32_MCO_NOCLOCK
#endif
+/**
+ * @brief Clock source selecting. LSI by default.
+ */
+#if !defined(STM32_RTC) || defined(__DOXYGEN__)
+#define STM32_RTC STM32_RTC_LSI
+#endif
+
/*===========================================================================*/
/* Derived constants and error checks. */
/*===========================================================================*/