Skip to content

Commit 375e845

Browse files
committed
Make private Adc method available in any state
1 parent dc6dc6d commit 375e845

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/adc.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ impl Adc<Ready> {
9999
pub fn set_precision(&mut self, precision: Precision) {
100100
self.precision = precision;
101101
}
102+
}
103+
104+
impl<State> Adc<State> {
105+
pub fn release(self) -> ADC {
106+
self.rb
107+
}
102108

103109
fn power_up(&mut self) {
104110
self.rb.isr.modify(|_, w| w.adrdy().set_bit());
@@ -119,12 +125,6 @@ impl Adc<Ready> {
119125
}
120126
}
121127

122-
impl<State> Adc<State> {
123-
pub fn release(self) -> ADC {
124-
self.rb
125-
}
126-
}
127-
128128

129129
pub trait AdcExt {
130130
fn constrain(self, rcc: &mut Rcc) -> Adc<Ready>;

0 commit comments

Comments
 (0)