diff options
Diffstat (limited to 'examples/stm32f2/src')
| -rw-r--r-- | examples/stm32f2/src/bin/blinky.rs | 4 | ||||
| -rw-r--r-- | examples/stm32f2/src/bin/pll.rs | 16 |
2 files changed, 7 insertions, 13 deletions
diff --git a/examples/stm32f2/src/bin/blinky.rs b/examples/stm32f2/src/bin/blinky.rs index 395f4df51..dd20ba85a 100644 --- a/examples/stm32f2/src/bin/blinky.rs +++ b/examples/stm32f2/src/bin/blinky.rs | |||
| @@ -7,9 +7,7 @@ use embassy::executor::Spawner; | |||
| 7 | use embassy::time::{Duration, Timer}; | 7 | use embassy::time::{Duration, Timer}; |
| 8 | use embassy_stm32::gpio::{Level, Output, Speed}; | 8 | use embassy_stm32::gpio::{Level, Output, Speed}; |
| 9 | use embassy_stm32::Peripherals; | 9 | use embassy_stm32::Peripherals; |
| 10 | 10 | use {defmt_rtt as _, panic_probe as _}; | |
| 11 | use defmt_rtt as _; // global logger | ||
| 12 | use panic_probe as _; | ||
| 13 | 11 | ||
| 14 | #[embassy::main] | 12 | #[embassy::main] |
| 15 | async fn main(_spawner: Spawner, p: Peripherals) { | 13 | async fn main(_spawner: Spawner, p: Peripherals) { |
diff --git a/examples/stm32f2/src/bin/pll.rs b/examples/stm32f2/src/bin/pll.rs index 4bd74f0bd..b09d64b0b 100644 --- a/examples/stm32f2/src/bin/pll.rs +++ b/examples/stm32f2/src/bin/pll.rs | |||
| @@ -3,20 +3,16 @@ | |||
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | 4 | ||
| 5 | use core::convert::TryFrom; | 5 | use core::convert::TryFrom; |
| 6 | |||
| 6 | use defmt::*; | 7 | use defmt::*; |
| 7 | use embassy::executor::Spawner; | 8 | use embassy::executor::Spawner; |
| 8 | use embassy::time::{Duration, Timer}; | 9 | use embassy::time::{Duration, Timer}; |
| 9 | use embassy_stm32::{ | 10 | use embassy_stm32::rcc::{ |
| 10 | rcc::{ | 11 | APBPrescaler, ClockSrc, HSEConfig, HSESrc, PLL48Div, PLLConfig, PLLMainDiv, PLLMul, PLLPreDiv, PLLSrc, |
| 11 | APBPrescaler, ClockSrc, HSEConfig, HSESrc, PLL48Div, PLLConfig, PLLMainDiv, PLLMul, | ||
| 12 | PLLPreDiv, PLLSrc, | ||
| 13 | }, | ||
| 14 | time::Hertz, | ||
| 15 | Config, Peripherals, | ||
| 16 | }; | 12 | }; |
| 17 | 13 | use embassy_stm32::time::Hertz; | |
| 18 | use defmt_rtt as _; // global logger | 14 | use embassy_stm32::{Config, Peripherals}; |
| 19 | use panic_probe as _; | 15 | use {defmt_rtt as _, panic_probe as _}; |
| 20 | 16 | ||
| 21 | // Example config for maximum performance on a NUCLEO-F207ZG board | 17 | // Example config for maximum performance on a NUCLEO-F207ZG board |
| 22 | fn config() -> Config { | 18 | fn config() -> Config { |
