mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 16:23:10 +00:00
rustfmt
This commit is contained in:
parent
c07854fed8
commit
6e13f5b387
@ -3,9 +3,6 @@ pub mod advanced_pwm;
|
||||
pub mod complementary_pwm;
|
||||
pub mod simple_pwm;
|
||||
|
||||
#[cfg(hrtim_v1)]
|
||||
use core::ops;
|
||||
|
||||
use stm32_metapac::timer::vals::Ckd;
|
||||
|
||||
#[cfg(hrtim_v1)]
|
||||
@ -402,7 +399,6 @@ foreach_interrupt! {
|
||||
}
|
||||
|
||||
fn set_channel_dead_time(channel: usize, dead_time: u16) {
|
||||
use crate::rcc::sealed::RccPeripheral;
|
||||
use crate::timer::sealed::HighResolutionControlInstance;
|
||||
|
||||
let regs = Self::regs();
|
||||
|
@ -264,6 +264,7 @@ fn calc_pll(config: &Config, Hertz(sysclk): Hertz) -> (Hertz, PllConfig) {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[allow(unused_variables)]
|
||||
fn get_usb_pre(config: &Config, sysclk: u32, pclk1: u32, pll_config: &Option<PllConfig>) -> Usbpre {
|
||||
cfg_if::cfg_if! {
|
||||
// Some chips do not have USB
|
||||
|
@ -1,6 +1,3 @@
|
||||
#[cfg(hrtim_v1)]
|
||||
use core::ops;
|
||||
|
||||
use stm32_metapac::timer::vals;
|
||||
|
||||
use crate::interrupt;
|
||||
|
@ -5,9 +5,7 @@
|
||||
use defmt::*;
|
||||
use embassy_executor::Spawner;
|
||||
use embassy_stm32::pwm::advanced_pwm::*;
|
||||
use embassy_stm32::pwm::Channel;
|
||||
use embassy_stm32::time::khz;
|
||||
use embassy_time::{Duration, Timer};
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
|
||||
#[embassy_executor::main]
|
||||
@ -17,7 +15,7 @@ async fn main(_spawner: Spawner) {
|
||||
|
||||
let ch1 = PwmPin::new_cha(p.PA8);
|
||||
let ch1n = ComplementaryPwmPin::new_cha(p.PA9);
|
||||
let mut pwm = AdvancedPwm::new(
|
||||
let pwm = AdvancedPwm::new(
|
||||
p.HRTIM1,
|
||||
Some(ch1),
|
||||
Some(ch1n),
|
||||
|
Loading…
Reference in New Issue
Block a user