2021-03-29 21:33:46 +02:00
|
|
|
#![no_std]
|
|
|
|
#![no_main]
|
|
|
|
#![feature(type_alias_impl_trait)]
|
|
|
|
|
|
|
|
use embassy::executor::Spawner;
|
|
|
|
use embassy_rp::{uart, Peripherals};
|
2022-06-12 22:15:44 +02:00
|
|
|
use {defmt_rtt as _, panic_probe as _};
|
2022-04-02 04:35:06 +02:00
|
|
|
|
2021-03-29 21:33:46 +02:00
|
|
|
#[embassy::main]
|
2021-05-12 01:57:01 +02:00
|
|
|
async fn main(_spawner: Spawner, p: Peripherals) {
|
2021-03-29 21:33:46 +02:00
|
|
|
let config = uart::Config::default();
|
|
|
|
let mut uart = uart::Uart::new(p.UART0, p.PIN_0, p.PIN_1, p.PIN_2, p.PIN_3, config);
|
|
|
|
uart.send("Hello World!\r\n".as_bytes());
|
|
|
|
|
|
|
|
loop {
|
|
|
|
uart.send("hello there!\r\n".as_bytes());
|
|
|
|
cortex_m::asm::delay(1_000_000);
|
|
|
|
}
|
|
|
|
}
|