drivers: can: mcan: add support for CAN-FD ESI flag
Add support for the CAN-FD Error State Indicator (ESI) flag in received frames. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
e08546fe98
commit
641b89801a
1 changed files with 4 additions and 0 deletions
|
@ -643,6 +643,10 @@ static void can_mcan_get_message(const struct device *dev,
|
||||||
frame.flags |= CAN_FRAME_BRS;
|
frame.flags |= CAN_FRAME_BRS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hdr.esi != 0) {
|
||||||
|
frame.flags |= CAN_FRAME_ESI;
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_CAN_RX_TIMESTAMP)
|
#if defined(CONFIG_CAN_RX_TIMESTAMP)
|
||||||
frame.timestamp = hdr.rxts;
|
frame.timestamp = hdr.rxts;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue