diff options
| author | Corey Schuhen <[email protected]> | 2024-05-30 22:00:02 +1000 |
|---|---|---|
| committer | Corey Schuhen <[email protected]> | 2024-05-30 22:00:02 +1000 |
| commit | 7fd79857c339ccc55a4df606e25b432ada8f43a1 (patch) | |
| tree | 1472d66ef1ad430fcf7e93301feeb09d074bf956 /examples/stm32f7/src | |
| parent | 245c895d090b93582e23fc1573b244bdc5087d72 (diff) | |
Fix example.
Diffstat (limited to 'examples/stm32f7/src')
| -rw-r--r-- | examples/stm32f7/src/bin/can.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32f7/src/bin/can.rs b/examples/stm32f7/src/bin/can.rs index e32b4d3df..f4d6d8c19 100644 --- a/examples/stm32f7/src/bin/can.rs +++ b/examples/stm32f7/src/bin/can.rs | |||
| @@ -24,7 +24,7 @@ bind_interrupts!(struct Irqs { | |||
| 24 | }); | 24 | }); |
| 25 | 25 | ||
| 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>) { |
| 28 | loop { | 28 | loop { |
| 29 | let frame = Frame::new_data(unwrap!(StandardId::new(0 as _)), &[0]).unwrap(); | 29 | let frame = Frame::new_data(unwrap!(StandardId::new(0 as _)), &[0]).unwrap(); |
| 30 | tx.write(&frame).await; | 30 | tx.write(&frame).await; |
| @@ -62,7 +62,7 @@ async fn main(spawner: Spawner) { | |||
| 62 | 62 | ||
| 63 | let (tx, mut rx) = can.split(); | 63 | let (tx, mut rx) = can.split(); |
| 64 | 64 | ||
| 65 | static CAN_TX: StaticCell<CanTx<'static, CAN3>> = StaticCell::new(); | 65 | static CAN_TX: StaticCell<CanTx<'static>> = StaticCell::new(); |
| 66 | let tx = CAN_TX.init(tx); | 66 | let tx = CAN_TX.init(tx); |
| 67 | spawner.spawn(send_can_message(tx)).unwrap(); | 67 | spawner.spawn(send_can_message(tx)).unwrap(); |
| 68 | 68 | ||
