aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32/src/adc/v4.rs8
-rw-r--r--examples/stm32f4/src/bin/adc.rs2
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;
5use pac::adc::vals::{Adcaldif, Boost, Difsel, Exten, Pcsel}; 5use pac::adc::vals::{Adcaldif, Boost, Difsel, Exten, Pcsel};
6use pac::adccommon::vals::Presc; 6use pac::adccommon::vals::Presc;
7 7
8use super::{AdcPin, Instance}; 8use super::{AdcPin, Instance, InternalChannel};
9use crate::time::Hertz; 9use crate::time::Hertz;
10use crate::{pac, Peripheral}; 10use 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
54pub struct VrefInt; 54pub struct VrefInt;
55impl<T: Instance> InternalChannel<T> for VrefInt {} 55impl<T: Instance> InternalChannel<T> for VrefInt {}
56impl<T: Instance> sealed::InternalChannel<T> for VrefInt { 56impl<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
62pub struct Temperature; 62pub struct Temperature;
63impl<T: Instance> InternalChannel<T> for Temperature {} 63impl<T: Instance> InternalChannel<T> for Temperature {}
64impl<T: Instance> sealed::InternalChannel<T> for Temperature { 64impl<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
70pub struct Vbat; 70pub struct Vbat;
71impl<T: Instance> InternalChannel<T> for Vbat {} 71impl<T: Instance> InternalChannel<T> for Vbat {}
72impl<T: Instance> sealed::InternalChannel<T> for Vbat { 72impl<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 @@
5use cortex_m::prelude::_embedded_hal_blocking_delay_DelayUs; 5use cortex_m::prelude::_embedded_hal_blocking_delay_DelayUs;
6use defmt::*; 6use defmt::*;
7use embassy_executor::Spawner; 7use embassy_executor::Spawner;
8use embassy_stm32::adc::{Adc, SampleTime, Temperature, VrefInt}; 8use embassy_stm32::adc::{Adc, Temperature, VrefInt};
9use embassy_time::{Delay, Duration, Timer}; 9use embassy_time::{Delay, Duration, Timer};
10use {defmt_rtt as _, panic_probe as _}; 10use {defmt_rtt as _, panic_probe as _};
11 11