From 312f6b9f6a1dfd9634daac196aeaf7676aba36a1 Mon Sep 17 00:00:00 2001 From: Gaute Hope Date: Mon, 28 Feb 2022 18:02:59 +0100 Subject: [PATCH] add TIM3, TIM4, TIM5, TIM17 --- src/timer.rs | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/src/timer.rs b/src/timer.rs index aecee2c3..f37df24e 100644 --- a/src/timer.rs +++ b/src/timer.rs @@ -51,7 +51,7 @@ use crate::stm32::{TIM15, TIM16, TIM2, TIM6}; feature = "stm32l4r9", feature = "stm32l4s9", ))] -use crate::stm32::{TIM17, TIM4, TIM5}; +use crate::stm32::{TIM17, TIM3, TIM4, TIM5}; // TIM1/TIM8 ("Advcanced Control Timers") -> no impl // TIM2/TIM3/TIM4/TIM5 ("General Purpose Timers") @@ -267,21 +267,20 @@ hal! { // missing PAC support // RCC_APB1RSTR1->TIM3RST not defined -/* #[cfg(any( - feature = "stm32l451", - feature = "stm32l452", - feature = "stm32l462", - feature = "stm32l471", - feature = "stm32l475", - feature = "stm32l476", - feature = "stm32l485", - feature = "stm32l486", - feature = "stm32l496", - feature = "stm32l4a6", + // feature = "stm32l451", + // feature = "stm32l452", + // feature = "stm32l462", + // feature = "stm32l471", + // feature = "stm32l475", + // feature = "stm32l476", + // feature = "stm32l485", + // feature = "stm32l486", + // feature = "stm32l496", + // feature = "stm32l4a6", // feature = "stm32l4p5", // feature = "stm32l4q5", - // feature = "stm32l4r5", + feature = "stm32l4r5", // feature = "stm32l4s5", // feature = "stm32l4r7", // feature = "stm32l4s7", @@ -289,9 +288,8 @@ hal! { feature = "stm32l4s9", ))] hal! { - TIM3: (tim3, free_running_tim3, tim3en, tim3rst, APB1R1, u32), + TIM3: (tim3, free_running_tim3, APB1R1, u16), } -*/ #[cfg(not(any( feature = "stm32l412", @@ -313,7 +311,7 @@ hal! { feature = "stm32l4a6", // feature = "stm32l4p5", // feature = "stm32l4q5", - // feature = "stm32l4r5", + feature = "stm32l4r5", // feature = "stm32l4s5", // feature = "stm32l4r7", // feature = "stm32l4s7",