diff options
| author | Corey Schuhen <[email protected]> | 2024-03-12 21:19:06 +1000 |
|---|---|---|
| committer | Corey Schuhen <[email protected]> | 2024-03-13 17:46:50 +1000 |
| commit | 242759a600418aaaed1bbbec96a9fc7e7effc383 (patch) | |
| tree | a93ce6bd6691614311fc749ad782d9d39353be86 /examples/stm32f7/src | |
| parent | 12a3af5043fd1d9a32f57b5cab9b5729a304ffc5 (diff) | |
Use Result instead of Option for Frame creation.
Diffstat (limited to 'examples/stm32f7/src')
| -rw-r--r-- | examples/stm32f7/src/bin/can.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/stm32f7/src/bin/can.rs b/examples/stm32f7/src/bin/can.rs index 2701196ed..221ac2a05 100644 --- a/examples/stm32f7/src/bin/can.rs +++ b/examples/stm32f7/src/bin/can.rs | |||
| @@ -26,7 +26,7 @@ bind_interrupts!(struct Irqs { | |||
| 26 | #[embassy_executor::task] | 26 | #[embassy_executor::task] |
| 27 | pub async fn send_can_message(tx: &'static mut CanTx<'static, CAN3>) { | 27 | pub async fn send_can_message(tx: &'static mut CanTx<'static, CAN3>) { |
| 28 | loop { | 28 | loop { |
| 29 | let frame = Frame::new_data(unwrap!(StandardId::new(0 as _)), &[0]); | 29 | let frame = Frame::new_data(unwrap!(StandardId::new(0 as _)), &[0]).unwrap(); |
| 30 | tx.write(&frame).await; | 30 | tx.write(&frame).await; |
| 31 | embassy_time::Timer::after_secs(1).await; | 31 | embassy_time::Timer::after_secs(1).await; |
| 32 | } | 32 | } |
