diff options
| author | Andres Vahter <[email protected]> | 2024-07-03 14:39:10 +0300 |
|---|---|---|
| committer | Andres Vahter <[email protected]> | 2024-07-03 15:20:31 +0300 |
| commit | f851081e09982a3edefd23082bb23143a0172464 (patch) | |
| tree | de03c185f2aa3317cd413bab7fc9efde4581f480 /examples/stm32g4 | |
| parent | 914d7c7919a8eac88f474d658a8078272318731b (diff) | |
stm32 adc: introduce blocking_read
Diffstat (limited to 'examples/stm32g4')
| -rw-r--r-- | examples/stm32g4/src/bin/adc.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/stm32g4/src/bin/adc.rs b/examples/stm32g4/src/bin/adc.rs index 3de38cbd6..adca846d8 100644 --- a/examples/stm32g4/src/bin/adc.rs +++ b/examples/stm32g4/src/bin/adc.rs | |||
| @@ -32,7 +32,7 @@ async fn main(_spawner: Spawner) { | |||
| 32 | adc.set_sample_time(SampleTime::CYCLES24_5); | 32 | adc.set_sample_time(SampleTime::CYCLES24_5); |
| 33 | 33 | ||
| 34 | loop { | 34 | loop { |
| 35 | let measured = adc.read(&mut p.PA7); | 35 | let measured = adc.blocking_read(&mut p.PA7); |
| 36 | info!("measured: {}", measured); | 36 | info!("measured: {}", measured); |
| 37 | Timer::after_millis(500).await; | 37 | Timer::after_millis(500).await; |
| 38 | } | 38 | } |
