Skip to content

Commit fbf4ffb

Browse files
committed
Reorder code
`AdcExt` was mixed in between the `Adc` `impl` blocks.
1 parent f47d625 commit fbf4ffb

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/adc.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ use crate::{
99
};
1010

1111

12+
pub trait AdcExt {
13+
fn constrain(self, rcc: &mut Rcc) -> Adc<Ready>;
14+
}
15+
16+
impl AdcExt for ADC {
17+
fn constrain(self, rcc: &mut Rcc) -> Adc<Ready> {
18+
Adc::new(self, rcc)
19+
}
20+
}
21+
22+
1223
/// ADC Result Alignment
1324
#[derive(PartialEq)]
1425
pub enum Align {
@@ -130,17 +141,6 @@ impl<State> Adc<State> {
130141
}
131142
}
132143

133-
134-
pub trait AdcExt {
135-
fn constrain(self, rcc: &mut Rcc) -> Adc<Ready>;
136-
}
137-
138-
impl AdcExt for ADC {
139-
fn constrain(self, rcc: &mut Rcc) -> Adc<Ready> {
140-
Adc::new(self, rcc)
141-
}
142-
}
143-
144144
impl<WORD, PIN> OneShot<Adc<Ready>, WORD, PIN> for Adc<Ready>
145145
where
146146
WORD: From<u16>,

0 commit comments

Comments
 (0)