Skip to content

Commit 024025b

Browse files
Unify timer HAL impl
1 parent 4b7d91a commit 024025b

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/timer.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
//! Timers
22
use crate::hal::timer::{CountDown, Periodic};
3-
#[cfg(feature = "stm32l0x1")]
43
use crate::pac::{TIM2, TIM21, TIM22, TIM3};
5-
#[cfg(any(feature = "stm32l0x2", feature = "stm32l0x3"))]
6-
use crate::pac::{TIM2, TIM21, TIM3};
74
use crate::rcc::{Clocks, Rcc};
85
use crate::time::Hertz;
96
use cast::{u16, u32};
@@ -195,17 +192,9 @@ macro_rules! timers {
195192
}
196193
}
197194

198-
#[cfg(feature = "stm32l0x1")]
199195
timers! {
200196
TIM2: (tim2, tim2en, tim2rst, apb1enr, apb1rstr, apb1_tim_clk),
201197
TIM3: (tim3, tim3en, tim3rst, apb1enr, apb1rstr, apb1_tim_clk),
202198
TIM21: (tim21, tim21en, tim21rst, apb2enr, apb2rstr, apb2_tim_clk),
203199
TIM22: (tim22, tim22en, tim22rst, apb2enr, apb2rstr, apb2_tim_clk),
204200
}
205-
#[cfg(any(feature = "stm32l0x2", feature = "stm32l0x3"))]
206-
timers! {
207-
TIM2: (tim2, tim2en, tim2rst, apb1enr, apb1rstr, apb1_tim_clk),
208-
TIM3: (tim3, tim3en, tim3rst, apb1enr, apb1rstr, apb1_tim_clk),
209-
TIM21: (tim21, tim21en, tim21rst, apb2enr, apb2rstr, apb2_tim_clk),
210-
//TODO: figure out why I had to remove TIM22 from stm32l0x2 (lthiery)
211-
}

0 commit comments

Comments
 (0)