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