aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/stm32.h
diff options
context:
space:
mode:
authorPerry Hung <iperry@gmail.com>2011-03-21 02:45:58 -0400
committerPerry Hung <iperry@gmail.com>2011-03-21 02:47:53 -0400
commit7241820179bb729d14900676fbff943f7f44cb97 (patch)
treed60a38f908eda00b934b6d3452f6a777c4277be6 /libmaple/stm32.h
parent1591fc9e3f851327c16bbcb88e6abee1706f9cfc (diff)
parentc73306508820705eef4f2cb9f8542acdba599cd8 (diff)
downloadlibrambutan-7241820179bb729d14900676fbff943f7f44cb97.tar.gz
librambutan-7241820179bb729d14900676fbff943f7f44cb97.zip
Merge branch 'i2c-wip' into refactor
Conflicts: examples/test-fsmc.cpp libmaple/rules.mk wirish/boards.h
Diffstat (limited to 'libmaple/stm32.h')
-rw-r--r--libmaple/stm32.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/libmaple/stm32.h b/libmaple/stm32.h
new file mode 100644
index 0000000..21c18df
--- /dev/null
+++ b/libmaple/stm32.h
@@ -0,0 +1,22 @@
+/**
+ * @brief General STM32 specific definitions
+ */
+
+#ifndef _STM32_H_
+#define _STM32_H_
+
+#define PCLK1 36000000U
+#define PCLK2 72000000U
+
+#ifdef STM32_MEDIUM_DENSITY
+ #define NR_INTERRUPTS 43
+#else
+#ifdef STM32_HIGH_DENSITY
+ #define NR_INTERRUPTS 60
+#else
+#error "No STM32 board type defined!"
+#endif
+#endif
+
+#endif
+