STM32 CAN driver now compiles

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4210 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-12-21 23:31:03 +00:00
parent b0bf66456c
commit 04584e4362
6 changed files with 722 additions and 230 deletions
+3
View File
@@ -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.