Run rustfmt.
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
use crate::interrupt::Interrupt;
|
||||
|
||||
use crate::rcc::{sealed::RccPeripheral as __RccPeri, RccPeripheral};
|
||||
use crate::time::Hertz;
|
||||
use stm32_metapac::timer::vals;
|
||||
|
||||
use crate::interrupt::Interrupt;
|
||||
use crate::rcc::sealed::RccPeripheral as __RccPeri;
|
||||
use crate::rcc::RccPeripheral;
|
||||
use crate::time::Hertz;
|
||||
|
||||
#[cfg(feature = "unstable-pac")]
|
||||
pub mod low_level {
|
||||
pub use super::sealed::*;
|
||||
@ -86,8 +87,7 @@ macro_rules! impl_basic_16bit_timer {
|
||||
let timer_f = Self::frequency().0;
|
||||
let pclk_ticks_per_timer_period = timer_f / f;
|
||||
let psc: u16 = unwrap!(((pclk_ticks_per_timer_period - 1) / (1 << 16)).try_into());
|
||||
let arr: u16 =
|
||||
unwrap!((pclk_ticks_per_timer_period / (u32::from(psc) + 1)).try_into());
|
||||
let arr: u16 = unwrap!((pclk_ticks_per_timer_period / (u32::from(psc) + 1)).try_into());
|
||||
|
||||
let regs = Self::regs();
|
||||
unsafe {
|
||||
@ -138,8 +138,7 @@ macro_rules! impl_32bit_timer {
|
||||
let timer_f = Self::frequency().0;
|
||||
let pclk_ticks_per_timer_period = (timer_f / f) as u64;
|
||||
let psc: u16 = unwrap!(((pclk_ticks_per_timer_period - 1) / (1 << 32)).try_into());
|
||||
let arr: u32 =
|
||||
unwrap!(((pclk_ticks_per_timer_period / (psc as u64 + 1)).try_into()));
|
||||
let arr: u32 = unwrap!(((pclk_ticks_per_timer_period / (psc as u64 + 1)).try_into()));
|
||||
|
||||
let regs = Self::regs_gp32();
|
||||
unsafe {
|
||||
|
Reference in New Issue
Block a user