stm32: update adc examples

This commit is contained in:
Andres Vahter
2024-04-10 10:49:42 +03:00
parent 68b1a840c6
commit fd901fc7e0
11 changed files with 25 additions and 26 deletions

View File

@@ -13,7 +13,7 @@ use embassy_executor::Spawner;
use embassy_stm32::adc::Adc;
use embassy_stm32::dac::{DacCh1, Value};
use embassy_stm32::dma::NoDma;
use embassy_time::{Delay, Timer};
use embassy_time::Timer;
use micromath::F32Ext;
use {defmt_rtt as _, panic_probe as _};
@@ -28,7 +28,7 @@ async fn main(_spawner: Spawner) {
let mut adc_pin = unsafe { core::ptr::read(&dac_pin) };
let mut dac = DacCh1::new(dac, NoDma, dac_pin);
let mut adc = Adc::new(adc, &mut Delay);
let mut adc = Adc::new(adc);
#[cfg(feature = "stm32h755zi")]
let normalization_factor = 256;