Adjust example for RCC and DMA.
This commit is contained in:
parent
c53ab325c1
commit
24f18819c8
@ -23,14 +23,14 @@ async fn main_task() {
|
|||||||
let mut p = embassy_stm32::init(Default::default());
|
let mut p = embassy_stm32::init(Default::default());
|
||||||
|
|
||||||
let config = Config::default();
|
let config = Config::default();
|
||||||
let mut usart = Uart::new(p.USART3, p.PD9, p.PD8, config, 16_000_000);
|
let mut usart = Uart::new(p.USART3, p.PD9, p.PD8, config);
|
||||||
|
|
||||||
for n in 0u32.. {
|
for n in 0u32.. {
|
||||||
let mut s: String<128> = String::new();
|
let mut s: String<128> = String::new();
|
||||||
core::write!(&mut s, "Hello DMA World {}!\r\n", n).unwrap();
|
core::write!(&mut s, "Hello DMA World {}!\r\n", n).unwrap();
|
||||||
|
|
||||||
usart
|
usart
|
||||||
.write_dma(&mut p.DMA1_CH3, s.as_bytes())
|
.write_dma(&mut p.DMA1_3, s.as_bytes())
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
info!("wrote DMA");
|
info!("wrote DMA");
|
||||||
|
@ -431,13 +431,13 @@ pub fn gen(options: Options) {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
(None, Some(_)) => {
|
(None, Some(_)) => {
|
||||||
println!("Unable to find enable register for {}", name)
|
panic!("Unable to find enable register for {}", name)
|
||||||
}
|
}
|
||||||
(Some(_), None) => {
|
(Some(_), None) => {
|
||||||
println!("Unable to find reset register for {}", name)
|
panic!("Unable to find reset register for {}", name)
|
||||||
}
|
}
|
||||||
(None, None) => {
|
(None, None) => {
|
||||||
println!("Unable to find enable and reset register for {}", name)
|
panic!("Unable to find enable and reset register for {}", name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user