Skip to content

Commit cf0e665

Browse files
committed
fix qei arr
1 parent 88e92d6 commit cf0e665

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ required-features = ["gpiod", "rtic"] # stm32f407
412412

413413
[[example]]
414414
name = "rtic-tick"
415-
required-features = ["gpiod", "rtic"]
415+
required-features = ["rtic"]
416416

417417
[[example]]
418418
name = "adc_dma_rtic"

src/qei.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ macro_rules! hal {
9797
// some chip variants declare `.bits()` as unsafe, some don't
9898
#[allow(unused_unsafe)]
9999
self.smcr.write(|w| unsafe { w.sms().bits(3) });
100-
self.arr.write(|w| unsafe { w.bits(core::u32::MAX) });
100+
#[allow(unused_unsafe)]
101+
self.arr.write(|w| unsafe { w.bits($bits::MAX as u32) });
101102
self.cr1.write(|w| w.cen().set_bit());
102103
}
103104

src/timer.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use crate::rcc::{self, Clocks};
1515
use crate::time::Hertz;
1616

1717
#[cfg(feature = "rtic")]
18+
#[cfg(not(feature = "stm32f410"))]
1819
pub mod monotonic;
1920

2021
/// Timer wrapper

0 commit comments

Comments
 (0)