apps/examples/can: In extended ID mode, need to set some unused bits to zero or otherwise the memcmp() will fail on comparison with the returned value
This commit is contained in:
parent
d64f6c300e
commit
2f3303526f
@ -204,11 +204,12 @@ int can_main(int argc, char *argv[])
|
||||
/* Construct the next TX message */
|
||||
|
||||
#ifndef CONFIG_EXAMPLES_CAN_READONLY
|
||||
txmsg.cm_hdr.ch_id = msgid;
|
||||
txmsg.cm_hdr.ch_rtr = false;
|
||||
txmsg.cm_hdr.ch_dlc = msgdlc;
|
||||
txmsg.cm_hdr.ch_id = msgid;
|
||||
txmsg.cm_hdr.ch_rtr = false;
|
||||
txmsg.cm_hdr.ch_dlc = msgdlc;
|
||||
#ifdef CONFIG_CAN_EXTID
|
||||
txmsg.cm_hdr.ch_extid = true;
|
||||
txmsg.cm_hdr.ch_extid = true;
|
||||
txmsg.cm_hdr.ch_unused = 0;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < msgdlc; i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user