diff options
| author | Mathias <[email protected]> | 2022-08-18 11:47:15 +0200 |
|---|---|---|
| committer | Mathias <[email protected]> | 2022-08-18 14:01:37 +0200 |
| commit | 0f74f870b00942a3020a32d44470edf80870676c (patch) | |
| tree | edac5e858ceca5e330a3ce8ee1885a825f92e1eb /examples | |
| parent | d52c7ded49e4584e678a54f2870a4d855e24ee01 (diff) | |
Fix rp uart example
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/rp/src/bin/uart.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/rp/src/bin/uart.rs b/examples/rp/src/bin/uart.rs index 0d2954894..b7014c55a 100644 --- a/examples/rp/src/bin/uart.rs +++ b/examples/rp/src/bin/uart.rs | |||
| @@ -9,11 +9,11 @@ use {defmt_rtt as _, panic_probe as _}; | |||
| 9 | #[embassy_executor::main] | 9 | #[embassy_executor::main] |
| 10 | async fn main(_spawner: Spawner, p: Peripherals) { | 10 | async fn main(_spawner: Spawner, p: Peripherals) { |
| 11 | let config = uart::Config::default(); | 11 | let config = uart::Config::default(); |
| 12 | let mut uart = uart::Uart::new(p.UART0, p.PIN_0, p.PIN_1, p.PIN_2, p.PIN_3, config); | 12 | let mut uart = uart::Uart::new_with_rtscts(p.UART0, p.PIN_0, p.PIN_1, p.PIN_2, p.PIN_3, config); |
| 13 | uart.send("Hello World!\r\n".as_bytes()); | 13 | uart.blocking_write("Hello World!\r\n".as_bytes()).unwrap(); |
| 14 | 14 | ||
| 15 | loop { | 15 | loop { |
| 16 | uart.send("hello there!\r\n".as_bytes()); | 16 | uart.blocking_write("hello there!\r\n".as_bytes()).unwrap(); |
| 17 | cortex_m::asm::delay(1_000_000); | 17 | cortex_m::asm::delay(1_000_000); |
| 18 | } | 18 | } |
| 19 | } | 19 | } |
