1 |
578 |
jeremybenn |
/* Coldfire C Header File
|
2 |
|
|
* Copyright Freescale Semiconductor Inc
|
3 |
|
|
* All rights reserved.
|
4 |
|
|
*
|
5 |
|
|
* 2008/04/17 Revision: 0.2
|
6 |
|
|
*
|
7 |
|
|
* (c) Copyright UNIS, spol. s r.o. 1997-2008
|
8 |
|
|
* UNIS, spol. s r.o.
|
9 |
|
|
* Jundrovska 33
|
10 |
|
|
* 624 00 Brno
|
11 |
|
|
* Czech Republic
|
12 |
|
|
* http : www.processorexpert.com
|
13 |
|
|
* mail : info@processorexpert.com
|
14 |
|
|
*/
|
15 |
|
|
|
16 |
|
|
#ifndef __MCF52259_CANMB_H__
|
17 |
|
|
#define __MCF52259_CANMB_H__
|
18 |
|
|
|
19 |
|
|
|
20 |
|
|
/*********************************************************************
|
21 |
|
|
*
|
22 |
|
|
* Flex Controller Area Network Module (FlexCAN) message buffers
|
23 |
|
|
*
|
24 |
|
|
*********************************************************************/
|
25 |
|
|
|
26 |
|
|
/* Register read/write macros */
|
27 |
|
|
#define MCF_CANMB_CODE0 (*(vuint8 *)(&__IPSBAR[0x170080]))
|
28 |
|
|
#define MCF_CANMB_CTRL0 (*(vuint8 *)(&__IPSBAR[0x170081]))
|
29 |
|
|
#define MCF_CANMB_TIME0 (*(vuint16*)(&__IPSBAR[0x170082]))
|
30 |
|
|
#define MCF_CANMB_ID0 (*(vuint32*)(&__IPSBAR[0x170084]))
|
31 |
|
|
#define MCF_CANMB_DATA_WORD_1_0 (*(vuint16*)(&__IPSBAR[0x170088]))
|
32 |
|
|
#define MCF_CANMB_DATA_WORD_2_0 (*(vuint16*)(&__IPSBAR[0x17008A]))
|
33 |
|
|
#define MCF_CANMB_DATA_WORD_3_0 (*(vuint16*)(&__IPSBAR[0x17008C]))
|
34 |
|
|
#define MCF_CANMB_DATA_WORD_4_0 (*(vuint16*)(&__IPSBAR[0x17008E]))
|
35 |
|
|
#define MCF_CANMB_CODE1 (*(vuint8 *)(&__IPSBAR[0x170090]))
|
36 |
|
|
#define MCF_CANMB_CTRL1 (*(vuint8 *)(&__IPSBAR[0x170091]))
|
37 |
|
|
#define MCF_CANMB_TIME1 (*(vuint16*)(&__IPSBAR[0x170092]))
|
38 |
|
|
#define MCF_CANMB_ID1 (*(vuint32*)(&__IPSBAR[0x170094]))
|
39 |
|
|
#define MCF_CANMB_DATA_WORD_1_1 (*(vuint16*)(&__IPSBAR[0x170098]))
|
40 |
|
|
#define MCF_CANMB_DATA_WORD_2_1 (*(vuint16*)(&__IPSBAR[0x17009A]))
|
41 |
|
|
#define MCF_CANMB_DATA_WORD_3_1 (*(vuint16*)(&__IPSBAR[0x17009C]))
|
42 |
|
|
#define MCF_CANMB_DATA_WORD_4_1 (*(vuint16*)(&__IPSBAR[0x17009E]))
|
43 |
|
|
#define MCF_CANMB_CODE2 (*(vuint8 *)(&__IPSBAR[0x1700A0]))
|
44 |
|
|
#define MCF_CANMB_CTRL2 (*(vuint8 *)(&__IPSBAR[0x1700A1]))
|
45 |
|
|
#define MCF_CANMB_TIME2 (*(vuint16*)(&__IPSBAR[0x1700A2]))
|
46 |
|
|
#define MCF_CANMB_ID2 (*(vuint32*)(&__IPSBAR[0x1700A4]))
|
47 |
|
|
#define MCF_CANMB_DATA_WORD_1_2 (*(vuint16*)(&__IPSBAR[0x1700A8]))
|
48 |
|
|
#define MCF_CANMB_DATA_WORD_2_2 (*(vuint16*)(&__IPSBAR[0x1700AA]))
|
49 |
|
|
#define MCF_CANMB_DATA_WORD_3_2 (*(vuint16*)(&__IPSBAR[0x1700AC]))
|
50 |
|
|
#define MCF_CANMB_DATA_WORD_4_2 (*(vuint16*)(&__IPSBAR[0x1700AE]))
|
51 |
|
|
#define MCF_CANMB_CODE3 (*(vuint8 *)(&__IPSBAR[0x1700B0]))
|
52 |
|
|
#define MCF_CANMB_CTRL3 (*(vuint8 *)(&__IPSBAR[0x1700B1]))
|
53 |
|
|
#define MCF_CANMB_TIME3 (*(vuint16*)(&__IPSBAR[0x1700B2]))
|
54 |
|
|
#define MCF_CANMB_ID3 (*(vuint32*)(&__IPSBAR[0x1700B4]))
|
55 |
|
|
#define MCF_CANMB_DATA_WORD_1_3 (*(vuint16*)(&__IPSBAR[0x1700B8]))
|
56 |
|
|
#define MCF_CANMB_DATA_WORD_2_3 (*(vuint16*)(&__IPSBAR[0x1700BA]))
|
57 |
|
|
#define MCF_CANMB_DATA_WORD_3_3 (*(vuint16*)(&__IPSBAR[0x1700BC]))
|
58 |
|
|
#define MCF_CANMB_DATA_WORD_4_3 (*(vuint16*)(&__IPSBAR[0x1700BE]))
|
59 |
|
|
#define MCF_CANMB_CODE4 (*(vuint8 *)(&__IPSBAR[0x1700C0]))
|
60 |
|
|
#define MCF_CANMB_CTRL4 (*(vuint8 *)(&__IPSBAR[0x1700C1]))
|
61 |
|
|
#define MCF_CANMB_TIME4 (*(vuint16*)(&__IPSBAR[0x1700C2]))
|
62 |
|
|
#define MCF_CANMB_ID4 (*(vuint32*)(&__IPSBAR[0x1700C4]))
|
63 |
|
|
#define MCF_CANMB_DATA_WORD_1_4 (*(vuint16*)(&__IPSBAR[0x1700C8]))
|
64 |
|
|
#define MCF_CANMB_DATA_WORD_2_4 (*(vuint16*)(&__IPSBAR[0x1700CA]))
|
65 |
|
|
#define MCF_CANMB_DATA_WORD_3_4 (*(vuint16*)(&__IPSBAR[0x1700CC]))
|
66 |
|
|
#define MCF_CANMB_DATA_WORD_4_4 (*(vuint16*)(&__IPSBAR[0x1700CE]))
|
67 |
|
|
#define MCF_CANMB_CODE5 (*(vuint8 *)(&__IPSBAR[0x1700D0]))
|
68 |
|
|
#define MCF_CANMB_CTRL5 (*(vuint8 *)(&__IPSBAR[0x1700D1]))
|
69 |
|
|
#define MCF_CANMB_TIME5 (*(vuint16*)(&__IPSBAR[0x1700D2]))
|
70 |
|
|
#define MCF_CANMB_ID5 (*(vuint32*)(&__IPSBAR[0x1700D4]))
|
71 |
|
|
#define MCF_CANMB_DATA_WORD_1_5 (*(vuint16*)(&__IPSBAR[0x1700D8]))
|
72 |
|
|
#define MCF_CANMB_DATA_WORD_2_5 (*(vuint16*)(&__IPSBAR[0x1700DA]))
|
73 |
|
|
#define MCF_CANMB_DATA_WORD_3_5 (*(vuint16*)(&__IPSBAR[0x1700DC]))
|
74 |
|
|
#define MCF_CANMB_DATA_WORD_4_5 (*(vuint16*)(&__IPSBAR[0x1700DE]))
|
75 |
|
|
#define MCF_CANMB_CODE6 (*(vuint8 *)(&__IPSBAR[0x1700E0]))
|
76 |
|
|
#define MCF_CANMB_CTRL6 (*(vuint8 *)(&__IPSBAR[0x1700E1]))
|
77 |
|
|
#define MCF_CANMB_TIME6 (*(vuint16*)(&__IPSBAR[0x1700E2]))
|
78 |
|
|
#define MCF_CANMB_ID6 (*(vuint32*)(&__IPSBAR[0x1700E4]))
|
79 |
|
|
#define MCF_CANMB_DATA_WORD_1_6 (*(vuint16*)(&__IPSBAR[0x1700E8]))
|
80 |
|
|
#define MCF_CANMB_DATA_WORD_2_6 (*(vuint16*)(&__IPSBAR[0x1700EA]))
|
81 |
|
|
#define MCF_CANMB_DATA_WORD_3_6 (*(vuint16*)(&__IPSBAR[0x1700EC]))
|
82 |
|
|
#define MCF_CANMB_DATA_WORD_4_6 (*(vuint16*)(&__IPSBAR[0x1700EE]))
|
83 |
|
|
#define MCF_CANMB_CODE7 (*(vuint8 *)(&__IPSBAR[0x1700F0]))
|
84 |
|
|
#define MCF_CANMB_CTRL7 (*(vuint8 *)(&__IPSBAR[0x1700F1]))
|
85 |
|
|
#define MCF_CANMB_TIME7 (*(vuint16*)(&__IPSBAR[0x1700F2]))
|
86 |
|
|
#define MCF_CANMB_ID7 (*(vuint32*)(&__IPSBAR[0x1700F4]))
|
87 |
|
|
#define MCF_CANMB_DATA_WORD_1_7 (*(vuint16*)(&__IPSBAR[0x1700F8]))
|
88 |
|
|
#define MCF_CANMB_DATA_WORD_2_7 (*(vuint16*)(&__IPSBAR[0x1700FA]))
|
89 |
|
|
#define MCF_CANMB_DATA_WORD_3_7 (*(vuint16*)(&__IPSBAR[0x1700FC]))
|
90 |
|
|
#define MCF_CANMB_DATA_WORD_4_7 (*(vuint16*)(&__IPSBAR[0x1700FE]))
|
91 |
|
|
#define MCF_CANMB_CODE8 (*(vuint8 *)(&__IPSBAR[0x170100]))
|
92 |
|
|
#define MCF_CANMB_CTRL8 (*(vuint8 *)(&__IPSBAR[0x170101]))
|
93 |
|
|
#define MCF_CANMB_TIME8 (*(vuint16*)(&__IPSBAR[0x170102]))
|
94 |
|
|
#define MCF_CANMB_ID8 (*(vuint32*)(&__IPSBAR[0x170104]))
|
95 |
|
|
#define MCF_CANMB_DATA_WORD_1_8 (*(vuint16*)(&__IPSBAR[0x170108]))
|
96 |
|
|
#define MCF_CANMB_DATA_WORD_2_8 (*(vuint16*)(&__IPSBAR[0x17010A]))
|
97 |
|
|
#define MCF_CANMB_DATA_WORD_3_8 (*(vuint16*)(&__IPSBAR[0x17010C]))
|
98 |
|
|
#define MCF_CANMB_DATA_WORD_4_8 (*(vuint16*)(&__IPSBAR[0x17010E]))
|
99 |
|
|
#define MCF_CANMB_CODE9 (*(vuint8 *)(&__IPSBAR[0x170110]))
|
100 |
|
|
#define MCF_CANMB_CTRL9 (*(vuint8 *)(&__IPSBAR[0x170111]))
|
101 |
|
|
#define MCF_CANMB_TIME9 (*(vuint16*)(&__IPSBAR[0x170112]))
|
102 |
|
|
#define MCF_CANMB_ID9 (*(vuint32*)(&__IPSBAR[0x170114]))
|
103 |
|
|
#define MCF_CANMB_DATA_WORD_1_9 (*(vuint16*)(&__IPSBAR[0x170118]))
|
104 |
|
|
#define MCF_CANMB_DATA_WORD_2_9 (*(vuint16*)(&__IPSBAR[0x17011A]))
|
105 |
|
|
#define MCF_CANMB_DATA_WORD_3_9 (*(vuint16*)(&__IPSBAR[0x17011C]))
|
106 |
|
|
#define MCF_CANMB_DATA_WORD_4_9 (*(vuint16*)(&__IPSBAR[0x17011E]))
|
107 |
|
|
#define MCF_CANMB_CODE10 (*(vuint8 *)(&__IPSBAR[0x170120]))
|
108 |
|
|
#define MCF_CANMB_CTRL10 (*(vuint8 *)(&__IPSBAR[0x170121]))
|
109 |
|
|
#define MCF_CANMB_TIME10 (*(vuint16*)(&__IPSBAR[0x170122]))
|
110 |
|
|
#define MCF_CANMB_ID10 (*(vuint32*)(&__IPSBAR[0x170124]))
|
111 |
|
|
#define MCF_CANMB_DATA_WORD_1_10 (*(vuint16*)(&__IPSBAR[0x170128]))
|
112 |
|
|
#define MCF_CANMB_DATA_WORD_2_10 (*(vuint16*)(&__IPSBAR[0x17012A]))
|
113 |
|
|
#define MCF_CANMB_DATA_WORD_3_10 (*(vuint16*)(&__IPSBAR[0x17012C]))
|
114 |
|
|
#define MCF_CANMB_DATA_WORD_4_10 (*(vuint16*)(&__IPSBAR[0x17012E]))
|
115 |
|
|
#define MCF_CANMB_CODE11 (*(vuint8 *)(&__IPSBAR[0x170130]))
|
116 |
|
|
#define MCF_CANMB_CTRL11 (*(vuint8 *)(&__IPSBAR[0x170131]))
|
117 |
|
|
#define MCF_CANMB_TIME11 (*(vuint16*)(&__IPSBAR[0x170132]))
|
118 |
|
|
#define MCF_CANMB_ID11 (*(vuint32*)(&__IPSBAR[0x170134]))
|
119 |
|
|
#define MCF_CANMB_DATA_WORD_1_11 (*(vuint16*)(&__IPSBAR[0x170138]))
|
120 |
|
|
#define MCF_CANMB_DATA_WORD_2_11 (*(vuint16*)(&__IPSBAR[0x17013A]))
|
121 |
|
|
#define MCF_CANMB_DATA_WORD_3_11 (*(vuint16*)(&__IPSBAR[0x17013C]))
|
122 |
|
|
#define MCF_CANMB_DATA_WORD_4_11 (*(vuint16*)(&__IPSBAR[0x17013E]))
|
123 |
|
|
#define MCF_CANMB_CODE12 (*(vuint8 *)(&__IPSBAR[0x170140]))
|
124 |
|
|
#define MCF_CANMB_CTRL12 (*(vuint8 *)(&__IPSBAR[0x170141]))
|
125 |
|
|
#define MCF_CANMB_TIME12 (*(vuint16*)(&__IPSBAR[0x170142]))
|
126 |
|
|
#define MCF_CANMB_ID12 (*(vuint32*)(&__IPSBAR[0x170144]))
|
127 |
|
|
#define MCF_CANMB_DATA_WORD_1_ (*(vuint16*)(&__IPSBAR[0x170148]))
|
128 |
|
|
#define MCF_CANMB_DATA_WORD_2_12 (*(vuint16*)(&__IPSBAR[0x17014A]))
|
129 |
|
|
#define MCF_CANMB_DATA_WORD_3_12 (*(vuint16*)(&__IPSBAR[0x17014C]))
|
130 |
|
|
#define MCF_CANMB_DATA_WORD_4_12 (*(vuint16*)(&__IPSBAR[0x17014E]))
|
131 |
|
|
#define MCF_CANMB_CODE13 (*(vuint8 *)(&__IPSBAR[0x170150]))
|
132 |
|
|
#define MCF_CANMB_CTRL13 (*(vuint8 *)(&__IPSBAR[0x170151]))
|
133 |
|
|
#define MCF_CANMB_TIME13 (*(vuint16*)(&__IPSBAR[0x170152]))
|
134 |
|
|
#define MCF_CANMB_ID13 (*(vuint32*)(&__IPSBAR[0x170154]))
|
135 |
|
|
#define MCF_CANMB_DATA_WORD_1_13 (*(vuint16*)(&__IPSBAR[0x170158]))
|
136 |
|
|
#define MCF_CANMB_DATA_WORD_2_13 (*(vuint16*)(&__IPSBAR[0x17015A]))
|
137 |
|
|
#define MCF_CANMB_DATA_WORD_3_13 (*(vuint16*)(&__IPSBAR[0x17015C]))
|
138 |
|
|
#define MCF_CANMB_DATA_WORD_4_13 (*(vuint16*)(&__IPSBAR[0x17015E]))
|
139 |
|
|
#define MCF_CANMB_CODE14 (*(vuint8 *)(&__IPSBAR[0x170160]))
|
140 |
|
|
#define MCF_CANMB_CTRL14 (*(vuint8 *)(&__IPSBAR[0x170161]))
|
141 |
|
|
#define MCF_CANMB_TIME14 (*(vuint16*)(&__IPSBAR[0x170162]))
|
142 |
|
|
#define MCF_CANMB_ID14 (*(vuint32*)(&__IPSBAR[0x170164]))
|
143 |
|
|
#define MCF_CANMB_DATA_WORD_1_14 (*(vuint16*)(&__IPSBAR[0x170168]))
|
144 |
|
|
#define MCF_CANMB_DATA_WORD_2_14 (*(vuint16*)(&__IPSBAR[0x17016A]))
|
145 |
|
|
#define MCF_CANMB_DATA_WORD_3_14 (*(vuint16*)(&__IPSBAR[0x17016C]))
|
146 |
|
|
#define MCF_CANMB_DATA_WORD_4_14 (*(vuint16*)(&__IPSBAR[0x17016E]))
|
147 |
|
|
#define MCF_CANMB_CODE15 (*(vuint8 *)(&__IPSBAR[0x170170]))
|
148 |
|
|
#define MCF_CANMB_CTRL15 (*(vuint8 *)(&__IPSBAR[0x170171]))
|
149 |
|
|
#define MCF_CANMB_TIME15 (*(vuint16*)(&__IPSBAR[0x170172]))
|
150 |
|
|
#define MCF_CANMB_ID15 (*(vuint32*)(&__IPSBAR[0x170174]))
|
151 |
|
|
#define MCF_CANMB_DATA_WORD_1_15 (*(vuint16*)(&__IPSBAR[0x170178]))
|
152 |
|
|
#define MCF_CANMB_DATA_WORD_2_15 (*(vuint16*)(&__IPSBAR[0x17017A]))
|
153 |
|
|
#define MCF_CANMB_DATA_WORD_3_15 (*(vuint16*)(&__IPSBAR[0x17017C]))
|
154 |
|
|
#define MCF_CANMB_DATA_WORD_4_15 (*(vuint16*)(&__IPSBAR[0x17017E]))
|
155 |
|
|
#define MCF_CANMB_CODE(x) (*(vuint8 *)(&__IPSBAR[0x170080 + ((x)*0x10)]))
|
156 |
|
|
#define MCF_CANMB_CTRL(x) (*(vuint8 *)(&__IPSBAR[0x170081 + ((x)*0x10)]))
|
157 |
|
|
#define MCF_CANMB_TIME(x) (*(vuint16*)(&__IPSBAR[0x170082 + ((x)*0x10)]))
|
158 |
|
|
#define MCF_CANMB_ID(x) (*(vuint32*)(&__IPSBAR[0x170084 + ((x)*0x10)]))
|
159 |
|
|
#define MCF_CANMB_DATA_WORD_1(x) (*(vuint16*)(&__IPSBAR[0x170088 + ((x)*0x10)]))
|
160 |
|
|
#define MCF_CANMB_DATA_WORD_2(x) (*(vuint16*)(&__IPSBAR[0x17008A + ((x)*0x10)]))
|
161 |
|
|
#define MCF_CANMB_DATA_WORD_3(x) (*(vuint16*)(&__IPSBAR[0x17008C + ((x)*0x10)]))
|
162 |
|
|
#define MCF_CANMB_DATA_WORD_4(x) (*(vuint16*)(&__IPSBAR[0x17008E + ((x)*0x10)]))
|
163 |
|
|
|
164 |
|
|
|
165 |
|
|
/* Other macros */
|
166 |
|
|
#define MCF_CANMB_BYTE(x,y) (*(vuint8 *)(&__IPSBAR[((0x170088 + ((x)*0x10)+y))]))
|
167 |
|
|
|
168 |
|
|
|
169 |
|
|
/* Bit definitions and macros for MCF_CANMB_CODE */
|
170 |
|
|
#define MCF_CANMB_CODE_CODE(x) (((x)&0xF)<<0)
|
171 |
|
|
|
172 |
|
|
/* Bit definitions and macros for MCF_CANMB_CTRL */
|
173 |
|
|
#define MCF_CANMB_CTRL_LENGTH(x) (((x)&0xF)<<0)
|
174 |
|
|
#define MCF_CANMB_CTRL_RTR (0x10)
|
175 |
|
|
#define MCF_CANMB_CTRL_IDE (0x20)
|
176 |
|
|
#define MCF_CANMB_CTRL_SRR (0x40)
|
177 |
|
|
|
178 |
|
|
/* Bit definitions and macros for MCF_CANMB_TIME */
|
179 |
|
|
#define MCF_CANMB_TIME_TIME_STAMP(x) (((x)&0xFFFF)<<0)
|
180 |
|
|
|
181 |
|
|
/* Bit definitions and macros for MCF_CANMB_ID */
|
182 |
|
|
#define MCF_CANMB_ID_EXT(x) (((x)&0x3FFFF)<<0)
|
183 |
|
|
#define MCF_CANMB_ID_STD(x) (((x)&0x7FF)<<0x12)
|
184 |
|
|
|
185 |
|
|
/* Bit definitions and macros for MCF_CANMB_DATA_WORD_1 */
|
186 |
|
|
#define MCF_CANMB_DATA_WORD_1_DATA_BYTE_1(x) (((x)&0xFF)<<0)
|
187 |
|
|
#define MCF_CANMB_DATA_WORD_1_DATA_BYTE_0(x) (((x)&0xFF)<<0x8)
|
188 |
|
|
|
189 |
|
|
/* Bit definitions and macros for MCF_CANMB_DATA_WORD_2 */
|
190 |
|
|
#define MCF_CANMB_DATA_WORD_2_DATA_BYTE_3(x) (((x)&0xFF)<<0)
|
191 |
|
|
#define MCF_CANMB_DATA_WORD_2_DATA_BYTE_2(x) (((x)&0xFF)<<0x8)
|
192 |
|
|
|
193 |
|
|
/* Bit definitions and macros for MCF_CANMB_DATA_WORD_3 */
|
194 |
|
|
#define MCF_CANMB_DATA_WORD_3_DATA_BYTE_5(x) (((x)&0xFF)<<0)
|
195 |
|
|
#define MCF_CANMB_DATA_WORD_3_DATA_BYTE_4(x) (((x)&0xFF)<<0x8)
|
196 |
|
|
|
197 |
|
|
/* Bit definitions and macros for MCF_CANMB_DATA_WORD_4 */
|
198 |
|
|
#define MCF_CANMB_DATA_WORD_4_DATA_BYTE_7(x) (((x)&0xFF)<<0)
|
199 |
|
|
#define MCF_CANMB_DATA_WORD_4_DATA_BYTE_6(x) (((x)&0xFF)<<0x8)
|
200 |
|
|
|
201 |
|
|
|
202 |
|
|
#endif /* __MCF52259_CANMB_H__ */
|