stm32/adc: cleanup f1, f3, v1, and v2

This commit is contained in:
xoviat
2023-09-27 20:58:46 -05:00
parent 20ea76c19c
commit 79146c4bd5
9 changed files with 116 additions and 64 deletions

View File

@ -24,7 +24,7 @@ async fn main(_spawner: Spawner) {
let mut pin = p.PA1;
let mut vrefint = adc.enable_vref(&mut Delay);
let vrefint_sample = adc.read_internal(&mut vrefint).await;
let vrefint_sample = adc.read(&mut vrefint).await;
let convert_to_millivolts = |sample| {
// From https://www.st.com/resource/en/datasheet/stm32f031c6.pdf
// 6.3.4 Embedded reference voltage