diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32h7/src/bin/adc.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/stm32h7/src/bin/adc.rs b/examples/stm32h7/src/bin/adc.rs index ce73364c0..d8a5d23d7 100644 --- a/examples/stm32h7/src/bin/adc.rs +++ b/examples/stm32h7/src/bin/adc.rs | |||
| @@ -28,11 +28,11 @@ async fn main(_spawner: Spawner, mut p: Peripherals) { | |||
| 28 | 28 | ||
| 29 | adc.set_sample_time(SampleTime::Cycles32_5); | 29 | adc.set_sample_time(SampleTime::Cycles32_5); |
| 30 | 30 | ||
| 31 | let mut vref_channel = adc.enable_vref(); | 31 | let mut vrefint_channel = adc.enable_vrefint(); |
| 32 | 32 | ||
| 33 | loop { | 33 | loop { |
| 34 | let vref = adc.read_internal(&mut vref_channel); | 34 | let vrefint = adc.read_internal(&mut vrefint_channel); |
| 35 | info!("vref: {}", vref); | 35 | info!("vrefint: {}", vrefint); |
| 36 | let measured = adc.read(&mut p.PC0); | 36 | let measured = adc.read(&mut p.PC0); |
| 37 | info!("measured: {}", measured); | 37 | info!("measured: {}", measured); |
| 38 | Timer::after(Duration::from_millis(500)).await; | 38 | Timer::after(Duration::from_millis(500)).await; |
