drivers: can: shell: add support for the CAN-FD ESI flag
Print the CAN-FD Error State Indicator (ESI) flag as "P" for "Passive" in received frames. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
b24dca032e
commit
e08546fe98
1 changed files with 3 additions and 1 deletions
|
@ -72,7 +72,9 @@ static void can_shell_print_frame(const struct shell *sh, const struct can_frame
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_FD_MODE
|
#ifdef CONFIG_CAN_FD_MODE
|
||||||
/* Flags */
|
/* Flags */
|
||||||
shell_fprintf(sh, SHELL_NORMAL, "%c ", (frame->flags & CAN_FRAME_BRS) == 0 ? '-' : 'B');
|
shell_fprintf(sh, SHELL_NORMAL, "%c%c ",
|
||||||
|
(frame->flags & CAN_FRAME_BRS) == 0 ? '-' : 'B',
|
||||||
|
(frame->flags & CAN_FRAME_ESI) == 0 ? '-' : 'P');
|
||||||
#endif /* CONFIG_CAN_FD_MODE */
|
#endif /* CONFIG_CAN_FD_MODE */
|
||||||
|
|
||||||
/* CAN ID */
|
/* CAN ID */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue