summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Schodet2016-02-17 14:44:34 +0100
committerNicolas Schodet2019-10-07 00:44:57 +0200
commit3d18e950a5f87777e135bf430d5087a82040f5be (patch)
tree7c1fd2a93c13ecc3bd7ed8c6bcb0c03b702b088e
parent14d8e68466cdc4fbda3abe5b5cc78ea64a4a8be4 (diff)
ucoo/hal/timer: add timer 5
-rw-r--r--ucoo/hal/timer/timer.stm32.tcc16
1 files changed, 16 insertions, 0 deletions
diff --git a/ucoo/hal/timer/timer.stm32.tcc b/ucoo/hal/timer/timer.stm32.tcc
index e95deff..9adc8d2 100644
--- a/ucoo/hal/timer/timer.stm32.tcc
+++ b/ucoo/hal/timer/timer.stm32.tcc
@@ -87,6 +87,22 @@ struct TimerHardware<TIM4>
};
template<>
+struct TimerHardware<TIM5>
+{
+ static const enum rcc_periph_clken clken = RCC_TIM5;
+ static int freq () { return 2 * rcc_apb1_frequency; }
+#if defined TARGET_stm32f4
+ static const unsigned int max = 0xffffffff;
+#else
+ static const unsigned int max = 0xffff;
+#endif
+ static const bool advanced = false;
+ static const bool slave = true;
+ static const bool one_pulse = true;
+ static const int channels = 4;
+};
+
+template<>
struct TimerHardware<TIM10>
{
static const enum rcc_periph_clken clken = RCC_TIM10;