100% cpu workage showing safe results
This commit is contained in:
@@ -59,7 +59,8 @@ async fn uart_task(mut uart: BufferedUart<'static>) {
|
||||
|
||||
pub async fn send_uart(data: &[u8]) {
|
||||
let mut v: Vec<u8, MAX_MSG> = Vec::new();
|
||||
let _ = v.extend_from_slice(data); // truncate if too long
|
||||
// TODO truncation nonsense as a temp solution
|
||||
let _ = v.extend_from_slice(data);
|
||||
UART_TX.send(v).await;
|
||||
}
|
||||
|
||||
@@ -101,5 +102,6 @@ async fn main(spawner: Spawner) {
|
||||
// Send whenever you want; the UART task performs the actual write.
|
||||
send_uart(b"Hello\r\n").await;
|
||||
}
|
||||
// Timer::after(Duration::from_micros(1)).await;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user