From 322cfafed353ddfbe62121238ef97c56dd7a6eed Mon Sep 17 00:00:00 2001 From: chemicstry Date: Fri, 7 Oct 2022 14:53:03 +0300 Subject: [PATCH] Fix adc_v4 compilation --- embassy-stm32/src/adc/v4.rs | 8 ++++---- 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; use pac::adc::vals::{Adcaldif, Boost, Difsel, Exten, Pcsel}; use pac::adccommon::vals::Presc; -use super::{AdcPin, Instance}; +use super::{AdcPin, Instance, InternalChannel}; use crate::time::Hertz; use crate::{pac, Peripheral}; @@ -53,7 +53,7 @@ impl Resolution { // 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 pub struct VrefInt; impl InternalChannel for VrefInt {} -impl sealed::InternalChannel for VrefInt { +impl super::sealed::InternalChannel for VrefInt { fn channel(&self) -> u8 { 19 } @@ -61,7 +61,7 @@ impl sealed::InternalChannel for VrefInt { pub struct Temperature; impl InternalChannel for Temperature {} -impl sealed::InternalChannel for Temperature { +impl super::sealed::InternalChannel for Temperature { fn channel(&self) -> u8 { 18 } @@ -69,7 +69,7 @@ impl sealed::InternalChannel for Temperature { pub struct Vbat; impl InternalChannel for Vbat {} -impl sealed::InternalChannel for Vbat { +impl super::sealed::InternalChannel for Vbat { fn channel(&self) -> u8 { // TODO this should be 14 for H7a/b/35 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 @@ use cortex_m::prelude::_embedded_hal_blocking_delay_DelayUs; use defmt::*; use embassy_executor::Spawner; -use embassy_stm32::adc::{Adc, SampleTime, Temperature, VrefInt}; +use embassy_stm32::adc::{Adc, Temperature, VrefInt}; use embassy_time::{Delay, Duration, Timer}; use {defmt_rtt as _, panic_probe as _};