diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2014-10-15 16:01:35 +0800 |
---|---|---|
committer | bryan newbold <bnewbold@twinleaf.com> | 2014-11-24 15:18:04 -0800 |
commit | 098f35d02589b1e0a38b7787aa1fd4582aab51b1 (patch) | |
tree | 6e9a6d452e300e18214317850e24e8842b8e1948 | |
parent | d91e4c67ea72425a9dd7d18862f93336ff12d23b (diff) | |
download | librambutan-098f35d02589b1e0a38b7787aa1fd4582aab51b1.tar.gz librambutan-098f35d02589b1e0a38b7787aa1fd4582aab51b1.zip |
HardwareTimer.cpp: use STM32_TIMER_MASK
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
-rw-r--r-- | wirish/HardwareTimer.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/wirish/HardwareTimer.cpp b/wirish/HardwareTimer.cpp index 4f68ad7..1d9fe61 100644 --- a/wirish/HardwareTimer.cpp +++ b/wirish/HardwareTimer.cpp @@ -2,6 +2,7 @@ * The MIT License * * Copyright (c) 2010 Bryan Newbold. + * Copyright 2014 Google, Inc. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -26,6 +27,7 @@ #include <wirish/HardwareTimer.h> +#include <libmaple/stm32.h> #include <libmaple/rcc.h> #include <wirish/ext_interrupts.h> // for noInterrupts(), interrupts() #include <wirish/wirish_math.h> @@ -144,13 +146,27 @@ void HardwareTimer::refresh(void) { /* -- Deprecated predefined instances -------------------------------------- */ +#if STM32_TIMER_MASK & (1 << 1) HardwareTimer Timer1(1); +#endif +#if STM32_TIMER_MASK & (1 << 2) HardwareTimer Timer2(2); +#endif +#if STM32_TIMER_MASK & (1 << 3) HardwareTimer Timer3(3); +#endif +#if STM32_TIMER_MASK & (1 << 4) HardwareTimer Timer4(4); -#ifdef STM32_HIGH_DENSITY +#endif +#if STM32_TIMER_MASK & (1 << 5) HardwareTimer Timer5(5); +#endif +#if STM32_TIMER_MASK & (1 << 6) HardwareTimer Timer6(6); +#endif +#if STM32_TIMER_MASK & (1 << 7) HardwareTimer Timer7(7); +#endif +#if STM32_TIMER_MASK & (1 << 8) HardwareTimer Timer8(8); #endif |