aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f4/src/bin/adc.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stm32f4/src/bin/adc.rs')
-rw-r--r--examples/stm32f4/src/bin/adc.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/stm32f4/src/bin/adc.rs b/examples/stm32f4/src/bin/adc.rs
index 1c9a0b35d..dd10385c4 100644
--- a/examples/stm32f4/src/bin/adc.rs
+++ b/examples/stm32f4/src/bin/adc.rs
@@ -24,7 +24,7 @@ async fn main(_spawner: Spawner) {
24 // Startup delay can be combined to the maximum of either 24 // Startup delay can be combined to the maximum of either
25 delay.delay_us(Temperature::start_time_us().max(VrefInt::start_time_us())); 25 delay.delay_us(Temperature::start_time_us().max(VrefInt::start_time_us()));
26 26
27 let vrefint_sample = adc.read_internal(&mut vrefint); 27 let vrefint_sample = adc.read(&mut vrefint);
28 28
29 let convert_to_millivolts = |sample| { 29 let convert_to_millivolts = |sample| {
30 // From http://www.st.com/resource/en/datasheet/DM00071990.pdf 30 // From http://www.st.com/resource/en/datasheet/DM00071990.pdf
@@ -55,12 +55,12 @@ async fn main(_spawner: Spawner) {
55 info!("PC1: {} ({} mV)", v, convert_to_millivolts(v)); 55 info!("PC1: {} ({} mV)", v, convert_to_millivolts(v));
56 56
57 // Read internal temperature 57 // Read internal temperature
58 let v = adc.read_internal(&mut temp); 58 let v = adc.read(&mut temp);
59 let celcius = convert_to_celcius(v); 59 let celcius = convert_to_celcius(v);
60 info!("Internal temp: {} ({} C)", v, celcius); 60 info!("Internal temp: {} ({} C)", v, celcius);
61 61
62 // Read internal voltage reference 62 // Read internal voltage reference
63 let v = adc.read_internal(&mut vrefint); 63 let v = adc.read(&mut vrefint);
64 info!("VrefInt: {}", v); 64 info!("VrefInt: {}", v);
65 65
66 Timer::after(Duration::from_millis(100)).await; 66 Timer::after(Duration::from_millis(100)).await;