mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 22:32:29 +00:00
Fix example.
This commit is contained in:
parent
245c895d09
commit
7fd79857c3
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user