Fix uart rp2040 blocking example

This commit is contained in:
Mathias 2022-08-19 08:48:52 +02:00
parent aa586fe1de
commit a29972413b

View File

@ -10,7 +10,7 @@ use {defmt_rtt as _, panic_probe as _};
async fn main(_spawner: Spawner) { async fn main(_spawner: Spawner) {
let p = embassy_rp::init(Default::default()); let p = embassy_rp::init(Default::default());
let config = uart::Config::default(); let config = uart::Config::default();
let mut uart = uart::Uart::new_with_rtscts(p.UART0, p.PIN_0, p.PIN_1, p.PIN_2, p.PIN_3, config); let mut uart = uart::Uart::new_with_rtscts_blocking(p.UART0, p.PIN_0, p.PIN_1, p.PIN_3, p.PIN_2, config);
uart.blocking_write("Hello World!\r\n".as_bytes()).unwrap(); uart.blocking_write("Hello World!\r\n".as_bytes()).unwrap();
loop { loop {