From 3d18e950a5f87777e135bf430d5087a82040f5be Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Wed, 17 Feb 2016 14:44:34 +0100 Subject: ucoo/hal/timer: add timer 5 --- ucoo/hal/timer/timer.stm32.tcc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ucoo') 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 @@ -86,6 +86,22 @@ struct TimerHardware static const int channels = 4; }; +template<> +struct TimerHardware +{ + 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 { -- cgit v1.2.3