Fix example.
This commit is contained in:
parent
245c895d09
commit
7fd79857c3
1 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ bind_interrupts!(struct Irqs {
|
||||||
});
|
});
|
||||||
|
|
||||||
#[embassy_executor::task]
|
#[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 {
|
loop {
|
||||||
let frame = Frame::new_data(unwrap!(StandardId::new(0 as _)), &[0]).unwrap();
|
let frame = Frame::new_data(unwrap!(StandardId::new(0 as _)), &[0]).unwrap();
|
||||||
tx.write(&frame).await;
|
tx.write(&frame).await;
|
||||||
|
@ -62,7 +62,7 @@ async fn main(spawner: Spawner) {
|
||||||
|
|
||||||
let (tx, mut rx) = can.split();
|
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);
|
let tx = CAN_TX.init(tx);
|
||||||
spawner.spawn(send_can_message(tx)).unwrap();
|
spawner.spawn(send_can_message(tx)).unwrap();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue