mirror of
https://github.com/Astatin3/CC2.git
synced 2026-06-09 00:18:00 -06:00
Do some research on the MCU protocol
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user