210
|
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 GCC</TITLE>
|
|
11 |
<META NAME="description" CONTENT="Code for GCC">
|
|
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="next" HREF="node91.html">
|
|
22 |
<LINK REL="previous" HREF="node89.html">
|
|
23 |
<LINK REL="up" HREF="node89.html">
|
|
24 |
<LINK REL="next" HREF="node91.html">
|
|
25 |
</HEAD>
|
|
26 |
|
|
27 |
<BODY >
|
|
28 |
|
|
29 |
<DIV CLASS="navigation"><!--Navigation Panel-->
|
|
30 |
<A NAME="tex2html1341"
|
|
31 |
HREF="node91.html">
|
|
32 |
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
|
|
33 |
SRC="/usr/share/latex2html/icons/next.png"></A>
|
|
34 |
<A NAME="tex2html1337"
|
|
35 |
HREF="node89.html">
|
|
36 |
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
|
|
37 |
SRC="/usr/share/latex2html/icons/up.png"></A>
|
|
38 |
<A NAME="tex2html1331"
|
|
39 |
HREF="node89.html">
|
|
40 |
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
|
|
41 |
SRC="/usr/share/latex2html/icons/prev.png"></A>
|
|
42 |
<A NAME="tex2html1339"
|
|
43 |
HREF="node1.html">
|
|
44 |
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
|
|
45 |
SRC="/usr/share/latex2html/icons/contents.png"></A>
|
|
46 |
<BR>
|
|
47 |
<B> Next:</B> <A NAME="tex2html1342"
|
|
48 |
HREF="node91.html">Code for CodeWarrior</A>
|
|
49 |
<B> Up:</B> <A NAME="tex2html1338"
|
|
50 |
HREF="node89.html">Initialize function</A>
|
|
51 |
<B> Previous:</B> <A NAME="tex2html1332"
|
|
52 |
HREF="node89.html">Initialize function</A>
|
|
53 |
<B> <A NAME="tex2html1340"
|
|
54 |
HREF="node1.html">Contents</A></B>
|
|
55 |
<BR>
|
|
56 |
<BR></DIV>
|
|
57 |
<!--End of Navigation Panel-->
|
|
58 |
|
|
59 |
<H5><A NAME="SECTION000114231000000000000">
|
|
60 |
Code for GCC</A>
|
|
61 |
</H5>
|
|
62 |
<TT>void initCanHCS12 (void)
|
|
63 |
<BR>
|
|
64 |
{
|
|
65 |
<BR>
|
|
66 |
newline
|
|
67 |
/Init the HCS12 microcontroler for CanOpen <BR>
|
|
68 |
12();
|
|
69 |
<BR>
|
|
70 |
|
|
71 |
<BR>// Init the HCS12 driver
|
|
72 |
<BR>
|
|
73 |
canBusInit bi0 = {
|
|
74 |
<BR>
|
|
75 |
|
|
76 |
<BR>,
|
|
77 |
<BR>* no low power
|
|
78 |
<BR>
|
|
79 |
<BR>
|
|
80 |
<BR>
|
|
81 |
<BR>
|
|
82 |
<BR>
|
|
83 |
<BR>
|
|
84 |
<BR>
|
|
85 |
<BR>*/
|
|
86 |
<BR>
|
|
87 |
|
|
88 |
<BR>,
|
|
89 |
<BR>* no time stamp
|
|
90 |
|
|
91 |
<BR>
|
|
92 |
<BR>
|
|
93 |
<BR>
|
|
94 |
<BR>
|
|
95 |
<BR>
|
|
96 |
<BR>
|
|
97 |
<BR>&sstarf#star;/
|
|
98 |
<BR>
|
|
99 |
|
|
100 |
<BR>,
|
|
101 |
<BR>* enable MSCAN
|
|
102 |
|
|
103 |
<BR>
|
|
104 |
<BR>
|
|
105 |
<BR>
|
|
106 |
<BR>
|
|
107 |
<BR>
|
|
108 |
<BR>
|
|
109 |
<BR>
|
|
110 |
<BR>*/
|
|
111 |
<BR>
|
|
112 |
|
|
113 |
<BR>,
|
|
114 |
<BR>* clock source : oscillator (In fact, it is not used)
|
|
115 |
|
|
116 |
<BR>*/
|
|
117 |
<BR>
|
|
118 |
|
|
119 |
<BR>,
|
|
120 |
<BR>* no loop back
|
|
121 |
|
|
122 |
<BR>
|
|
123 |
<BR>
|
|
124 |
<BR>
|
|
125 |
<BR>
|
|
126 |
<BR>
|
|
127 |
<BR>
|
|
128 |
<BR>
|
|
129 |
<BR>*/
|
|
130 |
<BR>
|
|
131 |
|
|
132 |
<BR>,
|
|
133 |
<BR>* no listen only
|
|
134 |
|
|
135 |
<BR>
|
|
136 |
<BR>
|
|
137 |
<BR>
|
|
138 |
<BR>
|
|
139 |
<BR>
|
|
140 |
<BR>
|
|
141 |
<BR>*/
|
|
142 |
<BR>
|
|
143 |
|
|
144 |
<BR>,
|
|
145 |
<BR>* no low pass filter for wk up */
|
|
146 |
<BR>
|
|
147 |
_Baudrates[CAN_BAUDRATE_250K],
|
|
148 |
<BR>
|
|
149 |
|
|
150 |
<BR>
|
|
151 |
<BR>{
|
|
152 |
<BR>
|
|
153 |
|
|
154 |
<BR>
|
|
155 |
<BR>
|
|
156 |
x00,
|
|
157 |
<BR>* Filter on 16 bits.
|
|
158 |
<BR>
|
|
159 |
|
|
160 |
<BR>
|
|
161 |
<BR>
|
|
162 |
<BR>
|
|
163 |
<BR>
|
|
164 |
<BR>
|
|
165 |
<BR>
|
|
166 |
<BR>
|
|
167 |
<BR>
|
|
168 |
Motorola Block Guide V02.14 fig
|
|
169 |
4-3 */
|
|
170 |
<BR>
|
|
171 |
|
|
172 |
<BR>
|
|
173 |
<BR>
|
|
174 |
x00, 0xFF, /* filter 0 hight accept all msg
|
|
175 |
|
|
176 |
<BR>
|
|
177 |
<BR>&sstarf#star;/
|
|
178 |
<BR>
|
|
179 |
|
|
180 |
<BR>
|
|
181 |
<BR>
|
|
182 |
x00, 0xFF, /* filter 0 low accept all msg
|
|
183 |
|
|
184 |
<BR>
|
|
185 |
<BR>
|
|
186 |
<BR>&sstarf#star;/
|
|
187 |
<BR>
|
|
188 |
|
|
189 |
<BR>
|
|
190 |
<BR>
|
|
191 |
x00, 0xFF, /* filter 1 hight filter all of
|
|
192 |
&sstarf#star;/
|
|
193 |
<BR>
|
|
194 |
|
|
195 |
<BR>
|
|
196 |
<BR>
|
|
197 |
x00, 0xFF, /* filter 1 low filter all of
|
|
198 |
|
|
199 |
<BR>&sstarf#star;/
|
|
200 |
<BR>
|
|
201 |
|
|
202 |
<BR>
|
|
203 |
<BR>
|
|
204 |
x00, 0xFF, /* filter 2 hight filter most of
|
|
205 |
*/
|
|
206 |
<BR>
|
|
207 |
|
|
208 |
<BR>
|
|
209 |
<BR>
|
|
210 |
x00, 0xFF, /* filter 2 low filter most of
|
|
211 |
|
|
212 |
<BR>*/
|
|
213 |
<BR>
|
|
214 |
|
|
215 |
<BR>
|
|
216 |
<BR>
|
|
217 |
x00, 0xFF, /* filter 3 hight filter most of
|
|
218 |
*/
|
|
219 |
<BR>
|
|
220 |
|
|
221 |
<BR>
|
|
222 |
<BR>
|
|
223 |
x00, 0xFF, /* filter 3 low filter most of
|
|
224 |
|
|
225 |
<BR>*/
|
|
226 |
<BR>
|
|
227 |
|
|
228 |
<BR>
|
|
229 |
<BR>}
|
|
230 |
<BR>
|
|
231 |
|
|
232 |
<BR>};</TT>
|
|
233 |
|
|
234 |
<P>
|
|
235 |
|
|
236 |
<DIV CLASS="navigation"><HR>
|
|
237 |
<!--Navigation Panel-->
|
|
238 |
<A NAME="tex2html1341"
|
|
239 |
HREF="node91.html">
|
|
240 |
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
|
|
241 |
SRC="/usr/share/latex2html/icons/next.png"></A>
|
|
242 |
<A NAME="tex2html1337"
|
|
243 |
HREF="node89.html">
|
|
244 |
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
|
|
245 |
SRC="/usr/share/latex2html/icons/up.png"></A>
|
|
246 |
<A NAME="tex2html1331"
|
|
247 |
HREF="node89.html">
|
|
248 |
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
|
|
249 |
SRC="/usr/share/latex2html/icons/prev.png"></A>
|
|
250 |
<A NAME="tex2html1339"
|
|
251 |
HREF="node1.html">
|
|
252 |
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
|
|
253 |
SRC="/usr/share/latex2html/icons/contents.png"></A>
|
|
254 |
<BR>
|
|
255 |
<B> Next:</B> <A NAME="tex2html1342"
|
|
256 |
HREF="node91.html">Code for CodeWarrior</A>
|
|
257 |
<B> Up:</B> <A NAME="tex2html1338"
|
|
258 |
HREF="node89.html">Initialize function</A>
|
|
259 |
<B> Previous:</B> <A NAME="tex2html1332"
|
|
260 |
HREF="node89.html">Initialize function</A>
|
|
261 |
<B> <A NAME="tex2html1340"
|
|
262 |
HREF="node1.html">Contents</A></B> </DIV>
|
|
263 |
<!--End of Navigation Panel-->
|
|
264 |
<ADDRESS>
|
|
265 |
epimerde
|
|
266 |
2007-06-05
|
|
267 |
</ADDRESS>
|
|
268 |
</BODY>
|
|
269 |
</HTML>
|