Skip to content

Commit 289b53a

Browse files
committed
Fix formatting
1 parent 4ae0849 commit 289b53a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

examples/uart-dma.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ extern crate stm32g0xx_hal as hal;
77

88
use core::fmt::Write;
99

10-
use hal::dma::{self, Channel, Target, Event};
10+
use hal::dma::{self, Channel, Event, Target};
1111
use hal::prelude::*;
1212
use hal::serial::*;
1313
use hal::stm32;
@@ -59,12 +59,11 @@ fn main() -> ! {
5959
tx.enable_dma();
6060
dma.ch1.enable();
6161

62-
6362
// Create a second buffer to send after the first dma transfer has completed
6463
let mut tx_buffer2: [u8; 23] = *b"Transfer complete {0}!\n";
6564
let tx_dma_buf_addr: u32 = tx_buffer2.as_ptr() as u32;
6665

67-
let mut delay = dp.TIM1.delay(& mut rcc);
66+
let mut delay = dp.TIM1.delay(&mut rcc);
6867

6968
loop {
7069
if dma.ch1.event_occurred(Event::TransferComplete) {
@@ -82,7 +81,6 @@ fn main() -> ! {
8281

8382
led.toggle().unwrap();
8483

85-
8684
dma.ch1.set_memory_address(tx_dma_buf_addr, true);
8785
dma.ch1.set_transfer_length(tx_buffer2.len() as u16);
8886
dma.ch1.enable();

0 commit comments

Comments
 (0)