From 143670d05eafce3699e6c4a5ae0dcd54f7fcd723 Mon Sep 17 00:00:00 2001 From: anton smeenk Date: Tue, 6 Aug 2024 11:59:15 +0200 Subject: [PATCH] Did run cargo +nightly fmt to solve formatting issues --- embassy-stm32/src/timer/simple_pwm.rs | 6 +++--- examples/stm32g0/src/bin/pwm_update_interrupt.rs | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/embassy-stm32/src/timer/simple_pwm.rs b/embassy-stm32/src/timer/simple_pwm.rs index 19e798f90..3553143fb 100644 --- a/embassy-stm32/src/timer/simple_pwm.rs +++ b/embassy-stm32/src/timer/simple_pwm.rs @@ -1,6 +1,9 @@ //! Simple PWM driver. +use core::future::Future; use core::marker::PhantomData; +use core::pin::Pin; +use core::task::{Context, Poll}; use embassy_hal_internal::{into_ref, PeripheralRef}; @@ -10,9 +13,6 @@ use crate::gpio::{AfType, AnyPin, OutputType, Speed}; use crate::interrupt::typelevel::Interrupt; use crate::time::Hertz; use crate::Peripheral; -use core::future::Future; -use core::pin::Pin; -use core::task::{Context, Poll}; /// Channel 1 marker type. pub enum Ch1 {} diff --git a/examples/stm32g0/src/bin/pwm_update_interrupt.rs b/examples/stm32g0/src/bin/pwm_update_interrupt.rs index fbde6338a..bee43683b 100644 --- a/examples/stm32g0/src/bin/pwm_update_interrupt.rs +++ b/examples/stm32g0/src/bin/pwm_update_interrupt.rs @@ -1,6 +1,5 @@ #![no_std] #![no_main] -use crate::peripherals::TIM3; use defmt::*; use embassy_executor::Spawner; use embassy_stm32::gpio::{Level, Output, OutputType, Speed}; @@ -12,6 +11,8 @@ use embassy_stm32::{bind_interrupts, peripherals}; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; +use crate::peripherals::TIM3; + // This test is meant for the target nucleo G070 RB // On arduino pin d4 (pb5) a pwm signal of 1.0 hz can me measured, with increasing duty cycle // On each update interrupt arduino pin d5 (pb4) will be made high for 1 ms.