We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f47d625 commit fbf4ffbCopy full SHA for fbf4ffb
src/adc.rs
@@ -9,6 +9,17 @@ use crate::{
9
};
10
11
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
23
/// ADC Result Alignment
24
#[derive(PartialEq)]
25
pub enum Align {
@@ -130,17 +141,6 @@ impl<State> Adc<State> {
130
141
}
131
142
132
143
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)
- }
144
impl<WORD, PIN> OneShot<Adc<Ready>, WORD, PIN> for Adc<Ready>
145
where
146
WORD: From<u16>,
0 commit comments