Skip to content

Commit 312f6b9

Browse files
committed
add TIM3, TIM4, TIM5, TIM17
1 parent 3b136b9 commit 312f6b9

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

src/timer.rs

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ use crate::stm32::{TIM15, TIM16, TIM2, TIM6};
5151
feature = "stm32l4r9",
5252
feature = "stm32l4s9",
5353
))]
54-
use crate::stm32::{TIM17, TIM4, TIM5};
54+
use crate::stm32::{TIM17, TIM3, TIM4, TIM5};
5555

5656
// TIM1/TIM8 ("Advcanced Control Timers") -> no impl
5757
// TIM2/TIM3/TIM4/TIM5 ("General Purpose Timers")
@@ -267,31 +267,29 @@ hal! {
267267

268268
// missing PAC support
269269
// RCC_APB1RSTR1->TIM3RST not defined
270-
/*
271270
#[cfg(any(
272-
feature = "stm32l451",
273-
feature = "stm32l452",
274-
feature = "stm32l462",
275-
feature = "stm32l471",
276-
feature = "stm32l475",
277-
feature = "stm32l476",
278-
feature = "stm32l485",
279-
feature = "stm32l486",
280-
feature = "stm32l496",
281-
feature = "stm32l4a6",
271+
// feature = "stm32l451",
272+
// feature = "stm32l452",
273+
// feature = "stm32l462",
274+
// feature = "stm32l471",
275+
// feature = "stm32l475",
276+
// feature = "stm32l476",
277+
// feature = "stm32l485",
278+
// feature = "stm32l486",
279+
// feature = "stm32l496",
280+
// feature = "stm32l4a6",
282281
// feature = "stm32l4p5",
283282
// feature = "stm32l4q5",
284-
// feature = "stm32l4r5",
283+
feature = "stm32l4r5",
285284
// feature = "stm32l4s5",
286285
// feature = "stm32l4r7",
287286
// feature = "stm32l4s7",
288287
feature = "stm32l4r9",
289288
feature = "stm32l4s9",
290289
))]
291290
hal! {
292-
TIM3: (tim3, free_running_tim3, tim3en, tim3rst, APB1R1, u32),
291+
TIM3: (tim3, free_running_tim3, APB1R1, u16),
293292
}
294-
*/
295293

296294
#[cfg(not(any(
297295
feature = "stm32l412",
@@ -313,7 +311,7 @@ hal! {
313311
feature = "stm32l4a6",
314312
// feature = "stm32l4p5",
315313
// feature = "stm32l4q5",
316-
// feature = "stm32l4r5",
314+
feature = "stm32l4r5",
317315
// feature = "stm32l4s5",
318316
// feature = "stm32l4r7",
319317
// feature = "stm32l4s7",

0 commit comments

Comments
 (0)