Skip to content

Commit 9516b04

Browse files
committed
Fmt
1 parent 10c1031 commit 9516b04

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

src/hrtim/capture.rs

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ trait HrCapture {
4646
}
4747

4848
macro_rules! impl_capture {
49-
($($TIMX:ident, $CH:ident, $cptXYr:ident, $cptXYcr:ident, $cptXx:ident),+) => {
49+
($($TIMX:ident: $CH:ident, $cptXYr:ident, $cptXYcr:ident, $cptXx:ident),+) => {
5050
$(impl<PSCL> HrCapt<$TIMX, PSCL, $CH> {
5151
/// Add event to capture
5252
///
@@ -96,11 +96,22 @@ macro_rules! impl_capture {
9696
};
9797
}
9898

99-
impl_capture!(
100-
HRTIM_TIMA, Ch1, cpt1ar, cpt1acr, cpt1x, HRTIM_TIMA, Ch2, cpt2ar, cpt2acr, cpt2x, HRTIM_TIMB,
101-
Ch1, cpt1br, cpt1bcr, cpt1x, HRTIM_TIMB, Ch2, cpt2br, cpt2bcr, cpt2x, HRTIM_TIMC, Ch1, cpt1cr,
102-
cpt1ccr, cpt1x, HRTIM_TIMC, Ch2, cpt2cr, cpt2ccr, cpt2x, HRTIM_TIMD, Ch1, cpt1dr, cpt1dcr,
103-
cpt1x, HRTIM_TIMD, Ch2, cpt2dr, cpt2dcr, cpt2x, HRTIM_TIME, Ch1, cpt1er, cpt1ecr, cpt1x,
104-
HRTIM_TIME, Ch2, cpt2er, cpt2ecr, cpt2x, HRTIM_TIMF, Ch1, cpt1fr, cpt1fcr, cpt1x, HRTIM_TIMF,
105-
Ch2, cpt2fr, cpt2fcr, cpt2x
106-
);
99+
impl_capture!{
100+
HRTIM_TIMA: Ch1, cpt1ar, cpt1acr, cpt1x,
101+
HRTIM_TIMA: Ch2, cpt2ar, cpt2acr, cpt2x,
102+
103+
HRTIM_TIMB: Ch1, cpt1br, cpt1bcr, cpt1x,
104+
HRTIM_TIMB: Ch2, cpt2br, cpt2bcr, cpt2x,
105+
106+
HRTIM_TIMC: Ch1, cpt1cr, cpt1ccr, cpt1x,
107+
HRTIM_TIMC: Ch2, cpt2cr, cpt2ccr, cpt2x,
108+
109+
HRTIM_TIMD: Ch1, cpt1dr, cpt1dcr, cpt1x,
110+
HRTIM_TIMD: Ch2, cpt2dr, cpt2dcr, cpt2x,
111+
112+
HRTIM_TIME: Ch1, cpt1er, cpt1ecr, cpt1x,
113+
HRTIM_TIME: Ch2, cpt2er, cpt2ecr, cpt2x,
114+
115+
HRTIM_TIMF: Ch1, cpt1fr, cpt1fcr, cpt1x,
116+
HRTIM_TIMF: Ch2, cpt2fr, cpt2fcr, cpt2x
117+
}

0 commit comments

Comments
 (0)