Remove duplicate define. Put all phy chip specific defines in its
[bertos.git] / bertos / cpu / cortex-m3 / drv / clock_stm32.h
index 4150a44d1e11c8f6278279e5ce43491b7bd381c8..2538abc411d678645a5931fbdb224333d2c6abd5 100644 (file)
@@ -38,6 +38,9 @@
 #ifndef CLOCK_STM32_H
 #define CLOCK_STM32_H
 
+
+#include <cfg/compiler.h>
+
 /* RCC registers bit address */
 #define RCC_OFFSET                (RCC_BASE - PERIPH_BASE)
 
 #define RCC_APB2_SPI1              (0x00001000)
 #define RCC_APB2_USART1            (0x00004000)
 #define RCC_APB2_ALL               (0x00005E7D)
+
+/**
+ * RCC register:  BCDR
+ */
+#define RCC_BDCR_LSEON             (0x00000001)
+#define RCC_BDCR_LSERDY            (0x00000002)
+#define RCC_BDCR_RTCSEL            (0x00000300)
+#define RCC_BDCR_RTCEN             (0x00008000)
 /*\}*/
 
 /* Crystal frequency of the main oscillator (8MHz) */
+#ifndef PLL_VCO
 #define PLL_VCO                    8000000
+#endif
 
 /* Reset and Clock Controller registers */
 struct RCC