diff options
Diffstat (limited to 'examples/stm32g4/src')
| -rw-r--r-- | examples/stm32g4/src/bin/adc.rs | 4 | ||||
| -rw-r--r-- | examples/stm32g4/src/bin/pll.rs | 4 | ||||
| -rw-r--r-- | examples/stm32g4/src/bin/usb_serial.rs | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/examples/stm32g4/src/bin/adc.rs b/examples/stm32g4/src/bin/adc.rs index f05733847..63b20c0d4 100644 --- a/examples/stm32g4/src/bin/adc.rs +++ b/examples/stm32g4/src/bin/adc.rs | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | use defmt::*; | 5 | use defmt::*; |
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_stm32::adc::{Adc, SampleTime}; | 7 | use embassy_stm32::adc::{Adc, SampleTime}; |
| 8 | use embassy_stm32::rcc::{AdcClockSource, ClockSrc, Pll, PllM, PllN, PllR, PllSrc}; | 8 | use embassy_stm32::rcc::{AdcClockSource, ClockSrc, Pll, PllM, PllN, PllR, PllSource}; |
| 9 | use embassy_stm32::Config; | 9 | use embassy_stm32::Config; |
| 10 | use embassy_time::{Delay, Timer}; | 10 | use embassy_time::{Delay, Timer}; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| @@ -15,7 +15,7 @@ async fn main(_spawner: Spawner) { | |||
| 15 | let mut config = Config::default(); | 15 | let mut config = Config::default(); |
| 16 | 16 | ||
| 17 | config.rcc.pll = Some(Pll { | 17 | config.rcc.pll = Some(Pll { |
| 18 | source: PllSrc::HSI, | 18 | source: PllSource::HSI, |
| 19 | prediv_m: PllM::DIV4, | 19 | prediv_m: PllM::DIV4, |
| 20 | mul_n: PllN::MUL85, | 20 | mul_n: PllN::MUL85, |
| 21 | div_p: None, | 21 | div_p: None, |
diff --git a/examples/stm32g4/src/bin/pll.rs b/examples/stm32g4/src/bin/pll.rs index 90c3f8dce..09ef59d44 100644 --- a/examples/stm32g4/src/bin/pll.rs +++ b/examples/stm32g4/src/bin/pll.rs | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | use defmt::*; | 5 | use defmt::*; |
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_stm32::rcc::{ClockSrc, Pll, PllM, PllN, PllR, PllSrc}; | 7 | use embassy_stm32::rcc::{ClockSrc, Pll, PllM, PllN, PllR, PllSource}; |
| 8 | use embassy_stm32::Config; | 8 | use embassy_stm32::Config; |
| 9 | use embassy_time::Timer; | 9 | use embassy_time::Timer; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| @@ -14,7 +14,7 @@ async fn main(_spawner: Spawner) { | |||
| 14 | let mut config = Config::default(); | 14 | let mut config = Config::default(); |
| 15 | 15 | ||
| 16 | config.rcc.pll = Some(Pll { | 16 | config.rcc.pll = Some(Pll { |
| 17 | source: PllSrc::HSI, | 17 | source: PllSource::HSI, |
| 18 | prediv_m: PllM::DIV4, | 18 | prediv_m: PllM::DIV4, |
| 19 | mul_n: PllN::MUL85, | 19 | mul_n: PllN::MUL85, |
| 20 | div_p: None, | 20 | div_p: None, |
diff --git a/examples/stm32g4/src/bin/usb_serial.rs b/examples/stm32g4/src/bin/usb_serial.rs index 378e7b988..565b25d60 100644 --- a/examples/stm32g4/src/bin/usb_serial.rs +++ b/examples/stm32g4/src/bin/usb_serial.rs | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | use defmt::{panic, *}; | 5 | use defmt::{panic, *}; |
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_stm32::rcc::{Clock48MhzSrc, ClockSrc, Hsi48Config, Pll, PllM, PllN, PllQ, PllR, PllSrc}; | 7 | use embassy_stm32::rcc::{Clock48MhzSrc, ClockSrc, Hsi48Config, Pll, PllM, PllN, PllQ, PllR, PllSource}; |
| 8 | use embassy_stm32::time::Hertz; | 8 | use embassy_stm32::time::Hertz; |
| 9 | use embassy_stm32::usb::{self, Driver, Instance}; | 9 | use embassy_stm32::usb::{self, Driver, Instance}; |
| 10 | use embassy_stm32::{bind_interrupts, peripherals, Config}; | 10 | use embassy_stm32::{bind_interrupts, peripherals, Config}; |
| @@ -25,14 +25,14 @@ async fn main(_spawner: Spawner) { | |||
| 25 | // Change this to `false` to use the HSE clock source for the USB. This example assumes an 8MHz HSE. | 25 | // Change this to `false` to use the HSE clock source for the USB. This example assumes an 8MHz HSE. |
| 26 | const USE_HSI48: bool = true; | 26 | const USE_HSI48: bool = true; |
| 27 | 27 | ||
| 28 | let pllq_div = if USE_HSI48 { None } else { Some(PllQ::DIV6) }; | 28 | let plldivq = if USE_HSI48 { None } else { Some(PllQ::DIV6) }; |
| 29 | 29 | ||
| 30 | config.rcc.pll = Some(Pll { | 30 | config.rcc.pll = Some(Pll { |
| 31 | source: PllSrc::HSE(Hertz(8_000_000)), | 31 | source: PllSource::HSE(Hertz(8_000_000)), |
| 32 | prediv_m: PllM::DIV2, | 32 | prediv_m: PllM::DIV2, |
| 33 | mul_n: PllN::MUL72, | 33 | mul_n: PllN::MUL72, |
| 34 | div_p: None, | 34 | div_p: None, |
| 35 | div_q: pllq_div, | 35 | div_q: plldivq, |
| 36 | // Main system clock at 144 MHz | 36 | // Main system clock at 144 MHz |
| 37 | div_r: Some(PllR::DIV2), | 37 | div_r: Some(PllR::DIV2), |
| 38 | }); | 38 | }); |
