cleanup misc. warnings
This commit is contained in:
		| @@ -14,13 +14,11 @@ use cortex_m_rt::entry; | ||||
| use embassy::executor::{task, Executor}; | ||||
| use embassy::traits::gpio::*; | ||||
| use embassy::util::Forever; | ||||
| use embassy_stm32f4::{can, exti, interrupt}; | ||||
| use embassy_stm32f4::{can, interrupt}; | ||||
| use futures::pin_mut; | ||||
| use stm32f4xx_hal::prelude::*; | ||||
| use stm32f4xx_hal::{can::Can, stm32}; | ||||
|  | ||||
| static EXTI: Forever<exti::ExtiManager> = Forever::new(); | ||||
|  | ||||
| #[task] | ||||
| async fn run(dp: stm32::Peripherals, _cp: cortex_m::Peripherals) { | ||||
|     let gpioa = dp.GPIOA.split(); | ||||
|   | ||||
| @@ -9,11 +9,9 @@ use bxcan::Interrupts; | ||||
| use core::future::Future; | ||||
| use embassy::interrupt::Interrupt; | ||||
| use embassy::util::InterruptFuture; | ||||
| use embassy::util::Signal; | ||||
| use nb; | ||||
| use nb::block; | ||||
|  | ||||
| use crate::hal::prelude::*; | ||||
| use crate::interrupt; | ||||
|  | ||||
| /// Interface to the Serial peripheral | ||||
| @@ -53,9 +51,9 @@ impl<T: Instance> Can<T> { | ||||
|     /// Receive can frame. | ||||
|     /// | ||||
|     /// This method async-blocks until the frame is received. | ||||
|     pub fn receive<'a>(&'a mut self) -> impl Future<Output = (bxcan::Frame)> + 'a { | ||||
|     pub fn receive<'a>(&'a mut self) -> impl Future<Output = bxcan::Frame> + 'a { | ||||
|         async move { | ||||
|             let mut frame: Option<bxcan::Frame> = None; | ||||
|             let mut frame: Option<bxcan::Frame>; | ||||
|  | ||||
|             loop { | ||||
|                 let fut = InterruptFuture::new(&mut self.rx_int); | ||||
|   | ||||
| @@ -2,7 +2,6 @@ use core::future::Future; | ||||
| use core::mem; | ||||
| use core::pin::Pin; | ||||
|  | ||||
| use embassy::interrupt::Interrupt; | ||||
| use embassy::traits::gpio::{WaitForFallingEdge, WaitForRisingEdge}; | ||||
| use embassy::util::InterruptFuture; | ||||
|  | ||||
|   | ||||
| @@ -1,21 +1,19 @@ | ||||
| use crate::interrupt; | ||||
| use core::future::Future; | ||||
| use core::pin::Pin; | ||||
| use embassy::interrupt::Interrupt; | ||||
| use embassy::traits::qei::WaitForRotate; | ||||
| use embedded_hal::Direction; | ||||
| use embedded_hal::Qei as THQei; | ||||
| use stm32f4xx_hal::pac::TIM2; | ||||
| use stm32f4xx_hal::qei::{Pins, Qei as HalQei}; | ||||
| use stm32f4xx_hal::{qei, qei::Pins}; | ||||
|  | ||||
| pub struct Qei<T: Instance, PINS> { | ||||
|     qei: HalQei<T, PINS>, | ||||
|     qei: qei::Qei<T, PINS>, | ||||
|     int: T::Interrupt, | ||||
| } | ||||
|  | ||||
| impl<PINS: Pins<TIM2>> Qei<TIM2, PINS> { | ||||
|     pub fn tim2(tim: TIM2, pins: PINS, interrupt: interrupt::TIM2) -> Self { | ||||
|         let qei = HalQei::tim2(tim, pins); | ||||
|         let qei = qei::Qei::tim2(tim, pins); | ||||
|  | ||||
|         let tim = unsafe { | ||||
|             &mut *(stm32f4xx_hal::stm32::TIM2::ptr() | ||||
|   | ||||
| @@ -6,10 +6,9 @@ | ||||
|  | ||||
| use core::future::Future; | ||||
| use core::marker::PhantomData; | ||||
| use core::ptr; | ||||
| use core::sync::atomic::{self, Ordering}; | ||||
|  | ||||
| use embassy::interrupt::{Interrupt, InterruptExt}; | ||||
| use embassy::interrupt::Interrupt; | ||||
| use embassy::traits::uart::{Error, Uart}; | ||||
| use embassy::util::InterruptFuture; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user