mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 01:04:19 +08:00
STM32 CAN driver now compiles
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4210 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user