aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/timer_private.h
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-06-07 04:39:22 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-06-07 19:15:04 -0400
commit0acbcb9c50d6eeb41d6036b2706a7b3d2b5e4b3c (patch)
tree98c658ba38cf1821702e2d3beb3164979f1d46ab /libmaple/timer_private.h
parentcb15495943b560cb0ca45e652bbcf7e14df2eadc (diff)
downloadlibrambutan-0acbcb9c50d6eeb41d6036b2706a7b3d2b5e4b3c.tar.gz
librambutan-0acbcb9c50d6eeb41d6036b2706a7b3d2b5e4b3c.zip
Tweak some timer_private APIs.
The current versions of DELARE_*_TIMER() don't play well with cscope, which is a bad sign. Fix that. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'libmaple/timer_private.h')
-rw-r--r--libmaple/timer_private.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/libmaple/timer_private.h b/libmaple/timer_private.h
index 0eb569d..320c636 100644
--- a/libmaple/timer_private.h
+++ b/libmaple/timer_private.h
@@ -58,8 +58,8 @@
#define NR_BAS_HANDLERS 1
/* For declaring advanced timers. */
-#define DECLARE_ADVANCED_TIMER(name, num) \
- timer_dev name = { \
+#define ADVANCED_TIMER(num) \
+ { \
.regs = { .adv = TIMER##num##_BASE }, \
.clk_id = RCC_TIMER##num, \
.type = TIMER_ADVANCED, \
@@ -67,8 +67,8 @@
}
/* For declaring full-featured general purpose timers. */
-#define DECLARE_GENERAL_TIMER(name, num) \
- timer_dev name = { \
+#define GENERAL_TIMER(num) \
+ { \
.regs = { .gen = TIMER##num##_BASE }, \
.clk_id = RCC_TIMER##num, \
.type = TIMER_GENERAL, \
@@ -78,8 +78,8 @@
/* For declaring general purpose timers with limited interrupt
* capability (e.g. timers 9 through 14 on STM32F2 and XL-density
* STM32F1). */
-#define DECLARE_RESTRICTED_GENERAL_TIMER(name, num, max_dier_bit) \
- timer_dev name = { \
+#define RESTRICTED_GENERAL_TIMER(num, max_dier_bit) \
+ { \
.regs = { .gen = TIMER##num##_BASE }, \
.clk_id = RCC_TIMER##num, \
.type = TIMER_GENERAL, \
@@ -87,8 +87,8 @@
}
/* For declaring basic timers (e.g. TIM6 and TIM7). */
-#define DECLARE_BASIC_TIMER(name, num) \
- timer_dev name = { \
+#define BASIC_TIMER(num) \
+ { \
.regs = { .bas = TIMER##num##_BASE }, \
.clk_id = RCC_TIMER##num, \
.type = TIMER_BASIC, \