Shared frame types.

Remove BXCAN speciffic id and frame modules

Remove SizedClassicData
This commit is contained in:
Corey Schuhen
2024-03-07 22:48:25 +10:00
parent 35f284ec22
commit 12a3af5043
10 changed files with 138 additions and 416 deletions

View File

@@ -60,7 +60,7 @@ async fn main(_spawner: Spawner) {
let mut i: u8 = 0;
loop {
let tx_frame = Frame::new_data(unwrap!(StandardId::new(i as _)), [i]);
let tx_frame = Frame::new_data(unwrap!(StandardId::new(i as _)), &[i]);
info!("Transmitting frame...");
let tx_ts = Instant::now();
@@ -70,7 +70,7 @@ async fn main(_spawner: Spawner) {
info!("Frame received!");
info!("loopback time {}", envelope.ts);
info!("loopback frame {=u8}", envelope.frame.data().unwrap()[0]);
info!("loopback frame {=u8}", envelope.frame.data()[0]);
let latency = envelope.ts.saturating_duration_since(tx_ts);
info!("loopback latency {} us", latency.as_micros());