Fix example.

This commit is contained in:
Corey Schuhen 2024-05-30 22:00:02 +10:00
parent 245c895d09
commit 7fd79857c3

View File

@ -24,7 +24,7 @@ bind_interrupts!(struct Irqs {
});
#[embassy_executor::task]
pub async fn send_can_message(tx: &'static mut CanTx<'static, CAN3>) {
pub async fn send_can_message(tx: &'static mut CanTx<'static>) {
loop {
let frame = Frame::new_data(unwrap!(StandardId::new(0 as _)), &[0]).unwrap();
tx.write(&frame).await;
@ -62,7 +62,7 @@ async fn main(spawner: Spawner) {
let (tx, mut rx) = can.split();
static CAN_TX: StaticCell<CanTx<'static, CAN3>> = StaticCell::new();
static CAN_TX: StaticCell<CanTx<'static>> = StaticCell::new();
let tx = CAN_TX.init(tx);
spawner.spawn(send_can_message(tx)).unwrap();