Subversion Repositories HomeAutomation

Rev

Rev 823 | Rev 832 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 823 Rev 827
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) (uint8_t)((MSG.Header.ClassAndDirection >> 1) & 0x0F)
77
#define StdCan_Ret_class(Header) (uint8_t)((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(Header, CLASS) Header.ClassAndDirection &= 0x01; Header.ClassAndDirection |= (CLASS << 1);
79
#define StdCan_Ret_direction(MSG) (uint8_t)(MSG.Header.ClassAndDirection & 0x01)
79
#define StdCan_Ret_direction(Header) (uint8_t)(Header.ClassAndDirection & 0x01)
80
#define StdCan_Set_direction(MSG, DIR) MSG.Header.ClassAndDirection &= 0xfe; MSG.Header.ClassAndDirection |= DIR;
80
#define StdCan_Set_direction(Header, DIR) Header.ClassAndDirection &= 0xfe; Header.ClassAndDirection |= DIR;
81
 
81
 
82
#define NODE_HW_ID_BYTE0 (uint8_t)((NODE_HW_ID>>24)&0xff)
82
#define NODE_HW_ID_BYTE0 (uint8_t)((NODE_HW_ID>>24)&0xff)
83
#define NODE_HW_ID_BYTE1 (uint8_t)((NODE_HW_ID>>16)&0xff)
83
#define NODE_HW_ID_BYTE1 (uint8_t)((NODE_HW_ID>>16)&0xff)
84
#define NODE_HW_ID_BYTE2 (uint8_t)((NODE_HW_ID>>8)&0xff)
84
#define NODE_HW_ID_BYTE2 (uint8_t)((NODE_HW_ID>>8)&0xff)
85
#define NODE_HW_ID_BYTE3 (uint8_t)((NODE_HW_ID)&0xff)
85
#define NODE_HW_ID_BYTE3 (uint8_t)((NODE_HW_ID)&0xff)