|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
|
2 |
|
3 <!--Converted with LaTeX2HTML 2002-2-1 (1.71) |
|
4 original version by: Nikos Drakos, CBLU, University of Leeds |
|
5 * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan |
|
6 * with significant contributions from: |
|
7 Jens Lippmann, Marek Rouchal, Martin Wilck and others --> |
|
8 <HTML> |
|
9 <HEAD> |
|
10 <TITLE>Code for CodeWarrior</TITLE> |
|
11 <META NAME="description" CONTENT="Code for CodeWarrior"> |
|
12 <META NAME="keywords" CONTENT="manual"> |
|
13 <META NAME="resource-type" CONTENT="document"> |
|
14 <META NAME="distribution" CONTENT="global"> |
|
15 |
|
16 <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> |
|
17 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> |
|
18 |
|
19 <LINK REL="STYLESHEET" HREF="manual.css"> |
|
20 |
|
21 <LINK REL="previous" HREF="node90.html"> |
|
22 <LINK REL="up" HREF="node89.html"> |
|
23 <LINK REL="next" HREF="node92.html"> |
|
24 </HEAD> |
|
25 |
|
26 <BODY > |
|
27 |
|
28 <DIV CLASS="navigation"><!--Navigation Panel--> |
|
29 <A NAME="tex2html1351" |
|
30 HREF="node92.html"> |
|
31 <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" |
|
32 SRC="/usr/share/latex2html/icons/next.png"></A> |
|
33 <A NAME="tex2html1347" |
|
34 HREF="node89.html"> |
|
35 <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" |
|
36 SRC="/usr/share/latex2html/icons/up.png"></A> |
|
37 <A NAME="tex2html1343" |
|
38 HREF="node90.html"> |
|
39 <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" |
|
40 SRC="/usr/share/latex2html/icons/prev.png"></A> |
|
41 <A NAME="tex2html1349" |
|
42 HREF="node1.html"> |
|
43 <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" |
|
44 SRC="/usr/share/latex2html/icons/contents.png"></A> |
|
45 <BR> |
|
46 <B> Next:</B> <A NAME="tex2html1352" |
|
47 HREF="node92.html">Who to use warnings</A> |
|
48 <B> Up:</B> <A NAME="tex2html1348" |
|
49 HREF="node89.html">Initialize function</A> |
|
50 <B> Previous:</B> <A NAME="tex2html1344" |
|
51 HREF="node90.html">Code for GCC</A> |
|
52 <B> <A NAME="tex2html1350" |
|
53 HREF="node1.html">Contents</A></B> |
|
54 <BR> |
|
55 <BR></DIV> |
|
56 <!--End of Navigation Panel--> |
|
57 |
|
58 <H5><A NAME="SECTION000114232000000000000"> |
|
59 Code for CodeWarrior</A> |
|
60 </H5> |
|
61 <TT>void initCanHCS12 (void) |
|
62 <BR> |
|
63 { |
|
64 <BR> |
|
65 newline |
|
66 /Init the HCS12 microcontroler for CanOpen <BR> |
|
67 12(); |
|
68 <BR> |
|
69 |
|
70 <BR>// Init the HCS12 driver |
|
71 <BR> |
|
72 canBusInit bi0 = { |
|
73 <BR> |
|
74 |
|
75 <BR>, |
|
76 <BR>* no low power |
|
77 <BR> |
|
78 <BR> |
|
79 <BR> |
|
80 <BR> |
|
81 <BR> |
|
82 <BR> |
|
83 <BR> |
|
84 <BR>*/ |
|
85 <BR> |
|
86 |
|
87 <BR>, |
|
88 <BR>* no time stamp |
|
89 |
|
90 <BR> |
|
91 <BR> |
|
92 <BR> |
|
93 <BR> |
|
94 <BR> |
|
95 <BR> |
|
96 <BR>&sstarf#star;/ |
|
97 <BR> |
|
98 |
|
99 <BR>, |
|
100 <BR>* enable MSCAN |
|
101 |
|
102 <BR> |
|
103 <BR> |
|
104 <BR> |
|
105 <BR> |
|
106 <BR> |
|
107 <BR> |
|
108 <BR> |
|
109 <BR>*/ |
|
110 <BR> |
|
111 |
|
112 <BR>, |
|
113 <BR>* clock source : oscillator (In fact, it is not used) |
|
114 |
|
115 <BR>*/ |
|
116 <BR> |
|
117 |
|
118 <BR>, |
|
119 <BR>* no loop back |
|
120 |
|
121 <BR> |
|
122 <BR> |
|
123 <BR> |
|
124 <BR> |
|
125 <BR> |
|
126 <BR> |
|
127 <BR> |
|
128 <BR>*/ |
|
129 <BR> |
|
130 |
|
131 <BR>, |
|
132 <BR>* no listen only |
|
133 |
|
134 <BR> |
|
135 <BR> |
|
136 <BR> |
|
137 <BR> |
|
138 <BR> |
|
139 <BR> |
|
140 <BR>*/ |
|
141 <BR> |
|
142 |
|
143 <BR>, |
|
144 <BR>* no low pass filter for wk up */ |
|
145 <BR> |
|
146 |
|
147 <BR> |
|
148 <BR>{ |
|
149 <BR> |
|
150 |
|
151 <BR> |
|
152 <BR> |
|
153 1, /* clksrc */ |
|
154 <BR> |
|
155 |
|
156 <BR> |
|
157 <BR> |
|
158 3, /* brp |
|
159 <BR>&sstarf#star;/ |
|
160 <BR> |
|
161 |
|
162 <BR> |
|
163 <BR> |
|
164 0, /* sjw |
|
165 <BR>&sstarf#star;/ |
|
166 <BR> |
|
167 |
|
168 <BR> |
|
169 <BR> |
|
170 0, /* samp |
|
171 <BR>*/ |
|
172 <BR> |
|
173 |
|
174 <BR> |
|
175 <BR> |
|
176 1, /* tseg2 &sstarf#star;/ |
|
177 <BR> |
|
178 |
|
179 <BR> |
|
180 <BR> |
|
181 12,/* tseg1 &sstarf#star;/ |
|
182 <BR> |
|
183 |
|
184 <BR> |
|
185 <BR>}, |
|
186 <BR> |
|
187 |
|
188 <BR> |
|
189 <BR>{ |
|
190 <BR> |
|
191 |
|
192 <BR> |
|
193 <BR> |
|
194 x00, |
|
195 <BR>* Filter on 16 bits. |
|
196 <BR> |
|
197 |
|
198 <BR> |
|
199 <BR> |
|
200 <BR> |
|
201 <BR> |
|
202 <BR> |
|
203 <BR> |
|
204 <BR> |
|
205 <BR> |
|
206 See Motorola Block Guide V02.14 fig |
|
207 4-3 */ |
|
208 <BR> |
|
209 |
|
210 <BR> |
|
211 <BR> |
|
212 x00, 0xFF, /* filter 0 hight accept all msg |
|
213 |
|
214 <BR> |
|
215 <BR>&sstarf#star;/ |
|
216 <BR> |
|
217 |
|
218 <BR> |
|
219 <BR> |
|
220 x00, 0xFF, /* filter 0 low accept all msg |
|
221 |
|
222 <BR> |
|
223 <BR> |
|
224 <BR>&sstarf#star;/ |
|
225 <BR> |
|
226 |
|
227 <BR> |
|
228 <BR> |
|
229 x00, 0xFF, /* filter 1 hight filter all of |
|
230 &sstarf#star;/ |
|
231 <BR> |
|
232 |
|
233 <BR> |
|
234 <BR> |
|
235 x00, 0xFF, /* filter 1 low filter all of |
|
236 |
|
237 <BR>&sstarf#star;/ |
|
238 <BR> |
|
239 |
|
240 <BR> |
|
241 <BR> |
|
242 x00, 0xFF, /* filter 2 hight filter most of |
|
243 */ |
|
244 <BR> |
|
245 |
|
246 <BR> |
|
247 <BR> |
|
248 x00, 0xFF, /* filter 2 low filter most of |
|
249 |
|
250 <BR>*/ |
|
251 <BR> |
|
252 |
|
253 <BR> |
|
254 <BR> |
|
255 x00, 0xFF, /* filter 3 hight filter most of |
|
256 */ |
|
257 <BR> |
|
258 |
|
259 <BR> |
|
260 <BR> |
|
261 x00, 0xFF, /* filter 3 low filter most of |
|
262 |
|
263 <BR>*/ |
|
264 <BR> |
|
265 |
|
266 <BR> |
|
267 <BR>} |
|
268 <BR> |
|
269 |
|
270 <BR>};</TT> |
|
271 |
|
272 <P> |
|
273 |
|
274 <DIV CLASS="navigation"><HR> |
|
275 <!--Navigation Panel--> |
|
276 <A NAME="tex2html1351" |
|
277 HREF="node92.html"> |
|
278 <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" |
|
279 SRC="/usr/share/latex2html/icons/next.png"></A> |
|
280 <A NAME="tex2html1347" |
|
281 HREF="node89.html"> |
|
282 <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" |
|
283 SRC="/usr/share/latex2html/icons/up.png"></A> |
|
284 <A NAME="tex2html1343" |
|
285 HREF="node90.html"> |
|
286 <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" |
|
287 SRC="/usr/share/latex2html/icons/prev.png"></A> |
|
288 <A NAME="tex2html1349" |
|
289 HREF="node1.html"> |
|
290 <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" |
|
291 SRC="/usr/share/latex2html/icons/contents.png"></A> |
|
292 <BR> |
|
293 <B> Next:</B> <A NAME="tex2html1352" |
|
294 HREF="node92.html">Who to use warnings</A> |
|
295 <B> Up:</B> <A NAME="tex2html1348" |
|
296 HREF="node89.html">Initialize function</A> |
|
297 <B> Previous:</B> <A NAME="tex2html1344" |
|
298 HREF="node90.html">Code for GCC</A> |
|
299 <B> <A NAME="tex2html1350" |
|
300 HREF="node1.html">Contents</A></B> </DIV> |
|
301 <!--End of Navigation Panel--> |
|
302 <ADDRESS> |
|
303 epimerde |
|
304 2007-06-05 |
|
305 </ADDRESS> |
|
306 </BODY> |
|
307 </HTML> |