diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2011-12-21 23:31:03 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2011-12-21 23:31:03 +0000 |
commit | fbd1db66e13be25d5482d01720dd3ca3b31e281b (patch) | |
tree | ddb8c15a8f76f2a8bd90b39906833c12edde472c /nuttx/include | |
parent | 073df6d28c6528f6ed1e3e1d083c626e725d6a39 (diff) | |
download | px4-firmware-fbd1db66e13be25d5482d01720dd3ca3b31e281b.tar.gz px4-firmware-fbd1db66e13be25d5482d01720dd3ca3b31e281b.tar.bz2 px4-firmware-fbd1db66e13be25d5482d01720dd3ca3b31e281b.zip |
STM32 CAN driver now compiles
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4210 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/can.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nuttx/include/nuttx/can.h b/nuttx/include/nuttx/can.h index f87c2eac4..d839bbb17 100644 --- a/nuttx/include/nuttx/can.h +++ b/nuttx/include/nuttx/can.h @@ -89,11 +89,14 @@ /* CAN message support */ #define CAN_MAXDATALEN 8 + #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) + /* Built-in ioctl commands * * CANIOCTL_RTR: Send the remote transmission request and wait for the response. |