diff options
| author | Per Rosengren <[email protected]> | 2025-09-16 19:11:13 +0200 |
|---|---|---|
| committer | Per Rosengren <[email protected]> | 2025-09-16 19:11:13 +0200 |
| commit | 07e86b23f1149440d022614b04916edeafeccfa5 (patch) | |
| tree | 9b81ac8afc0f8b2331a43cc9c8bf898157ac206c /examples | |
| parent | 4a6d8a3fdfcb695ebd408cd59bfb43e5878d265f (diff) | |
Re-export API enums and update examples
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32g0/src/bin/adc_oversampling.rs | 6 |
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 | ||
| 8 | use defmt::*; | 8 | use defmt::*; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_stm32::adc::{Adc, Clock, Presc, SampleTime}; | 10 | use embassy_stm32::adc::{Adc, Clock, Ovsr, Ovss, Presc, SampleTime}; |
| 11 | use embassy_time::Timer; | 11 | use embassy_time::Timer; |
| 12 | use {defmt_rtt as _, panic_probe as _}; | 12 | use {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 { |
