mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 08:12:30 +00:00
fmt
This commit is contained in:
parent
203297b569
commit
f6f312270f
@ -280,13 +280,12 @@ pub fn init(config: Config) -> Peripherals {
|
||||
|
||||
#[cfg(feature = "_dual-core")]
|
||||
mod dual_core {
|
||||
use core::mem::MaybeUninit;
|
||||
use core::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
||||
use rcc::Clocks;
|
||||
|
||||
use super::*;
|
||||
use core::{
|
||||
mem::MaybeUninit,
|
||||
sync::atomic::{AtomicUsize, Ordering},
|
||||
};
|
||||
|
||||
/// Object containing data that embassy needs to share between cores.
|
||||
///
|
||||
|
@ -78,7 +78,9 @@ pub(crate) unsafe fn set_freqs(freqs: Clocks) {
|
||||
/// Safety: Sets a mutable global.
|
||||
pub(crate) unsafe fn set_freqs(freqs: Clocks) {
|
||||
debug!("rcc: {:?}", freqs);
|
||||
CLOCK_FREQS_PTR.load(core::sync::atomic::Ordering::SeqCst).write(MaybeUninit::new(freqs));
|
||||
CLOCK_FREQS_PTR
|
||||
.load(core::sync::atomic::Ordering::SeqCst)
|
||||
.write(MaybeUninit::new(freqs));
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "_dual-core"))]
|
||||
|
@ -5,10 +5,8 @@ use core::mem::MaybeUninit;
|
||||
|
||||
use defmt::*;
|
||||
use embassy_executor::Spawner;
|
||||
use embassy_stm32::{
|
||||
gpio::{Level, Output, Speed},
|
||||
SharedData,
|
||||
};
|
||||
use embassy_stm32::gpio::{Level, Output, Speed};
|
||||
use embassy_stm32::SharedData;
|
||||
use embassy_time::Timer;
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
|
||||
|
@ -5,10 +5,8 @@ use core::mem::MaybeUninit;
|
||||
|
||||
use defmt::*;
|
||||
use embassy_executor::Spawner;
|
||||
use embassy_stm32::{
|
||||
gpio::{Level, Output, Speed},
|
||||
SharedData,
|
||||
};
|
||||
use embassy_stm32::gpio::{Level, Output, Speed};
|
||||
use embassy_stm32::SharedData;
|
||||
use embassy_time::Timer;
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user