mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-26 11:50:52 +00:00
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
1 changed files with 5 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue