diff options
| -rw-r--r-- | embassy-stm32/src/adc/v4.rs | 8 | ||||
| -rw-r--r-- | examples/stm32f4/src/bin/adc.rs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/embassy-stm32/src/adc/v4.rs b/embassy-stm32/src/adc/v4.rs index 7e6a219e1..eda2b2a72 100644 --- a/embassy-stm32/src/adc/v4.rs +++ b/embassy-stm32/src/adc/v4.rs | |||
| @@ -5,7 +5,7 @@ use embedded_hal_02::blocking::delay::DelayUs; | |||
| 5 | use pac::adc::vals::{Adcaldif, Boost, Difsel, Exten, Pcsel}; | 5 | use pac::adc::vals::{Adcaldif, Boost, Difsel, Exten, Pcsel}; |
| 6 | use pac::adccommon::vals::Presc; | 6 | use pac::adccommon::vals::Presc; |
| 7 | 7 | ||
| 8 | use super::{AdcPin, Instance}; | 8 | use super::{AdcPin, Instance, InternalChannel}; |
| 9 | use crate::time::Hertz; | 9 | use crate::time::Hertz; |
| 10 | use crate::{pac, Peripheral}; | 10 | use crate::{pac, Peripheral}; |
| 11 | 11 | ||
| @@ -53,7 +53,7 @@ impl Resolution { | |||
| 53 | // NOTE: Vrefint/Temperature/Vbat are only available on ADC3 on H7, this currently cannot be modeled with stm32-data, so these are available from the software on all ADCs | 53 | // NOTE: Vrefint/Temperature/Vbat are only available on ADC3 on H7, this currently cannot be modeled with stm32-data, so these are available from the software on all ADCs |
| 54 | pub struct VrefInt; | 54 | pub struct VrefInt; |
| 55 | impl<T: Instance> InternalChannel<T> for VrefInt {} | 55 | impl<T: Instance> InternalChannel<T> for VrefInt {} |
| 56 | impl<T: Instance> sealed::InternalChannel<T> for VrefInt { | 56 | impl<T: Instance> super::sealed::InternalChannel<T> for VrefInt { |
| 57 | fn channel(&self) -> u8 { | 57 | fn channel(&self) -> u8 { |
| 58 | 19 | 58 | 19 |
| 59 | } | 59 | } |
| @@ -61,7 +61,7 @@ impl<T: Instance> sealed::InternalChannel<T> for VrefInt { | |||
| 61 | 61 | ||
| 62 | pub struct Temperature; | 62 | pub struct Temperature; |
| 63 | impl<T: Instance> InternalChannel<T> for Temperature {} | 63 | impl<T: Instance> InternalChannel<T> for Temperature {} |
| 64 | impl<T: Instance> sealed::InternalChannel<T> for Temperature { | 64 | impl<T: Instance> super::sealed::InternalChannel<T> for Temperature { |
| 65 | fn channel(&self) -> u8 { | 65 | fn channel(&self) -> u8 { |
| 66 | 18 | 66 | 18 |
| 67 | } | 67 | } |
| @@ -69,7 +69,7 @@ impl<T: Instance> sealed::InternalChannel<T> for Temperature { | |||
| 69 | 69 | ||
| 70 | pub struct Vbat; | 70 | pub struct Vbat; |
| 71 | impl<T: Instance> InternalChannel<T> for Vbat {} | 71 | impl<T: Instance> InternalChannel<T> for Vbat {} |
| 72 | impl<T: Instance> sealed::InternalChannel<T> for Vbat { | 72 | impl<T: Instance> super::sealed::InternalChannel<T> for Vbat { |
| 73 | fn channel(&self) -> u8 { | 73 | fn channel(&self) -> u8 { |
| 74 | // TODO this should be 14 for H7a/b/35 | 74 | // TODO this should be 14 for H7a/b/35 |
| 75 | 17 | 75 | 17 |
diff --git a/examples/stm32f4/src/bin/adc.rs b/examples/stm32f4/src/bin/adc.rs index 6f80c1ef1..1d030f7dc 100644 --- a/examples/stm32f4/src/bin/adc.rs +++ b/examples/stm32f4/src/bin/adc.rs | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | use cortex_m::prelude::_embedded_hal_blocking_delay_DelayUs; | 5 | use cortex_m::prelude::_embedded_hal_blocking_delay_DelayUs; |
| 6 | use defmt::*; | 6 | use defmt::*; |
| 7 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
| 8 | use embassy_stm32::adc::{Adc, SampleTime, Temperature, VrefInt}; | 8 | use embassy_stm32::adc::{Adc, Temperature, VrefInt}; |
| 9 | use embassy_time::{Delay, Duration, Timer}; | 9 | use embassy_time::{Delay, Duration, Timer}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 11 | ||
