mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-10-03 23:24:36 +00:00
Cargo fmt
This commit is contained in:
parent
d7625de4f5
commit
b4dc4e567c
@ -5,12 +5,12 @@ use defmt::{panic, *};
|
||||
use defmt_rtt as _; // global logger
|
||||
use embassy_executor::Spawner;
|
||||
use embassy_futures::join::join;
|
||||
use embassy_stm32::rcc::PllSource;
|
||||
use embassy_stm32::rcc::{mux, AHBPrescaler, APBPrescaler, Hse, HsePrescaler, Sysclk, VoltageScale};
|
||||
use embassy_stm32::usb::{Driver, Instance};
|
||||
use embassy_stm32::{bind_interrupts, peripherals, usb, Config};
|
||||
use embassy_stm32::rcc::{VoltageScale, Hse, HsePrescaler, APBPrescaler, AHBPrescaler, Sysclk, mux};
|
||||
use embassy_usb::class::cdc_acm::{CdcAcmClass, State};
|
||||
use embassy_usb::driver::EndpointError;
|
||||
use embassy_stm32::rcc::PllSource;
|
||||
use embassy_usb::Builder;
|
||||
use panic_probe as _;
|
||||
|
||||
@ -25,7 +25,9 @@ async fn main(_spawner: Spawner) {
|
||||
let mut config = Config::default();
|
||||
|
||||
// External HSE (32 MHz) setup
|
||||
config.rcc.hse = Some(Hse { prescaler: HsePrescaler::DIV1 });
|
||||
config.rcc.hse = Some(Hse {
|
||||
prescaler: HsePrescaler::DIV1,
|
||||
});
|
||||
|
||||
// route HSE into the USB‐OTG‐HS block
|
||||
config.rcc.mux.otghssel = mux::Otghssel::HSE;
|
||||
@ -42,7 +44,6 @@ async fn main(_spawner: Spawner) {
|
||||
frac: Some(4096), // Fractional part (enabled)
|
||||
});
|
||||
|
||||
|
||||
config.rcc.ahb_pre = AHBPrescaler::DIV1;
|
||||
config.rcc.apb1_pre = APBPrescaler::DIV1;
|
||||
config.rcc.apb2_pre = APBPrescaler::DIV1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user