diff options
| author | Grant Miller <[email protected]> | 2023-04-05 16:52:32 -0500 |
|---|---|---|
| committer | Grant Miller <[email protected]> | 2023-04-05 16:52:32 -0500 |
| commit | 0ef419bee4afc5a984cab3d5f16e1f1382fa6bbf (patch) | |
| tree | d452f26e0e4d167c3cbd6559a17d7b10a797887b | |
| parent | 92e96bd601e8e663114b1efccc4a1e8d309332d9 (diff) | |
Change ADC1 to ADC
| -rw-r--r-- | embassy-stm32/src/adc/v1.rs | 14 |
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; | |||
| 2 | use embedded_hal_02::blocking::delay::DelayUs; | 2 | use embedded_hal_02::blocking::delay::DelayUs; |
| 3 | 3 | ||
| 4 | use crate::adc::{Adc, AdcPin, Instance, InternalChannel, Resolution, SampleTime}; | 4 | use crate::adc::{Adc, AdcPin, Instance, InternalChannel, Resolution, SampleTime}; |
| 5 | use crate::peripherals::ADC1; | 5 | use crate::peripherals::ADC; |
| 6 | use crate::Peripheral; | 6 | use crate::Peripheral; |
| 7 | 7 | ||
| 8 | pub const VDDA_CALIB_MV: u32 = 3300; | 8 | pub const VDDA_CALIB_MV: u32 = 3300; |
| 9 | pub const VREF_INT: u32 = 1230; | 9 | pub const VREF_INT: u32 = 1230; |
| 10 | 10 | ||
| 11 | pub struct Vbat; | 11 | pub struct Vbat; |
| 12 | impl InternalChannel<ADC1> for Vbat {} | 12 | impl InternalChannel<ADC> for Vbat {} |
| 13 | impl super::sealed::InternalChannel<ADC1> for Vbat { | 13 | impl 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 | ||
| 19 | pub struct Vref; | 19 | pub struct Vref; |
| 20 | impl InternalChannel<ADC1> for Vref {} | 20 | impl InternalChannel<ADC> for Vref {} |
| 21 | impl super::sealed::InternalChannel<ADC1> for Vref { | 21 | impl 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 | ||
| 27 | pub struct Temperature; | 27 | pub struct Temperature; |
| 28 | impl InternalChannel<ADC1> for Temperature {} | 28 | impl InternalChannel<ADC> for Temperature {} |
| 29 | impl super::sealed::InternalChannel<ADC1> for Temperature { | 29 | impl super::sealed::InternalChannel<ADC> for Temperature { |
| 30 | fn channel(&self) -> u8 { | 30 | fn channel(&self) -> u8 { |
| 31 | 16 | 31 | 16 |
| 32 | } | 32 | } |
