aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoonas Javanainen <[email protected]>2024-02-01 21:48:29 +0200
committerJoonas Javanainen <[email protected]>2024-02-01 21:48:29 +0200
commit21024e863820d4a3ddb9e72041251c72d10ee5a6 (patch)
treec6c28ce8aeb09c698bcfb0eecf7a64d75ad7c84e
parentc4839e4671ade4b69f47e5436b5e44fae9109159 (diff)
Fix F2 temperature sensor ADC channel
On all F2 devices (F205/207/215/217) the sensor is connected to ADC1_IN16, and is not shared with VBAT which is connected to ADC1_IN18.
-rw-r--r--embassy-stm32/src/adc/v2.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-stm32/src/adc/v2.rs b/embassy-stm32/src/adc/v2.rs
index 4622b40a9..036a4ec37 100644
--- a/embassy-stm32/src/adc/v2.rs
+++ b/embassy-stm32/src/adc/v2.rs
@@ -34,7 +34,7 @@ impl AdcPin<ADC1> for Temperature {}
34impl super::sealed::AdcPin<ADC1> for Temperature { 34impl super::sealed::AdcPin<ADC1> for Temperature {
35 fn channel(&self) -> u8 { 35 fn channel(&self) -> u8 {
36 cfg_if::cfg_if! { 36 cfg_if::cfg_if! {
37 if #[cfg(any(stm32f40, stm32f41))] { 37 if #[cfg(any(stm32f2, stm32f40, stm32f41))] {
38 16 38 16
39 } else { 39 } else {
40 18 40 18