aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Miller <[email protected]>2023-04-05 16:52:32 -0500
committerGrant Miller <[email protected]>2023-04-05 16:52:32 -0500
commit0ef419bee4afc5a984cab3d5f16e1f1382fa6bbf (patch)
treed452f26e0e4d167c3cbd6559a17d7b10a797887b
parent92e96bd601e8e663114b1efccc4a1e8d309332d9 (diff)
Change ADC1 to ADC
-rw-r--r--embassy-stm32/src/adc/v1.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/embassy-stm32/src/adc/v1.rs b/embassy-stm32/src/adc/v1.rs
index 17114732d..82a8c3efb 100644
--- a/embassy-stm32/src/adc/v1.rs
+++ b/embassy-stm32/src/adc/v1.rs
@@ -2,31 +2,31 @@ use embassy_hal_common::into_ref;
2use embedded_hal_02::blocking::delay::DelayUs; 2use embedded_hal_02::blocking::delay::DelayUs;
3 3
4use crate::adc::{Adc, AdcPin, Instance, InternalChannel, Resolution, SampleTime}; 4use crate::adc::{Adc, AdcPin, Instance, InternalChannel, Resolution, SampleTime};
5use crate::peripherals::ADC1; 5use crate::peripherals::ADC;
6use crate::Peripheral; 6use crate::Peripheral;
7 7
8pub const VDDA_CALIB_MV: u32 = 3300; 8pub const VDDA_CALIB_MV: u32 = 3300;
9pub const VREF_INT: u32 = 1230; 9pub const VREF_INT: u32 = 1230;
10 10
11pub struct Vbat; 11pub struct Vbat;
12impl InternalChannel<ADC1> for Vbat {} 12impl InternalChannel<ADC> for Vbat {}
13impl super::sealed::InternalChannel<ADC1> for Vbat { 13impl super::sealed::InternalChannel<ADC> for Vbat {
14 fn channel(&self) -> u8 { 14 fn channel(&self) -> u8 {
15 18 15 18
16 } 16 }
17} 17}
18 18
19pub struct Vref; 19pub struct Vref;
20impl InternalChannel<ADC1> for Vref {} 20impl InternalChannel<ADC> for Vref {}
21impl super::sealed::InternalChannel<ADC1> for Vref { 21impl super::sealed::InternalChannel<ADC> for Vref {
22 fn channel(&self) -> u8 { 22 fn channel(&self) -> u8 {
23 17 23 17
24 } 24 }
25} 25}
26 26
27pub struct Temperature; 27pub struct Temperature;
28impl InternalChannel<ADC1> for Temperature {} 28impl InternalChannel<ADC> for Temperature {}
29impl super::sealed::InternalChannel<ADC1> for Temperature { 29impl super::sealed::InternalChannel<ADC> for Temperature {
30 fn channel(&self) -> u8 { 30 fn channel(&self) -> u8 {
31 16 31 16
32 } 32 }