diff options
| author | Corey Schuhen <[email protected]> | 2024-03-07 22:48:25 +1000 |
|---|---|---|
| committer | Corey Schuhen <[email protected]> | 2024-03-13 17:46:50 +1000 |
| commit | 12a3af5043fd1d9a32f57b5cab9b5729a304ffc5 (patch) | |
| tree | f98fe58851d3643363d48cf8b563a280212f0970 /examples/stm32f1 | |
| parent | 35f284ec22848d7085e00f377136fd66067ca756 (diff) | |
Shared frame types.
Remove BXCAN speciffic id and frame modules
Remove SizedClassicData
Diffstat (limited to 'examples/stm32f1')
| -rw-r--r-- | examples/stm32f1/src/bin/can.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/stm32f1/src/bin/can.rs b/examples/stm32f1/src/bin/can.rs index 00d61096f..a43fb4427 100644 --- a/examples/stm32f1/src/bin/can.rs +++ b/examples/stm32f1/src/bin/can.rs | |||
| @@ -46,16 +46,16 @@ async fn main(_spawner: Spawner) { | |||
| 46 | 46 | ||
| 47 | let mut i: u8 = 0; | 47 | let mut i: u8 = 0; |
| 48 | loop { | 48 | loop { |
| 49 | let tx_frame = Frame::new_data(unwrap!(StandardId::new(i as _)), [i, 0, 1, 2, 3, 4, 5, 6]); | 49 | let tx_frame = Frame::new_data(unwrap!(StandardId::new(i as _)), &[i, 0, 1, 2, 3, 4, 5, 6]); |
| 50 | can.write(&tx_frame).await; | 50 | can.write(&tx_frame).await; |
| 51 | 51 | ||
| 52 | match can.read().await { | 52 | match can.read().await { |
| 53 | Ok(env) => match env.frame.id() { | 53 | Ok(env) => match env.frame.id() { |
| 54 | Id::Extended(id) => { | 54 | Id::Extended(id) => { |
| 55 | defmt::println!("Extended Frame id={:x} {:02x}", id.as_raw(), env.frame.data().unwrap()); | 55 | defmt::println!("Extended Frame id={:x} {:02x}", id.as_raw(), env.frame.data()); |
| 56 | } | 56 | } |
| 57 | Id::Standard(id) => { | 57 | Id::Standard(id) => { |
| 58 | defmt::println!("Standard Frame id={:x} {:02x}", id.as_raw(), env.frame.data().unwrap()); | 58 | defmt::println!("Standard Frame id={:x} {:02x}", id.as_raw(), env.frame.data()); |
| 59 | } | 59 | } |
| 60 | }, | 60 | }, |
| 61 | Err(err) => { | 61 | Err(err) => { |
