Skip to content

Commit 8e8d232

Browse files
committed
wrappers
1 parent 8d60bd8 commit 8e8d232

File tree

3 files changed

+392
-325
lines changed

3 files changed

+392
-325
lines changed

src/capture.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use super::timer::{self, Ch1, Ch2, ChExt, InstanceX};
2-
use crate::ext::{Cptcr, MasterExt, TimExt};
2+
use crate::ext::{CptcrW, MasterExt, TimExt};
33
use core::marker::PhantomData;
44

55
pub struct Dma;
@@ -184,8 +184,7 @@ impl<TIM: InstanceX, CH: ChExt, PSCL> HrCapt<TIM, PSCL, CH, NoDma> {
184184
// SAFETY: We are the only one with access to cptXYcr
185185
let tim = unsafe { &*TIM::ptr() };
186186

187-
tim.cptcr(CH::CH)
188-
.modify(|_, w| <TIM::RB as TimExt>::CPT1CRrs::set_swcpt(w));
187+
tim.cptcr(CH::CH).modify(|_, w| w.set_swcpt());
189188
}
190189

191190
// TODO: It would be sufficient to instead of hr_control only require exclusive access to the owning timer

0 commit comments

Comments
 (0)