mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 08:12:30 +00:00
Merge pull request #3421 from TuEmb/main
add RTR flag if it is remote frame
This commit is contained in:
commit
fe99469011
@ -2,7 +2,7 @@ use core::cmp::Ordering;
|
|||||||
use core::convert::Infallible;
|
use core::convert::Infallible;
|
||||||
|
|
||||||
pub use embedded_can::{ExtendedId, Id, StandardId};
|
pub use embedded_can::{ExtendedId, Id, StandardId};
|
||||||
use stm32_metapac::can::vals::Lec;
|
use stm32_metapac::can::vals::{Lec, Rtr};
|
||||||
|
|
||||||
use super::{Mailbox, TransmitStatus};
|
use super::{Mailbox, TransmitStatus};
|
||||||
use crate::can::enums::BusError;
|
use crate::can::enums::BusError;
|
||||||
@ -306,6 +306,9 @@ impl Registers {
|
|||||||
mb.tir().write(|w| {
|
mb.tir().write(|w| {
|
||||||
w.0 = id.0;
|
w.0 = id.0;
|
||||||
w.set_txrq(true);
|
w.set_txrq(true);
|
||||||
|
if frame.header().rtr() {
|
||||||
|
w.set_rtr(Rtr::REMOTE);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user