mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-26 00:32:33 +00:00
fixed display hints in examples
This commit is contained in:
parent
f779ec4928
commit
2893fb3733
@ -64,7 +64,7 @@ async fn run() {
|
|||||||
info!("reading...");
|
info!("reading...");
|
||||||
let mut buf = [0u8; 8];
|
let mut buf = [0u8; 8];
|
||||||
unwrap!(u.read_exact(&mut buf).await);
|
unwrap!(u.read_exact(&mut buf).await);
|
||||||
info!("read done, got {:[u8]}", buf);
|
info!("read done, got {}", buf);
|
||||||
|
|
||||||
// Reverse buf
|
// Reverse buf
|
||||||
for i in 0..4 {
|
for i in 0..4 {
|
||||||
|
@ -90,7 +90,7 @@ async fn run_med() {
|
|||||||
|
|
||||||
let end = Instant::now();
|
let end = Instant::now();
|
||||||
let ms = end.duration_since(start).as_ticks() / 33;
|
let ms = end.duration_since(start).as_ticks() / 33;
|
||||||
info!(" [med] done in {:u64} ms", ms);
|
info!(" [med] done in {} ms", ms);
|
||||||
|
|
||||||
Timer::after(Duration::from_ticks(23421)).await;
|
Timer::after(Duration::from_ticks(23421)).await;
|
||||||
}
|
}
|
||||||
@ -107,7 +107,7 @@ async fn run_low() {
|
|||||||
|
|
||||||
let end = Instant::now();
|
let end = Instant::now();
|
||||||
let ms = end.duration_since(start).as_ticks() / 33;
|
let ms = end.duration_since(start).as_ticks() / 33;
|
||||||
info!("[low] done in {:u64} ms", ms);
|
info!("[low] done in {} ms", ms);
|
||||||
|
|
||||||
Timer::after(Duration::from_ticks(32983)).await;
|
Timer::after(Duration::from_ticks(32983)).await;
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ async fn run() {
|
|||||||
|
|
||||||
let mut id = [1; 3];
|
let mut id = [1; 3];
|
||||||
q.custom_instruction(0x9F, &[], &mut id).await.unwrap();
|
q.custom_instruction(0x9F, &[], &mut id).await.unwrap();
|
||||||
info!("id: {:[u8]}", id);
|
info!("id: {}", id);
|
||||||
|
|
||||||
// Read status register
|
// Read status register
|
||||||
let mut status = [0; 1];
|
let mut status = [0; 1];
|
||||||
|
@ -48,15 +48,12 @@ fn main() -> ! {
|
|||||||
loop {
|
loop {
|
||||||
let val2 = rtc.now();
|
let val2 = rtc.now();
|
||||||
if val2 < val {
|
if val2 < val {
|
||||||
info!(
|
info!("timer ran backwards! {} -> {}", val as u32, val2 as u32);
|
||||||
"timer ran backwards! {:u32} -> {:u32}",
|
|
||||||
val as u32, val2 as u32
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
val = val2;
|
val = val2;
|
||||||
|
|
||||||
if val > printval + 32768 {
|
if val > printval + 32768 {
|
||||||
info!("tick {:u32}", val as u32);
|
info!("tick {}", val as u32);
|
||||||
printval = val;
|
printval = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ async fn run(uart: pac::UARTE0, port: pac::P0) {
|
|||||||
let received = &mut buf[..received_len];
|
let received = &mut buf[..received_len];
|
||||||
|
|
||||||
if !received.is_empty() {
|
if !received.is_empty() {
|
||||||
info!("read done, got {:[u8]}", received);
|
info!("read done, got {}", received);
|
||||||
|
|
||||||
// Echo back received data
|
// Echo back received data
|
||||||
unwrap!(uart.send(received).await);
|
unwrap!(uart.send(received).await);
|
||||||
|
Loading…
Reference in New Issue
Block a user