From 098f35d02589b1e0a38b7787aa1fd4582aab51b1 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Wed, 15 Oct 2014 16:01:35 +0800 Subject: HardwareTimer.cpp: use STM32_TIMER_MASK Signed-off-by: Marti Bolivar --- wirish/HardwareTimer.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'wirish') 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 +#include #include #include // for noInterrupts(), interrupts() #include @@ -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 -- cgit v1.2.3