diff options
| author | klownfish <[email protected]> | 2024-09-25 16:55:27 +0200 |
|---|---|---|
| committer | klownfish <[email protected]> | 2024-09-25 16:55:27 +0200 |
| commit | 7b45577704c43465587f611da125d86cb3c85207 (patch) | |
| tree | fbac6ec0a098fb40bd7cd826b1b01f066540020d | |
| parent | 8c1b4faae1bd39594e2c331fa4bf9eea3ad22c9e (diff) | |
fix warnings
| -rw-r--r-- | embassy-stm32/src/adc/u5_adc4.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/embassy-stm32/src/adc/u5_adc4.rs b/embassy-stm32/src/adc/u5_adc4.rs index 5dec0caa9..8d0c1abed 100644 --- a/embassy-stm32/src/adc/u5_adc4.rs +++ b/embassy-stm32/src/adc/u5_adc4.rs | |||
| @@ -178,6 +178,7 @@ pub trait Instance: SealedInstance + crate::Peripheral<P = Self> + crate::rcc::R | |||
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | pub struct Adc4<'d, T: Instance> { | 180 | pub struct Adc4<'d, T: Instance> { |
| 181 | #[allow(unused)] | ||
| 181 | adc: crate::PeripheralRef<'d, T>, | 182 | adc: crate::PeripheralRef<'d, T>, |
| 182 | } | 183 | } |
| 183 | 184 | ||
| @@ -372,13 +373,4 @@ impl<'d, T: Instance> Adc4<'d, T> { | |||
| 372 | let ret = self.convert(); | 373 | let ret = self.convert(); |
| 373 | ret | 374 | ret |
| 374 | } | 375 | } |
| 375 | |||
| 376 | fn cancel_conversions() { | ||
| 377 | if T::regs().cr().read().adstart() && !T::regs().cr().read().addis() { | ||
| 378 | T::regs().cr().modify(|reg| { | ||
| 379 | reg.set_adstp(true); | ||
| 380 | }); | ||
| 381 | while T::regs().cr().read().adstart() {} | ||
| 382 | } | ||
| 383 | } | ||
| 384 | } \ No newline at end of file | 376 | } \ No newline at end of file |
