diff options
| author | Bob McWhirter <[email protected]> | 2021-06-29 11:00:23 -0400 |
|---|---|---|
| committer | Bob McWhirter <[email protected]> | 2021-06-29 11:01:57 -0400 |
| commit | 24f18819c879488e2a33f3c9ebbf24979b3e9612 (patch) | |
| tree | 3b65d83b2f819de37c47d792f51555f4f6016d3a /examples | |
| parent | c53ab325c1943ef4f2f4890734444930a585531d (diff) | |
Adjust example for RCC and DMA.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32f4/src/bin/usart_dma.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32f4/src/bin/usart_dma.rs b/examples/stm32f4/src/bin/usart_dma.rs index fae05b607..66ca6242b 100644 --- a/examples/stm32f4/src/bin/usart_dma.rs +++ b/examples/stm32f4/src/bin/usart_dma.rs | |||
| @@ -23,14 +23,14 @@ async fn main_task() { | |||
| 23 | let mut p = embassy_stm32::init(Default::default()); | 23 | let mut p = embassy_stm32::init(Default::default()); |
| 24 | 24 | ||
| 25 | let config = Config::default(); | 25 | let config = Config::default(); |
| 26 | let mut usart = Uart::new(p.USART3, p.PD9, p.PD8, config, 16_000_000); | 26 | let mut usart = Uart::new(p.USART3, p.PD9, p.PD8, config); |
| 27 | 27 | ||
| 28 | for n in 0u32.. { | 28 | for n in 0u32.. { |
| 29 | let mut s: String<128> = String::new(); | 29 | let mut s: String<128> = String::new(); |
| 30 | core::write!(&mut s, "Hello DMA World {}!\r\n", n).unwrap(); | 30 | core::write!(&mut s, "Hello DMA World {}!\r\n", n).unwrap(); |
| 31 | 31 | ||
| 32 | usart | 32 | usart |
| 33 | .write_dma(&mut p.DMA1_CH3, s.as_bytes()) | 33 | .write_dma(&mut p.DMA1_3, s.as_bytes()) |
| 34 | .await | 34 | .await |
| 35 | .unwrap(); | 35 | .unwrap(); |
| 36 | info!("wrote DMA"); | 36 | info!("wrote DMA"); |
