summaryrefslogtreecommitdiffstats
path: root/nuttx/include/nuttx/can.h
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/include/nuttx/can.h')
-rw-r--r--nuttx/include/nuttx/can.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/nuttx/include/nuttx/can.h b/nuttx/include/nuttx/can.h
index d839bbb171..3f77afc7a6 100644
--- a/nuttx/include/nuttx/can.h
+++ b/nuttx/include/nuttx/can.h
@@ -88,14 +88,15 @@
/* CAN message support */
-#define CAN_MAXDATALEN 8
+#define CAN_MAXDATALEN 8
+#define CAN_MAXMSGID 0x07ff
#define CAN_ID(hdr) ((uint16_t)(hdr) >> 5)
#define CAN_RTR(hdr) (((hdr) & 0x0010) != 0)
#define CAN_DLC(hdr) ((hdr) & 0x0f)
#define CAN_MSGLEN(hdr) (sizeof(struct can_msg_s) - (CAN_MAXDATALEN - CAN_DLC(hdr)))
-#define CAN_MSG(id, rtr, dlc) ((uint16_t)id << 5 | (uint16_t)rtr << 4 | (uint16_t)dlc)
+#define CAN_HDR(id, rtr, dlc) ((uint16_t)id << 5 | (uint16_t)rtr << 4 | (uint16_t)dlc)
/* Built-in ioctl commands
*