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.
This commit is contained in:
Joonas Javanainen 2024-02-01 21:48:29 +02:00
parent c4839e4671
commit 21024e8638
No known key found for this signature in database
GPG Key ID: D39CCA5CB19B9179

View File

@ -34,7 +34,7 @@ impl AdcPin<ADC1> for Temperature {}
impl super::sealed::AdcPin<ADC1> for Temperature {
fn channel(&self) -> u8 {
cfg_if::cfg_if! {
if #[cfg(any(stm32f40, stm32f41))] {
if #[cfg(any(stm32f2, stm32f40, stm32f41))] {
16
} else {
18