diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2012-06-07 04:39:22 -0400 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2012-06-07 19:15:04 -0400 |
commit | 0acbcb9c50d6eeb41d6036b2706a7b3d2b5e4b3c (patch) | |
tree | 98c658ba38cf1821702e2d3beb3164979f1d46ab /libmaple/stm32f1 | |
parent | cb15495943b560cb0ca45e652bbcf7e14df2eadc (diff) | |
download | librambutan-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/stm32f1')
-rw-r--r-- | libmaple/stm32f1/timer.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/libmaple/stm32f1/timer.c b/libmaple/stm32f1/timer.c index 002b9d6..8671695 100644 --- a/libmaple/stm32f1/timer.c +++ b/libmaple/stm32f1/timer.c @@ -54,10 +54,10 @@ * Defer to the timer_private API. */ -static DECLARE_ADVANCED_TIMER(timer1, 1); -static DECLARE_GENERAL_TIMER(timer2, 2); -static DECLARE_GENERAL_TIMER(timer3, 3); -static DECLARE_GENERAL_TIMER(timer4, 4); +static timer_dev timer1 = ADVANCED_TIMER(1); +static timer_dev timer2 = GENERAL_TIMER(2); +static timer_dev timer3 = GENERAL_TIMER(3); +static timer_dev timer4 = GENERAL_TIMER(4); /** Timer 1 device (advanced) */ timer_dev *TIMER1 = &timer1; @@ -69,10 +69,10 @@ timer_dev *TIMER3 = &timer3; timer_dev *TIMER4 = &timer4; #if defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY) -static DECLARE_GENERAL_TIMER(timer5, 5); -static DECLARE_BASIC_TIMER(timer6, 6); -static DECLARE_BASIC_TIMER(timer7, 7); -static DECLARE_ADVANCED_TIMER(timer8, 8); +static timer_dev timer5 = GENERAL_TIMER(5); +static timer_dev timer6 = BASIC_TIMER(6); +static timer_dev timer7 = BASIC_TIMER(7); +static timer_dev timer8 = ADVANCED_TIMER(8); /** Timer 5 device (general-purpose) */ timer_dev *TIMER5 = &timer5; @@ -86,17 +86,17 @@ timer_dev *TIMER8 = &timer8; #ifdef STM32_XL_DENSITY /* TIM9 has UIE, CC1IE, CC2IE, TIE bits in DIER. */ -static DECLARE_RESTRICTED_GENERAL_TIMER(timer9, 9, TIMER_DIER_TIE_BIT); +static timer_dev timer9 = RESTRICTED_GENERAL_TIMER(9, TIMER_DIER_TIE_BIT); /* TIM10 has UIE, CC1IE. */ -static DECLARE_RESTRICTED_GENERAL_TIMER(timer10, 10, TIMER_DIER_CC1IE_BIT); +static timer_dev timer10 = RESTRICTED_GENERAL_TIMER(10, TIMER_DIER_CC1IE_BIT); /* TIM11 has UIE, CC1IE. */ -static DECLARE_RESTRICTED_GENERAL_TIMER(timer11, 11, TIMER_DIER_CC1IE_BIT); +static timer_dev timer11 = RESTRICTED_GENERAL_TIMER(11, TIMER_DIER_CC1IE_BIT); /* TIM12 has UIE, CC1IE, CC2IE, TIE. */ -static DECLARE_RESTRICTED_GENERAL_TIMER(timer12, 12, TIMER_DIER_TIE_BIT); +static timer_dev timer12 = RESTRICTED_GENERAL_TIMER(12, TIMER_DIER_TIE_BIT); /* TIM13 has UIE, CC1IE. */ -static DECLARE_RESTRICTED_GENERAL_TIMER(timer13, 13, TIMER_DIER_CC1IE_BIT); +static timer_dev timer13 = RESTRICTED_GENERAL_TIMER(13, TIMER_DIER_CC1IE_BIT); /* TIM14 has UIE, CC1IE. */ -static DECLARE_RESTRICTED_GENERAL_TIMER(timer14, 14, TIMER_DIER_CC1IE_BIT); +static timer_dev timer14 = RESTRICTED_GENERAL_TIMER(14, TIMER_DIER_CC1IE_BIT); /** Timer 9 device (general-purpose) */ timer_dev *TIMER9 = &timer9; |