aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32g0
diff options
context:
space:
mode:
authorPer Rosengren <[email protected]>2025-09-16 19:11:13 +0200
committerPer Rosengren <[email protected]>2025-09-16 19:11:13 +0200
commit07e86b23f1149440d022614b04916edeafeccfa5 (patch)
tree9b81ac8afc0f8b2331a43cc9c8bf898157ac206c /examples/stm32g0
parent4a6d8a3fdfcb695ebd408cd59bfb43e5878d265f (diff)
Re-export API enums and update examples
Diffstat (limited to 'examples/stm32g0')
-rw-r--r--examples/stm32g0/src/bin/adc_oversampling.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/stm32g0/src/bin/adc_oversampling.rs b/examples/stm32g0/src/bin/adc_oversampling.rs
index bc49fac83..d27e6f582 100644
--- a/examples/stm32g0/src/bin/adc_oversampling.rs
+++ b/examples/stm32g0/src/bin/adc_oversampling.rs
@@ -7,7 +7,7 @@
7 7
8use defmt::*; 8use defmt::*;
9use embassy_executor::Spawner; 9use embassy_executor::Spawner;
10use embassy_stm32::adc::{Adc, Clock, Presc, SampleTime}; 10use embassy_stm32::adc::{Adc, Clock, Ovsr, Ovss, Presc, SampleTime};
11use embassy_time::Timer; 11use embassy_time::Timer;
12use {defmt_rtt as _, panic_probe as _}; 12use {defmt_rtt as _, panic_probe as _};
13 13
@@ -31,8 +31,8 @@ async fn main(_spawner: Spawner) {
31 // 0x05 oversampling ratio X64 31 // 0x05 oversampling ratio X64
32 // 0x06 oversampling ratio X128 32 // 0x06 oversampling ratio X128
33 // 0x07 oversampling ratio X256 33 // 0x07 oversampling ratio X256
34 adc.set_oversampling_ratio(0x03); 34 adc.set_oversampling_ratio(Ovsr::MUL16);
35 adc.set_oversampling_shift(0b0000); 35 adc.set_oversampling_shift(Ovss::NO_SHIFT);
36 adc.oversampling_enable(true); 36 adc.oversampling_enable(true);
37 37
38 loop { 38 loop {