diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32g4/src/bin/can.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/stm32g4/src/bin/can.rs b/examples/stm32g4/src/bin/can.rs index a41f765c1..11e96361e 100644 --- a/examples/stm32g4/src/bin/can.rs +++ b/examples/stm32g4/src/bin/can.rs | |||
| @@ -184,7 +184,11 @@ async fn main(_spawner: Spawner) { | |||
| 184 | let frame = can::frame::ClassicFrame::new_extended(0x123456F, &[i; 8]).unwrap(); | 184 | let frame = can::frame::ClassicFrame::new_extended(0x123456F, &[i; 8]).unwrap(); |
| 185 | info!("Writing frame"); | 185 | info!("Writing frame"); |
| 186 | 186 | ||
| 187 | _ = can.write(frame).await; | 187 | // You can use any of these approaches to send. The writer makes it |
| 188 | // easy to share sending from multiple tasks. | ||
| 189 | //_ = can.write(frame).await; | ||
| 190 | //can.writer().try_write(frame).unwrap(); | ||
| 191 | can.writer().write(frame).await; | ||
| 188 | 192 | ||
| 189 | match can.read().await { | 193 | match can.read().await { |
| 190 | Ok((rx_frame, ts)) => { | 194 | Ok((rx_frame, ts)) => { |
