Rev 804 | Rev 817 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 804 | Rev 807 | ||
|---|---|---|---|
| Line 72... | Line 72... | ||
| 72 | #if (STDCAN_FILTER) |
72 | #if (STDCAN_FILTER) |
| 73 | unsigned char Match; /**< Filter id that matched this message. */ |
73 | unsigned char Match; /**< Filter id that matched this message. */ |
| 74 | #endif |
74 | #endif |
| 75 | } StdCan_Msg_t; |
75 | } StdCan_Msg_t; |
| 76 | 76 | ||
| 77 | #define StdCan_Ret_class(MSG) ((MSG.Header.ClassAndDirection >> 1) & 0x0F) |
77 | #define StdCan_Ret_class(MSG) (uint8_t)((MSG.Header.ClassAndDirection >> 1) & 0x0F) |
| 78 | #define StdCan_Set_class(MSG, CLASS) MSG.Header.ClassAndDirection &= 0x01; MSG.Header.ClassAndDirection |= (CLASS << 1); |
78 | #define StdCan_Set_class(MSG, CLASS) MSG.Header.ClassAndDirection &= 0x01; MSG.Header.ClassAndDirection |= (CLASS << 1); |
| 79 | #define StdCan_Ret_direction(MSG) (MSG.Header.ClassAndDirection & 0x01) |
79 | #define StdCan_Ret_direction(MSG) (uint8_t)(MSG.Header.ClassAndDirection & 0x01) |
| 80 | #define StdCan_Set_direction(MSG, DIR) MSG.Header.ClassAndDirection &= 0xfe; MSG.Header.ClassAndDirection |= DIR; |
80 | #define StdCan_Set_direction(MSG, DIR) MSG.Header.ClassAndDirection &= 0xfe; MSG.Header.ClassAndDirection |= DIR; |
| 81 | /** |
81 | /** |
| 82 | * @brief Initialize StdCan. |
82 | * @brief Initialize StdCan. |
| 83 | * |
83 | * |
| 84 | * Initializes the StdCan and lower layers and sends an Application Startup |
84 | * Initializes the StdCan and lower layers and sends an Application Startup |