Skip to content

Commit dc6dc6d

Browse files
committed
Make Adc::release available in any state
1 parent aa37921 commit dc6dc6d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/adc.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,15 @@ impl Adc<Ready> {
117117
.smpr
118118
.modify(|_, w| w.smp().bits(self.sample_time as u8));
119119
}
120+
}
120121

122+
impl<State> Adc<State> {
121123
pub fn release(self) -> ADC {
122124
self.rb
123125
}
124126
}
125127

128+
126129
pub trait AdcExt {
127130
fn constrain(self, rcc: &mut Rcc) -> Adc<Ready>;
128131
}

0 commit comments

Comments
 (0)