Do some research on the MCU protocol

This commit is contained in:
Michael Mikovsky
2026-05-03 11:43:22 -06:00
parent 8257b14b55
commit 2a005416cd
4 changed files with 327 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
use std::fs::OpenOptions;
use std::io::{Read, Write};
use std::time::Duration;
fn main() -> anyhow::Result<()> {
let mut dev = OpenOptions::new()
.read(true)
.write(true)
.open("/dev/rpmsg1")?;
let mut buf = [0u8; 4096];
loop {
let n = dev.read(&mut buf)?;
println!("rpmsg read {n} bytes: {:02x?}", &buf[..n]);
}
}