From af2aedb588535aa2dd32105bc827913c741a3792 Mon Sep 17 00:00:00 2001 From: Lucas Martins Date: Wed, 30 Oct 2024 17:13:50 -0300 Subject: [PATCH] rustfmt --- embassy-stm32/src/dma/gpdma.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/embassy-stm32/src/dma/gpdma.rs b/embassy-stm32/src/dma/gpdma.rs index 0f40bdc80..f5f15ba7d 100644 --- a/embassy-stm32/src/dma/gpdma.rs +++ b/embassy-stm32/src/dma/gpdma.rs @@ -2,13 +2,13 @@ use core::future::{poll_fn, Future}; use core::pin::Pin; -use core::sync::atomic::{fence, AtomicUsize, Ordering, AtomicBool}; +use core::sync::atomic::{fence, AtomicBool, AtomicUsize, Ordering}; use core::task::{Context, Poll, Waker}; use embassy_hal_internal::{into_ref, Peripheral, PeripheralRef}; use embassy_sync::waitqueue::AtomicWaker; -use super::ringbuffer::{DmaCtrl, ReadableDmaRingBuffer, self}; +use super::ringbuffer::{self, DmaCtrl, ReadableDmaRingBuffer}; use super::word::{Word, WordSize}; use super::{AnyChannel, Channel, Dir, Request, STATE}; use crate::interrupt::typelevel::Interrupt; @@ -113,7 +113,9 @@ impl AnyChannel { if circ { // wake the future for the half-transfer event if sr.htf() { - ch.fcr().write(|w| { w.set_htf(true); }); + ch.fcr().write(|w| { + w.set_htf(true); + }); state.waker.wake(); return; } @@ -381,7 +383,6 @@ impl<'a> Future for Transfer<'a> { } } - /// Dma control interface for this DMA Type struct DmaCtrlImpl<'a> { channel: PeripheralRef<'a, AnyChannel>, @@ -444,12 +445,12 @@ impl RingBuffer { Dir::MemoryToPeripheral => { w.set_uda(false); w.set_usa(true); - }, + } Dir::PeripheralToMemory => { w.set_uda(true); w.set_usa(false); - }, + } } // lower 16 bits of the memory address @@ -600,7 +601,6 @@ impl<'a, W: Word> ReadableRingBuffer<'a, W> { RingBuffer::request_suspend(&info.dma.ch(info.num)); } - /// Request the transfer to stop. Use is_running() to see when the transfer is complete. pub fn request_stop(&mut self) { let info = self.channel.info();