Subversion Repositories FlightCtrl

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1564 LPDunwell 1
   1               		.file	"spi.c"
2
   2               	__SREG__ = 0x3f
3
   3               	__SP_H__ = 0x3e
4
   4               	__SP_L__ = 0x3d
5
   5               	__CCP__  = 0x34
6
   6               	__tmp_reg__ = 0
7
   7               	__zero_reg__ = 1
8
   8               		.text
9
   9               	.global	SPI_MasterInit
10
  11               	SPI_MasterInit:
11
  12               	/* prologue: function */
12
  13               	/* frame size = 0 */
13
  14 0000 84B1      		in r24,36-32
14
  15 0002 806A      		ori r24,lo8(-96)
15
  16 0004 84B9      		out 36-32,r24
16
  17 0006 3D9A      		sbi 39-32,5
17
  18 0008 82E5      		ldi r24,lo8(82)
18
  19 000a 8CBD      		out 76-32,r24
19
  20 000c 1DBC      		out 77-32,__zero_reg__
20
  21 000e 459A      		sbi 40-32,5
21
  22 0010 80E0      		ldi r24,lo8(ToNaviCtrl)
22
  23 0012 90E0      		ldi r25,hi8(ToNaviCtrl)
23
  24 0014 9093 0000 		sts (SPI_TxBuffer)+1,r25
24
  25 0018 8093 0000 		sts SPI_TxBuffer,r24
25
  26 001c 81E0      		ldi r24,lo8(1)
26
  27 001e 8093 0000 		sts SPITransferCompleted,r24
27
  28 0022 8AEA      		ldi r24,lo8(-86)
28
  29 0024 8093 0000 		sts ToNaviCtrl,r24
29
  30 0028 83E8      		ldi r24,lo8(-125)
30
  31 002a 8093 0000 		sts ToNaviCtrl+1,r24
31
  32 002e 9AE0      		ldi r25,lo8(10)
32
  33 0030 9093 0000 		sts ToNaviCtrl+2,r25
33
  34 0034 1092 0000 		sts (ToNaviCtrl+3)+1,__zero_reg__
34
  35 0038 1092 0000 		sts ToNaviCtrl+3,__zero_reg__
35
  36 003c 1092 0000 		sts (ToNaviCtrl+5)+1,__zero_reg__
36
  37 0040 1092 0000 		sts ToNaviCtrl+5,__zero_reg__
37
  38 0044 1092 0000 		sts NCSerialDataOkay,__zero_reg__
38
  39 0048 1092 0000 		sts NCDataOkay,__zero_reg__
39
  40 004c 1092 0000 		sts SPI_RxDataValid,__zero_reg__
40
  41 0050 1092 0000 		sts SPI_VersionInfo,__zero_reg__
41
  42 0054 8CE4      		ldi r24,lo8(76)
42
  43 0056 8093 0000 		sts SPI_VersionInfo+1,r24
43
  44 005a 86E0      		ldi r24,lo8(6)
44
  45 005c 8093 0000 		sts SPI_VersionInfo+2,r24
45
  46 0060 9093 0000 		sts SPI_VersionInfo+3,r25
46
  47               	/* epilogue start */
47
  48 0064 0895      		ret
48
  50               	.global	SPI_TransmitByte
49
  52               	SPI_TransmitByte:
50
  53               	/* prologue: function */
51
  54               	/* frame size = 0 */
52
  55 0066 8091 0000 		lds r24,SPITransferCompleted
53
  56 006a 8823      		tst r24
54
  57 006c 01F4      		brne .L15
55
  58 006e 0DB4      		in __tmp_reg__,77-32
56
  59 0070 07FE      		sbrs __tmp_reg__,7
57
  60               	.L15:
58
  61 0072 0895      		ret
59
  62               	.L18:
60
  63 0074 84E0      		ldi r24,lo8(4)
61
  64 0076 8093 0000 		sts SendSPI,r24
62
  65 007a 459A      		sbi 40-32,5
63
  66 007c 9EB5      		in r25,78-32
64
  67 007e 8091 0000 		lds r24,SPI_RXState.2020
65
  68 0082 8130      		cpi r24,lo8(1)
66
  69 0084 01F4      		brne .+2
67
  70 0086 00C0      		rjmp .L7
68
  71 0088 8130      		cpi r24,lo8(1)
69
  72 008a 00F0      		brlo .+2
70
  73 008c 00C0      		rjmp .L19
71
  74 008e 1092 0000 		sts SPI_RxBufferIndex,__zero_reg__
72
  75 0092 9093 0000 		sts rxchksum.2022,r25
73
  76 0096 9138      		cpi r25,lo8(-127)
74
  77 0098 01F4      		brne .+2
75
  78 009a 00C0      		rjmp .L20
76
  79               	.L5:
77
  80 009c 2091 0000 		lds r18,SPI_TxBufferIndex
78
  81 00a0 2032      		cpi r18,lo8(32)
79
  82 00a2 00F0      		brlo .L21
80
  83 00a4 81E0      		ldi r24,lo8(1)
81
  84 00a6 8093 0000 		sts SPITransferCompleted,r24
82
  85 00aa 0895      		ret
83
  86               	.L21:
84
  87 00ac 4598      		cbi 40-32,5
85
  88               	/* #APP */
86
  89               	 ;  460 "spi.c" 1
87
  90 00ae 0000      		nop
88
  91               	 ;  0 "" 2
89
  92               	 ;  460 "spi.c" 1
90
  93 00b0 0000      		nop
91
  94               	 ;  0 "" 2
92
  95               	 ;  460 "spi.c" 1
93
  96 00b2 0000      		nop
94
  97               	 ;  0 "" 2
95
  98               	 ;  460 "spi.c" 1
96
  99 00b4 0000      		nop
97
 100               	 ;  0 "" 2
98
 101               	 ;  460 "spi.c" 1
99
 102 00b6 0000      		nop
100
 103               	 ;  0 "" 2
101
 104               	 ;  460 "spi.c" 1
102
 105 00b8 0000      		nop
103
 106               	 ;  0 "" 2
104
 107               	 ;  460 "spi.c" 1
105
 108 00ba 0000      		nop
106
 109               	 ;  0 "" 2
107
 110               	 ;  460 "spi.c" 1
108
 111 00bc 0000      		nop
109
 112               	 ;  0 "" 2
110
 113               	 ;  461 "spi.c" 1
111
 114 00be 0000      		nop
112
 115               	 ;  0 "" 2
113
 116               	 ;  461 "spi.c" 1
114
 117 00c0 0000      		nop
115
 118               	 ;  0 "" 2
116
 119               	 ;  461 "spi.c" 1
117
 120 00c2 0000      		nop
118
 121               	 ;  0 "" 2
119
 122               	 ;  461 "spi.c" 1
120
 123 00c4 0000      		nop
121
 124               	 ;  0 "" 2
122
 125               	 ;  461 "spi.c" 1
123
 126 00c6 0000      		nop
124
 127               	 ;  0 "" 2
125
 128               	 ;  461 "spi.c" 1
126
 129 00c8 0000      		nop
127
 130               	 ;  0 "" 2
128
 131               	 ;  461 "spi.c" 1
129
 132 00ca 0000      		nop
130
 133               	 ;  0 "" 2
131
 134               	 ;  461 "spi.c" 1
132
 135 00cc 0000      		nop
133
 136               	 ;  0 "" 2
134
 137               	 ;  462 "spi.c" 1
135
 138 00ce 0000      		nop
136
 139               	 ;  0 "" 2
137
 140               	 ;  462 "spi.c" 1
138
 141 00d0 0000      		nop
139
 142               	 ;  0 "" 2
140
 143               	 ;  462 "spi.c" 1
141
 144 00d2 0000      		nop
142
 145               	 ;  0 "" 2
143
 146               	 ;  462 "spi.c" 1
144
 147 00d4 0000      		nop
145
 148               	 ;  0 "" 2
146
 149               	 ;  462 "spi.c" 1
147
 150 00d6 0000      		nop
148
 151               	 ;  0 "" 2
149
 152               	 ;  462 "spi.c" 1
150
 153 00d8 0000      		nop
151
 154               	 ;  0 "" 2
152
 155               	 ;  462 "spi.c" 1
153
 156 00da 0000      		nop
154
 157               	 ;  0 "" 2
155
 158               	 ;  462 "spi.c" 1
156
 159 00dc 0000      		nop
157
 160               	 ;  0 "" 2
158
 161               	/* #NOAPP */
159
 162 00de E091 0000 		lds r30,SPI_TxBuffer
160
 163 00e2 F091 0000 		lds r31,(SPI_TxBuffer)+1
161
 164 00e6 E20F      		add r30,r18
162
 165 00e8 F11D      		adc r31,__zero_reg__
163
 166 00ea 8081      		ld r24,Z
164
 167 00ec 8EBD      		out 78-32,r24
165
 168 00ee 9091 0000 		lds r25,ToNaviCtrl+31
166
 169 00f2 890F      		add r24,r25
167
 170 00f4 8093 0000 		sts ToNaviCtrl+31,r24
168
 171 00f8 2F5F      		subi r18,lo8(-(1))
169
 172 00fa 2093 0000 		sts SPI_TxBufferIndex,r18
170
 173 00fe 0895      		ret
171
 174               	.L19:
172
 175 0100 8230      		cpi r24,lo8(2)
173
 176 0102 01F0      		breq .+2
174
 177 0104 00C0      		rjmp .L5
175
 178 0106 8091 0000 		lds r24,SPI_RxBufferIndex
176
 179 010a E82F      		mov r30,r24
177
 180 010c F0E0      		ldi r31,lo8(0)
178
 181 010e E050      		subi r30,lo8(-(SPI_RxBuffer))
179
 182 0110 F040      		sbci r31,hi8(-(SPI_RxBuffer))
180
 183 0112 9083      		st Z,r25
181
 184 0114 8F5F      		subi r24,lo8(-(1))
182
 185 0116 8093 0000 		sts SPI_RxBufferIndex,r24
183
 186 011a 8A31      		cpi r24,lo8(26)
184
 187 011c 00F0      		brlo .L10
185
 188 011e 8091 0000 		lds r24,rxchksum.2022
186
 189 0122 9817      		cp r25,r24
187
 190 0124 01F0      		breq .L22
188
 191 0126 1092 0000 		sts SPI_RxDataValid,__zero_reg__
189
 192               	.L13:
190
 193 012a 1092 0000 		sts SPI_RXState.2020,__zero_reg__
191
 194 012e 00C0      		rjmp .L5
192
 195               	.L20:
193
 196 0130 81E0      		ldi r24,lo8(1)
194
 197 0132 8093 0000 		sts SPI_RXState.2020,r24
195
 198 0136 00C0      		rjmp .L5
196
 199               	.L7:
197
 200 0138 9535      		cpi r25,lo8(85)
198
 201 013a 01F4      		brne .L13
199
 202 013c 8091 0000 		lds r24,rxchksum.2022
200
 203 0140 8B5A      		subi r24,lo8(-(85))
201
 204 0142 8093 0000 		sts rxchksum.2022,r24
202
 205 0146 82E0      		ldi r24,lo8(2)
203
 206 0148 8093 0000 		sts SPI_RXState.2020,r24
204
 207 014c 00C0      		rjmp .L5
205
 208               	.L10:
206
 209 014e 8091 0000 		lds r24,rxchksum.2022
207
 210 0152 890F      		add r24,r25
208
 211 0154 8093 0000 		sts rxchksum.2022,r24
209
 212 0158 00C0      		rjmp .L5
210
 213               	.L22:
211
 214               	/* #APP */
212
 215               	 ;  436 "spi.c" 1
213
 216 015a F894      		cli
214
 217               	 ;  0 "" 2
215
 218               	/* #NOAPP */
216
 219 015c A0E0      		ldi r26,lo8(FromNaviCtrl)
217
 220 015e B0E0      		ldi r27,hi8(FromNaviCtrl)
218
 221 0160 E0E0      		ldi r30,lo8(SPI_RxBuffer)
219
 222 0162 F0E0      		ldi r31,hi8(SPI_RxBuffer)
220
 223 0164 8AE1      		ldi r24,lo8(26)
221
 224               	.L12:
222
 225 0166 0190      		ld r0,Z+
223
 226 0168 0D92      		st X+,r0
224
 227 016a 8150      		subi r24,lo8(-(-1))
225
 228 016c 01F4      		brne .L12
226
 229               	/* #APP */
227
 230               	 ;  438 "spi.c" 1
228
 231 016e 7894      		sei
229
 232               	 ;  0 "" 2
230
 233               	/* #NOAPP */
231
 234 0170 81E0      		ldi r24,lo8(1)
232
 235 0172 8093 0000 		sts SPI_RxDataValid,r24
233
 236 0176 00C0      		rjmp .L13
234
 238               	.global	UpdateSPI_Buffer
235
 240               	UpdateSPI_Buffer:
236
 241 0178 EF92      		push r14
237
 242 017a FF92      		push r15
238
 243 017c 0F93      		push r16
239
 244 017e 1F93      		push r17
240
 245               	/* prologue: function */
241
 246               	/* frame size = 0 */
242
 247 0180 E090 0000 		lds r14,ParamSet+23
243
 248 0184 8AE2      		ldi r24,lo8(42)
244
 249 0186 E89E      		mul r14,r24
245
 250 0188 7001      		movw r14,r0
246
 251 018a 1124      		clr r1
247
 252 018c 0027      		clr r16
248
 253 018e F7FC      		sbrc r15,7
249
 254 0190 0095      		com r16
250
 255 0192 102F      		mov r17,r16
251
 256 0194 6091 0000 		lds r22,IntegralGyroNick
252
 257 0198 7091 0000 		lds r23,(IntegralGyroNick)+1
253
 258 019c 8091 0000 		lds r24,(IntegralGyroNick)+2
254
 259 01a0 9091 0000 		lds r25,(IntegralGyroNick)+3
255
 260 01a4 2AE0      		ldi r18,lo8(10)
256
 261 01a6 30E0      		ldi r19,hi8(10)
257
 262 01a8 40E0      		ldi r20,hlo8(10)
258
 263 01aa 50E0      		ldi r21,hhi8(10)
259
 264 01ac 0E94 0000 		call __mulsi3
260
 265 01b0 A801      		movw r20,r16
261
 266 01b2 9701      		movw r18,r14
262
 267 01b4 0E94 0000 		call __divmodsi4
263
 268 01b8 3093 0000 		sts (ToNaviCtrl+3)+1,r19
264
 269 01bc 2093 0000 		sts ToNaviCtrl+3,r18
265
 270 01c0 6091 0000 		lds r22,IntegralGyroRoll
266
 271 01c4 7091 0000 		lds r23,(IntegralGyroRoll)+1
267
 272 01c8 8091 0000 		lds r24,(IntegralGyroRoll)+2
268
 273 01cc 9091 0000 		lds r25,(IntegralGyroRoll)+3
269
 274 01d0 2AE0      		ldi r18,lo8(10)
270
 275 01d2 30E0      		ldi r19,hi8(10)
271
 276 01d4 40E0      		ldi r20,hlo8(10)
272
 277 01d6 50E0      		ldi r21,hhi8(10)
273
 278 01d8 0E94 0000 		call __mulsi3
274
 279 01dc A801      		movw r20,r16
275
 280 01de 9701      		movw r18,r14
276
 281 01e0 0E94 0000 		call __divmodsi4
277
 282 01e4 3093 0000 		sts (ToNaviCtrl+5)+1,r19
278
 283 01e8 2093 0000 		sts ToNaviCtrl+5,r18
279
 284 01ec 6091 0000 		lds r22,YawGyroHeading
280
 285 01f0 7091 0000 		lds r23,(YawGyroHeading)+1
281
 286 01f4 8091 0000 		lds r24,(YawGyroHeading)+2
282
 287 01f8 9091 0000 		lds r25,(YawGyroHeading)+3
283
 288 01fc 2AE0      		ldi r18,lo8(10)
284
 289 01fe 30E0      		ldi r19,hi8(10)
285
 290 0200 40E0      		ldi r20,hlo8(10)
286
 291 0202 50E0      		ldi r21,hhi8(10)
287
 292 0204 0E94 0000 		call __mulsi3
288
 293 0208 A801      		movw r20,r16
289
 294 020a 9701      		movw r18,r14
290
 295 020c 0E94 0000 		call __divmodsi4
291
 296 0210 3093 0000 		sts (ToNaviCtrl+11)+1,r19
292
 297 0214 2093 0000 		sts ToNaviCtrl+11,r18
293
 298 0218 8091 0000 		lds r24,GyroNick
294
 299 021c 9091 0000 		lds r25,(GyroNick)+1
295
 300 0220 9093 0000 		sts (ToNaviCtrl+13)+1,r25
296
 301 0224 8093 0000 		sts ToNaviCtrl+13,r24
297
 302 0228 8091 0000 		lds r24,GyroRoll
298
 303 022c 9091 0000 		lds r25,(GyroRoll)+1
299
 304 0230 9093 0000 		sts (ToNaviCtrl+15)+1,r25
300
 305 0234 8093 0000 		sts ToNaviCtrl+15,r24
301
 306 0238 8091 0000 		lds r24,GyroYaw
302
 307 023c 9091 0000 		lds r25,(GyroYaw)+1
303
 308 0240 9093 0000 		sts (ToNaviCtrl+17)+1,r25
304
 309 0244 8093 0000 		sts ToNaviCtrl+17,r24
305
 310 0248 E091 0000 		lds r30,NaviCntAcc
306
 311 024c F091 0000 		lds r31,(NaviCntAcc)+1
307
 312 0250 8091 0000 		lds r24,NaviAccNick
308
 313 0254 9091 0000 		lds r25,(NaviAccNick)+1
309
 314 0258 BF01      		movw r22,r30
310
 315 025a 0E94 0000 		call __divmodhi4
311
 316 025e 2CE3      		ldi r18,lo8(60)
312
 317 0260 30E0      		ldi r19,hi8(60)
313
 318 0262 629F      		mul r22,r18
314
 319 0264 C001      		movw r24,r0
315
 320 0266 639F      		mul r22,r19
316
 321 0268 900D      		add r25,r0
317
 322 026a 729F      		mul r23,r18
318
 323 026c 900D      		add r25,r0
319
 324 026e 1124      		clr r1
320
 325 0270 6AE2      		ldi r22,lo8(42)
321
 326 0272 70E0      		ldi r23,hi8(42)
322
 327 0274 0E94 0000 		call __divmodhi4
323
 328 0278 7093 0000 		sts (ToNaviCtrl+7)+1,r23
324
 329 027c 6093 0000 		sts ToNaviCtrl+7,r22
325
 330 0280 8091 0000 		lds r24,NaviAccRoll
326
 331 0284 9091 0000 		lds r25,(NaviAccRoll)+1
327
 332 0288 BF01      		movw r22,r30
328
 333 028a 0E94 0000 		call __divmodhi4
329
 334 028e 629F      		mul r22,r18
330
 335 0290 C001      		movw r24,r0
331
 336 0292 639F      		mul r22,r19
332
 337 0294 900D      		add r25,r0
333
 338 0296 729F      		mul r23,r18
334
 339 0298 900D      		add r25,r0
335
 340 029a 1124      		clr r1
336
 341 029c 6AE2      		ldi r22,lo8(42)
337
 342 029e 70E0      		ldi r23,hi8(42)
338
 343 02a0 0E94 0000 		call __divmodhi4
339
 344 02a4 7093 0000 		sts (ToNaviCtrl+9)+1,r23
340
 345 02a8 6093 0000 		sts ToNaviCtrl+9,r22
341
 346 02ac 1092 0000 		sts (NaviCntAcc)+1,__zero_reg__
342
 347 02b0 1092 0000 		sts NaviCntAcc,__zero_reg__
343
 348 02b4 1092 0000 		sts (NaviAccNick)+1,__zero_reg__
344
 349 02b8 1092 0000 		sts NaviAccNick,__zero_reg__
345
 350 02bc 1092 0000 		sts (NaviAccRoll)+1,__zero_reg__
346
 351 02c0 1092 0000 		sts NaviAccRoll,__zero_reg__
347
 352 02c4 8091 0000 		lds r24,ToNaviCtrl+2
348
 353 02c8 8C30      		cpi r24,lo8(12)
349
 354 02ca 01F4      		brne .+2
350
 355 02cc 00C0      		rjmp .L27
351
 356 02ce 8D30      		cpi r24,lo8(13)
352
 357 02d0 00F4      		brsh .+2
353
 358 02d2 00C0      		rjmp .L50
354
 359 02d4 8E30      		cpi r24,lo8(14)
355
 360 02d6 01F4      		brne .+2
356
 361 02d8 00C0      		rjmp .L29
357
 362 02da 8E30      		cpi r24,lo8(14)
358
 363 02dc 00F0      		brlo .+2
359
 364 02de 00C0      		rjmp .L51
360
 365 02e0 8091 0000 		lds r24,ParamSet+69
361
 366 02e4 8093 0000 		sts ToNaviCtrl+19,r24
362
 367 02e8 8091 0000 		lds r24,ParamSet+70
363
 368 02ec 8093 0000 		sts ToNaviCtrl+20,r24
364
 369 02f0 8091 0000 		lds r24,ParamSet+71
365
 370 02f4 8093 0000 		sts ToNaviCtrl+21,r24
366
 371 02f8 8091 0000 		lds r24,ParamSet+72
367
 372 02fc 8093 0000 		sts ToNaviCtrl+22,r24
368
 373 0300 8091 0000 		lds r24,ParamSet+73
369
 374 0304 8093 0000 		sts ToNaviCtrl+23,r24
370
 375 0308 8091 0000 		lds r24,ParamSet+77
371
 376 030c 8093 0000 		sts ToNaviCtrl+24,r24
372
 377 0310 8091 0000 		lds r24,ParamSet+78
373
 378 0314 8093 0000 		sts ToNaviCtrl+25,r24
374
 379 0318 8091 0000 		lds r24,ParamSet+79
375
 380 031c 8093 0000 		sts ToNaviCtrl+26,r24
376
 381 0320 8091 0000 		lds r24,ParamSet+82
377
 382 0324 8093 0000 		sts ToNaviCtrl+27,r24
378
 383 0328 8091 0000 		lds r24,ParamSet+80
379
 384 032c 8093 0000 		sts ToNaviCtrl+28,r24
380
 385 0330 8091 0000 		lds r24,ParamSet+81
381
 386 0334 8093 0000 		sts ToNaviCtrl+29,r24
382
 387 0338 8091 0000 		lds r24,ParamSet+83
383
 388 033c 8093 0000 		sts ToNaviCtrl+30,r24
384
 389               	.L24:
385
 390 0340 8091 0000 		lds r24,SPI_RxDataValid
386
 391 0344 8823      		tst r24
387
 392 0346 01F4      		brne .+2
388
 393 0348 00C0      		rjmp .L41
389
 394               	.L55:
390
 395 034a 2091 0000 		lds r18,FromNaviCtrl+1
391
 396 034e 3091 0000 		lds r19,(FromNaviCtrl+1)+1
392
 397 0352 C901      		movw r24,r18
393
 398 0354 8150      		subi r24,lo8(-(511))
394
 399 0356 9E4F      		sbci r25,hi8(-(511))
395
 400 0358 8F5F      		subi r24,lo8(1023)
396
 401 035a 9340      		sbci r25,hi8(1023)
397
 402 035c 00F4      		brsh .L42
398
 403 035e 4091 0000 		lds r20,FromNaviCtrl+3
399
 404 0362 5091 0000 		lds r21,(FromNaviCtrl+3)+1
400
 405 0366 CA01      		movw r24,r20
401
 406 0368 8150      		subi r24,lo8(-(511))
402
 407 036a 9E4F      		sbci r25,hi8(-(511))
403
 408 036c 8F5F      		subi r24,lo8(1023)
404
 409 036e 9340      		sbci r25,hi8(1023)
405
 410 0370 00F4      		brsh .+2
406
 411 0372 00C0      		rjmp .L52
407
 412               	.L42:
408
 413 0374 8091 0000 		lds r24,FromNaviCtrl+7
409
 414 0378 9091 0000 		lds r25,(FromNaviCtrl+7)+1
410
 415 037c 21E0      		ldi r18,hi8(361)
411
 416 037e 8936      		cpi r24,lo8(361)
412
 417 0380 9207      		cpc r25,r18
413
 418 0382 04F4      		brge .L43
414
 419 0384 9093 0000 		sts (CompassHeading)+1,r25
415
 420 0388 8093 0000 		sts CompassHeading,r24
416
 421               	.L43:
417
 422 038c 2091 0000 		lds r18,CompassHeading
418
 423 0390 3091 0000 		lds r19,(CompassHeading)+1
419
 424 0394 37FD      		sbrc r19,7
420
 425 0396 00C0      		rjmp .L53
421
 426 0398 245E      		subi r18,lo8(-(540))
422
 427 039a 3D4F      		sbci r19,hi8(-(540))
423
 428 039c 8091 0000 		lds r24,CompassCourse
424
 429 03a0 9091 0000 		lds r25,(CompassCourse)+1
425
 430 03a4 A901      		movw r20,r18
426
 431 03a6 481B      		sub r20,r24
427
 432 03a8 590B      		sbc r21,r25
428
 433 03aa CA01      		movw r24,r20
429
 434 03ac 68E6      		ldi r22,lo8(360)
430
 435 03ae 71E0      		ldi r23,hi8(360)
431
 436 03b0 0E94 0000 		call __divmodhi4
432
 437 03b4 845B      		subi r24,lo8(-(-180))
433
 438 03b6 9040      		sbci r25,hi8(-(-180))
434
 439 03b8 9093 0000 		sts (CompassOffCourse)+1,r25
435
 440 03bc 8093 0000 		sts CompassOffCourse,r24
436
 441               	.L45:
437
 442 03c0 2091 0000 		lds r18,FromNaviCtrl+11
438
 443 03c4 3091 0000 		lds r19,(FromNaviCtrl+11)+1
439
 444 03c8 8091 0000 		lds r24,BeepTime
440
 445 03cc 9091 0000 		lds r25,(BeepTime)+1
441
 446 03d0 8217      		cp r24,r18
442
 447 03d2 9307      		cpc r25,r19
443
 448 03d4 00F4      		brsh .L46
444
 449 03d6 8091 0000 		lds r24,CompassCalState
445
 450 03da 8823      		tst r24
446
 451 03dc 01F4      		brne .+2
447
 452 03de 00C0      		rjmp .L54
448
 453               	.L46:
449
 454 03e0 8091 0000 		lds r24,FromNaviCtrl
450
 455 03e4 8736      		cpi r24,lo8(103)
451
 456 03e6 01F4      		brne .L49
452
 457 03e8 8091 0000 		lds r24,FromNaviCtrl+13
453
 458 03ec 8093 0000 		sts FCParam+31,r24
454
 459 03f0 8091 0000 		lds r24,FromNaviCtrl+14
455
 460 03f4 8093 0000 		sts FCParam+33,r24
456
 461 03f8 8091 0000 		lds r24,FromNaviCtrl+15
457
 462 03fc 8093 0000 		sts FCParam+32,r24
458
 463 0400 8091 0000 		lds r24,FromNaviCtrl+16
459
 464 0404 8093 0000 		sts NCSerialDataOkay,r24
460
 465 0408 8091 0000 		lds r24,FromNaviCtrl+17
461
 466 040c 8093 0000 		sts NCGpsZ,r24
462
 467               	.L49:
463
 468               	/* epilogue start */
464
 469 0410 1F91      		pop r17
465
 470 0412 0F91      		pop r16
466
 471 0414 FF90      		pop r15
467
 472 0416 EF90      		pop r14
468
 473 0418 0895      		ret
469
 474               	.L50:
470
 475 041a 8A30      		cpi r24,lo8(10)
471
 476 041c 01F4      		brne .+2
472
 477 041e 00C0      		rjmp .L25
473
 478 0420 8B30      		cpi r24,lo8(11)
474
 479 0422 01F0      		breq .+2
475
 480 0424 00C0      		rjmp .L24
476
 481               	/* #APP */
477
 482               	 ;  251 "spi.c" 1
478
 483 0426 F894      		cli
479
 484               	 ;  0 "" 2
480
 485               	/* #NOAPP */
481
 486 0428 E091 0000 		lds r30,ParamSet+2
482
 487 042c F0E0      		ldi r31,lo8(0)
483
 488 042e EE0F      		lsl r30
484
 489 0430 FF1F      		rol r31
485
 490 0432 E050      		subi r30,lo8(-(PPM_in))
486
 491 0434 F040      		sbci r31,hi8(-(PPM_in))
487
 492 0436 0190      		ld __tmp_reg__,Z+
488
 493 0438 F081      		ld r31,Z
489
 494 043a E02D      		mov r30,__tmp_reg__
490
 495 043c 2FEF      		ldi r18,hi8(-128)
491
 496 043e E038      		cpi r30,lo8(-128)
492
 497 0440 F207      		cpc r31,r18
493
 498 0442 04F4      		brge .L32
494
 499 0444 E0E8      		ldi r30,lo8(-128)
495
 500 0446 FFEF      		ldi r31,hi8(-128)
496
 501               	.L32:
497
 502 0448 E038      		cpi r30,128
498
 503 044a F105      		cpc r31,__zero_reg__
499
 504 044c 04F0      		brlt .L33
500
 505 044e EFE7      		ldi r30,lo8(127)
501
 506 0450 F0E0      		ldi r31,hi8(127)
502
 507               	.L33:
503
 508 0452 E093 0000 		sts ToNaviCtrl+19,r30
504
 509 0456 E091 0000 		lds r30,ParamSet+3
505
 510 045a F0E0      		ldi r31,lo8(0)
506
 511 045c EE0F      		lsl r30
507
 512 045e FF1F      		rol r31
508
 513 0460 E050      		subi r30,lo8(-(PPM_in))
509
 514 0462 F040      		sbci r31,hi8(-(PPM_in))
510
 515 0464 0190      		ld __tmp_reg__,Z+
511
 516 0466 F081      		ld r31,Z
512
 517 0468 E02D      		mov r30,__tmp_reg__
513
 518 046a 4FEF      		ldi r20,hi8(-128)
514
 519 046c E038      		cpi r30,lo8(-128)
515
 520 046e F407      		cpc r31,r20
516
 521 0470 04F4      		brge .L34
517
 522 0472 E0E8      		ldi r30,lo8(-128)
518
 523 0474 FFEF      		ldi r31,hi8(-128)
519
 524               	.L34:
520
 525 0476 E038      		cpi r30,128
521
 526 0478 F105      		cpc r31,__zero_reg__
522
 527 047a 04F0      		brlt .L35
523
 528 047c EFE7      		ldi r30,lo8(127)
524
 529 047e F0E0      		ldi r31,hi8(127)
525
 530               	.L35:
526
 531 0480 E093 0000 		sts ToNaviCtrl+20,r30
527
 532 0484 E091 0000 		lds r30,ParamSet+1
528
 533 0488 F0E0      		ldi r31,lo8(0)
529
 534 048a EE0F      		lsl r30
530
 535 048c FF1F      		rol r31
531
 536 048e E050      		subi r30,lo8(-(PPM_in))
532
 537 0490 F040      		sbci r31,hi8(-(PPM_in))
533
 538 0492 0190      		ld __tmp_reg__,Z+
534
 539 0494 F081      		ld r31,Z
535
 540 0496 E02D      		mov r30,__tmp_reg__
536
 541 0498 5FEF      		ldi r21,hi8(-128)
537
 542 049a E038      		cpi r30,lo8(-128)
538
 543 049c F507      		cpc r31,r21
539
 544 049e 04F4      		brge .L36
540
 545 04a0 E0E8      		ldi r30,lo8(-128)
541
 546 04a2 FFEF      		ldi r31,hi8(-128)
542
 547               	.L36:
543
 548 04a4 E038      		cpi r30,128
544
 549 04a6 F105      		cpc r31,__zero_reg__
545
 550 04a8 04F0      		brlt .L37
546
 551 04aa EFE7      		ldi r30,lo8(127)
547
 552 04ac F0E0      		ldi r31,hi8(127)
548
 553               	.L37:
549
 554 04ae E093 0000 		sts ToNaviCtrl+21,r30
550
 555 04b2 E091 0000 		lds r30,ParamSet
551
 556 04b6 F0E0      		ldi r31,lo8(0)
552
 557 04b8 EE0F      		lsl r30
553
 558 04ba FF1F      		rol r31
554
 559 04bc E050      		subi r30,lo8(-(PPM_in))
555
 560 04be F040      		sbci r31,hi8(-(PPM_in))
556
 561 04c0 0190      		ld __tmp_reg__,Z+
557
 562 04c2 F081      		ld r31,Z
558
 563 04c4 E02D      		mov r30,__tmp_reg__
559
 564 04c6 6FEF      		ldi r22,hi8(-128)
560
 565 04c8 E038      		cpi r30,lo8(-128)
561
 566 04ca F607      		cpc r31,r22
562
 567 04cc 04F4      		brge .L38
563
 568 04ce E0E8      		ldi r30,lo8(-128)
564
 569 04d0 FFEF      		ldi r31,hi8(-128)
565
 570               	.L38:
566
 571 04d2 E038      		cpi r30,128
567
 572 04d4 F105      		cpc r31,__zero_reg__
568
 573 04d6 04F0      		brlt .L39
569
 574 04d8 EFE7      		ldi r30,lo8(127)
570
 575 04da F0E0      		ldi r31,hi8(127)
571
 576               	.L39:
572
 577 04dc E093 0000 		sts ToNaviCtrl+22,r30
573
 578               	/* #APP */
574
 579               	 ;  260 "spi.c" 1
575
 580 04e0 7894      		sei
576
 581               	 ;  0 "" 2
577
 582               	/* #NOAPP */
578
 583 04e2 8091 0000 		lds r24,Poti1
579
 584 04e6 8093 0000 		sts ToNaviCtrl+23,r24
580
 585 04ea 8091 0000 		lds r24,Poti2
581
 586 04ee 8093 0000 		sts ToNaviCtrl+24,r24
582
 587 04f2 8091 0000 		lds r24,Poti3
583
 588 04f6 8093 0000 		sts ToNaviCtrl+25,r24
584
 589 04fa 8091 0000 		lds r24,Poti4
585
 590 04fe 8093 0000 		sts ToNaviCtrl+26,r24
586
 591 0502 8091 0000 		lds r24,RC_Quality
587
 592 0506 8093 0000 		sts ToNaviCtrl+27,r24
588
 593 050a 8091 0000 		lds r24,RC_RSSI
589
 594 050e 8093 0000 		sts ToNaviCtrl+28,r24
590
 595 0512 8091 0000 		lds r24,DebugOut+16
591
 596 0516 9091 0000 		lds r25,(DebugOut+16)+1
592
 597 051a 9695      		lsr r25
593
 598 051c 8795      		ror r24
594
 599 051e 9695      		lsr r25
595
 600 0520 8795      		ror r24
596
 601 0522 8093 0000 		sts ToNaviCtrl+29,r24
597
 602 0526 8091 0000 		lds r24,SPI_RxDataValid
598
 603 052a 8823      		tst r24
599
 604 052c 01F0      		breq .+2
600
 605 052e 00C0      		rjmp .L55
601
 606               	.L41:
602
 607 0530 1092 0000 		sts (GPSStickNick)+1,__zero_reg__
603
 608 0534 1092 0000 		sts GPSStickNick,__zero_reg__
604
 609 0538 1092 0000 		sts (GPSStickRoll)+1,__zero_reg__
605
 610 053c 1092 0000 		sts GPSStickRoll,__zero_reg__
606
 611 0540 1092 0000 		sts NCGpsZ,__zero_reg__
607
 612 0544 1F91      		pop r17
608
 613 0546 0F91      		pop r16
609
 614 0548 FF90      		pop r15
610
 615 054a EF90      		pop r14
611
 616 054c 0895      		ret
612
 617               	.L51:
613
 618 054e 8F30      		cpi r24,lo8(15)
614
 619 0550 01F0      		breq .+2
615
 620 0552 00C0      		rjmp .L24
616
 621 0554 8091 0000 		lds r24,ParamSet+47
617
 622 0558 8093 0000 		sts ToNaviCtrl+19,r24
618
 623 055c 8091 0000 		lds r24,ParamSet+87
619
 624 0560 8093 0000 		sts ToNaviCtrl+20,r24
620
 625 0564 8091 0000 		lds r24,FCParam+21
621
 626 0568 8093 0000 		sts ToNaviCtrl+21,r24
622
 627 056c 8091 0000 		lds r24,ParamSet+40
623
 628 0570 8093 0000 		sts ToNaviCtrl+22,r24
624
 629 0574 8091 0000 		lds r24,ParamSet+41
625
 630 0578 8093 0000 		sts ToNaviCtrl+23,r24
626
 631 057c 8091 0000 		lds r24,ParamSet+42
627
 632 0580 8093 0000 		sts ToNaviCtrl+24,r24
628
 633 0584 8091 0000 		lds r24,FCParam+22
629
 634 0588 8093 0000 		sts ToNaviCtrl+25,r24
630
 635 058c 8091 0000 		lds r24,ParamSet+44
631
 636 0590 8093 0000 		sts ToNaviCtrl+26,r24
632
 637 0594 8091 0000 		lds r24,ParamSet+45
633
 638 0598 8093 0000 		sts ToNaviCtrl+27,r24
634
 639 059c 8091 0000 		lds r24,ParamSet+46
635
 640 05a0 8093 0000 		sts ToNaviCtrl+28,r24
636
 641 05a4 00C0      		rjmp .L24
637
 642               	.L52:
638
 643 05a6 8091 0000 		lds r24,ParamSet+8
639
 644 05aa 85FF      		sbrs r24,5
640
 645 05ac 00C0      		rjmp .L42
641
 646 05ae 3093 0000 		sts (GPSStickNick)+1,r19
642
 647 05b2 2093 0000 		sts GPSStickNick,r18
643
 648 05b6 5093 0000 		sts (GPSStickRoll)+1,r21
644
 649 05ba 4093 0000 		sts GPSStickRoll,r20
645
 650 05be 8AEF      		ldi r24,lo8(-6)
646
 651 05c0 8093 0000 		sts NCDataOkay,r24
647
 652 05c4 00C0      		rjmp .L42
648
 653               	.L54:
649
 654 05c6 3093 0000 		sts (BeepTime)+1,r19
650
 655 05ca 2093 0000 		sts BeepTime,r18
651
 656 05ce 00C0      		rjmp .L46
652
 657               	.L53:
653
 658 05d0 1092 0000 		sts (CompassOffCourse)+1,__zero_reg__
654
 659 05d4 1092 0000 		sts CompassOffCourse,__zero_reg__
655
 660 05d8 00C0      		rjmp .L45
656
 661               	.L29:
657
 662 05da 8091 0000 		lds r24,SPI_VersionInfo
658
 663 05de 8093 0000 		sts ToNaviCtrl+19,r24
659
 664 05e2 8091 0000 		lds r24,SPI_VersionInfo+1
660
 665 05e6 8093 0000 		sts ToNaviCtrl+20,r24
661
 666 05ea 8091 0000 		lds r24,SPI_VersionInfo+2
662
 667 05ee 8093 0000 		sts ToNaviCtrl+21,r24
663
 668 05f2 8091 0000 		lds r24,SPI_VersionInfo+3
664
 669 05f6 8093 0000 		sts ToNaviCtrl+22,r24
665
 670 05fa 8091 0000 		lds r24,BoardRelease
666
 671 05fe 8093 0000 		sts ToNaviCtrl+23,r24
667
 672 0602 00C0      		rjmp .L24
668
 673               	.L25:
669
 674 0604 8091 0000 		lds r24,FCParam+13
670
 675 0608 8093 0000 		sts ToNaviCtrl+19,r24
671
 676 060c 8091 0000 		lds r24,FCParam+14
672
 677 0610 8093 0000 		sts ToNaviCtrl+20,r24
673
 678 0614 8091 0000 		lds r24,FCParam+15
674
 679 0618 8093 0000 		sts ToNaviCtrl+21,r24
675
 680 061c 8091 0000 		lds r24,FCParam+16
676
 681 0620 8093 0000 		sts ToNaviCtrl+22,r24
677
 682 0624 8091 0000 		lds r24,FCParam+17
678
 683 0628 8093 0000 		sts ToNaviCtrl+23,r24
679
 684 062c 8091 0000 		lds r24,FCParam+18
680
 685 0630 8093 0000 		sts ToNaviCtrl+24,r24
681
 686 0634 8091 0000 		lds r24,FCParam+19
682
 687 0638 8093 0000 		sts ToNaviCtrl+25,r24
683
 688 063c 8091 0000 		lds r24,FCParam+20
684
 689 0640 8093 0000 		sts ToNaviCtrl+26,r24
685
 690 0644 8091 0000 		lds r24,MKFlags
686
 691 0648 8093 0000 		sts ToNaviCtrl+27,r24
687
 692 064c 8091 0000 		lds r24,MKFlags
688
 693 0650 837F      		andi r24,lo8(-13)
689
 694 0652 8093 0000 		sts MKFlags,r24
690
 695 0656 8091 0000 		lds r24,UBat
691
 696 065a 9091 0000 		lds r25,(UBat)+1
692
 697 065e 8093 0000 		sts ToNaviCtrl+28,r24
693
 698 0662 8091 0000 		lds r24,LowVoltageWarning
694
 699 0666 8093 0000 		sts ToNaviCtrl+29,r24
695
 700 066a 0E94 0000 		call GetActiveParamSet
696
 701 066e 8093 0000 		sts ToNaviCtrl+30,r24
697
 702 0672 00C0      		rjmp .L24
698
 703               	.L27:
699
 704 0674 8091 0000 		lds r24,CompassCalState
700
 705 0678 8093 0000 		sts ToNaviCtrl+19,r24
701
 706 067c 8530      		cpi r24,lo8(5)
702
 707 067e 00F0      		brlo .L40
703
 708 0680 1092 0000 		sts CompassCalState,__zero_reg__
704
 709               	.L40:
705
 710 0684 8091 0000 		lds r24,ParamSet+84
706
 711 0688 8093 0000 		sts ToNaviCtrl+20,r24
707
 712 068c 6091 0000 		lds r22,ReadingHeight
708
 713 0690 7091 0000 		lds r23,(ReadingHeight)+1
709
 714 0694 8091 0000 		lds r24,(ReadingHeight)+2
710
 715 0698 9091 0000 		lds r25,(ReadingHeight)+3
711
 716 069c 25E0      		ldi r18,lo8(5)
712
 717 069e 30E0      		ldi r19,hi8(5)
713
 718 06a0 40E0      		ldi r20,hlo8(5)
714
 719 06a2 50E0      		ldi r21,hhi8(5)
715
 720 06a4 0E94 0000 		call __divmodsi4
716
 721 06a8 3093 0000 		sts (ToNaviCtrl+21)+1,r19
717
 722 06ac 2093 0000 		sts ToNaviCtrl+21,r18
718
 723 06b0 6091 0000 		lds r22,SetPointHeight
719
 724 06b4 7091 0000 		lds r23,(SetPointHeight)+1
720
 725 06b8 8091 0000 		lds r24,(SetPointHeight)+2
721
 726 06bc 9091 0000 		lds r25,(SetPointHeight)+3
722
 727 06c0 25E0      		ldi r18,lo8(5)
723
 728 06c2 30E0      		ldi r19,hi8(5)
724
 729 06c4 40E0      		ldi r20,hlo8(5)
725
 730 06c6 50E0      		ldi r21,hhi8(5)
726
 731 06c8 0E94 0000 		call __divmodsi4
727
 732 06cc 3093 0000 		sts (ToNaviCtrl+23)+1,r19
728
 733 06d0 2093 0000 		sts ToNaviCtrl+23,r18
729
 734 06d4 8091 0000 		lds r24,ParamSet+74
730
 735 06d8 8093 0000 		sts ToNaviCtrl+25,r24
731
 736 06dc 8091 0000 		lds r24,ParamSet+75
732
 737 06e0 8093 0000 		sts ToNaviCtrl+26,r24
733
 738 06e4 8091 0000 		lds r24,ParamSet+76
734
 739 06e8 8093 0000 		sts ToNaviCtrl+27,r24
735
 740 06ec 00C0      		rjmp .L24
736
 742               	.global	SPI_StartTransmitPacket
737
 744               	SPI_StartTransmitPacket:
738
 745               	/* prologue: function */
739
 746               	/* frame size = 0 */
740
 747 06ee 8091 0000 		lds r24,SPITransferCompleted
741
 748 06f2 8823      		tst r24
742
 749 06f4 01F4      		brne .+2
743
 750 06f6 00C0      		rjmp .L59
744
 751 06f8 4598      		cbi 40-32,5
745
 752 06fa 8091 0000 		lds r24,SPI_CommandCounter
746
 753 06fe E82F      		mov r30,r24
747
 754 0700 F0E0      		ldi r31,lo8(0)
748
 755 0702 E050      		subi r30,lo8(-(SPI_CommandSequence))
749
 756 0704 F040      		sbci r31,hi8(-(SPI_CommandSequence))
750
 757 0706 9081      		ld r25,Z
751
 758 0708 9093 0000 		sts ToNaviCtrl+2,r25
752
 759 070c 8F5F      		subi r24,lo8(-(1))
753
 760 070e 8093 0000 		sts SPI_CommandCounter,r24
754
 761 0712 8730      		cpi r24,lo8(7)
755
 762 0714 00F0      		brlo .L58
756
 763 0716 1092 0000 		sts SPI_CommandCounter,__zero_reg__
757
 764               	.L58:
758
 765 071a 1092 0000 		sts SPITransferCompleted,__zero_reg__
759
 766 071e 0E94 0000 		call UpdateSPI_Buffer
760
 767 0722 81E0      		ldi r24,lo8(1)
761
 768 0724 8093 0000 		sts SPI_TxBufferIndex,r24
762
 769               	/* #APP */
763
 770               	 ;  377 "spi.c" 1
764
 771 0728 0000      		nop
765
 772               	 ;  0 "" 2
766
 773               	 ;  377 "spi.c" 1
767
 774 072a 0000      		nop
768
 775               	 ;  0 "" 2
769
 776               	 ;  377 "spi.c" 1
770
 777 072c 0000      		nop
771
 778               	 ;  0 "" 2
772
 779               	 ;  377 "spi.c" 1
773
 780 072e 0000      		nop
774
 781               	 ;  0 "" 2
775
 782               	 ;  377 "spi.c" 1
776
 783 0730 0000      		nop
777
 784               	 ;  0 "" 2
778
 785               	 ;  377 "spi.c" 1
779
 786 0732 0000      		nop
780
 787               	 ;  0 "" 2
781
 788               	 ;  377 "spi.c" 1
782
 789 0734 0000      		nop
783
 790               	 ;  0 "" 2
784
 791               	 ;  377 "spi.c" 1
785
 792 0736 0000      		nop
786
 793               	 ;  0 "" 2
787
 794               	 ;  378 "spi.c" 1
788
 795 0738 0000      		nop
789
 796               	 ;  0 "" 2
790
 797               	 ;  378 "spi.c" 1
791
 798 073a 0000      		nop
792
 799               	 ;  0 "" 2
793
 800               	 ;  378 "spi.c" 1
794
 801 073c 0000      		nop
795
 802               	 ;  0 "" 2
796
 803               	 ;  378 "spi.c" 1
797
 804 073e 0000      		nop
798
 805               	 ;  0 "" 2
799
 806               	 ;  378 "spi.c" 1
800
 807 0740 0000      		nop
801
 808               	 ;  0 "" 2
802
 809               	 ;  378 "spi.c" 1
803
 810 0742 0000      		nop
804
 811               	 ;  0 "" 2
805
 812               	 ;  378 "spi.c" 1
806
 813 0744 0000      		nop
807
 814               	 ;  0 "" 2
808
 815               	 ;  378 "spi.c" 1
809
 816 0746 0000      		nop
810
 817               	 ;  0 "" 2
811
 818               	 ;  379 "spi.c" 1
812
 819 0748 0000      		nop
813
 820               	 ;  0 "" 2
814
 821               	 ;  379 "spi.c" 1
815
 822 074a 0000      		nop
816
 823               	 ;  0 "" 2
817
 824               	 ;  379 "spi.c" 1
818
 825 074c 0000      		nop
819
 826               	 ;  0 "" 2
820
 827               	 ;  379 "spi.c" 1
821
 828 074e 0000      		nop
822
 829               	 ;  0 "" 2
823
 830               	 ;  379 "spi.c" 1
824
 831 0750 0000      		nop
825
 832               	 ;  0 "" 2
826
 833               	 ;  379 "spi.c" 1
827
 834 0752 0000      		nop
828
 835               	 ;  0 "" 2
829
 836               	 ;  379 "spi.c" 1
830
 837 0754 0000      		nop
831
 838               	 ;  0 "" 2
832
 839               	 ;  379 "spi.c" 1
833
 840 0756 0000      		nop
834
 841               	 ;  0 "" 2
835
 842               	/* #NOAPP */
836
 843 0758 8091 0000 		lds r24,ToNaviCtrl
837
 844 075c 8093 0000 		sts ToNaviCtrl+31,r24
838
 845 0760 8EBD      		out 78-32,r24
839
 846               	.L59:
840
 847 0762 0895      		ret
841
 849               	.global	SPI_RxBufferIndex
842
 850               	.global	SPI_RxBufferIndex
843
 851               		.section .bss
844
 854               	SPI_RxBufferIndex:
845
 855 0000 00        		.skip 1,0
846
 856               	.global	SPI_RxBuffer_Request
847
 857               	.global	SPI_RxBuffer_Request
848
 860               	SPI_RxBuffer_Request:
849
 861 0001 00        		.skip 1,0
850
 862               	.global	SPI_TxBufferIndex
851
 863               	.global	SPI_TxBufferIndex
852
 866               	SPI_TxBufferIndex:
853
 867 0002 00        		.skip 1,0
854
 868               	.global	SPI_RxDataValid
855
 869               	.global	SPI_RxDataValid
856
 872               	SPI_RxDataValid:
857
 873 0003 00        		.skip 1,0
858
 874               	.global	NCDataOkay
859
 875               	.global	NCDataOkay
860
 878               	NCDataOkay:
861
 879 0004 00        		.skip 1,0
862
 880               	.global	NCSerialDataOkay
863
 881               	.global	NCSerialDataOkay
864
 884               	NCSerialDataOkay:
865
 885 0005 00        		.skip 1,0
866
 886               	.global	NCGpsZ
867
 887               	.global	NCGpsZ
868
 890               	NCGpsZ:
869
 891 0006 00        		.skip 1,0
870
 892               	.global	SPI_CommandSequence
871
 893               		.data
872
 896               	SPI_CommandSequence:
873
 897 0000 0A        		.byte	10
874
 898 0001 0B        		.byte	11
875
 899 0002 0D        		.byte	13
876
 900 0003 0B        		.byte	11
877
 901 0004 0C        		.byte	12
878
 902 0005 0E        		.byte	14
879
 903 0006 0F        		.byte	15
880
 904               	.global	SPI_CommandCounter
881
 905               	.global	SPI_CommandCounter
882
 906               		.section .bss
883
 909               	SPI_CommandCounter:
884
 910 0007 00        		.skip 1,0
885
 911               		.lcomm rxchksum.2022,1
886
 912               		.lcomm SPI_RXState.2020,1
887
 913               		.comm ToNaviCtrl,32,1
888
 914               		.comm FromNaviCtrl,26,1
889
 915               		.comm SPI_VersionInfo,4,1
890
 916               		.comm SPI_RxBuffer,26,1
891
 917               		.comm SPI_TxBuffer,2,1
892
 918               		.comm SPITransferCompleted,1,1
893
 919               		.comm SPI_ChkSum,1,1
894
 920               	.global __do_copy_data
895
 921               	.global __do_clear_bss
896
DEFINED SYMBOLS
897
                            *ABS*:00000000 spi.c
898
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:2      *ABS*:0000003f __SREG__
899
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:3      *ABS*:0000003e __SP_H__
900
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:4      *ABS*:0000003d __SP_L__
901
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:5      *ABS*:00000034 __CCP__
902
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:6      *ABS*:00000000 __tmp_reg__
903
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:7      *ABS*:00000001 __zero_reg__
904
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:11     .text:00000000 SPI_MasterInit
905
                            *COM*:00000020 ToNaviCtrl
906
                            *COM*:00000002 SPI_TxBuffer
907
                            *COM*:00000001 SPITransferCompleted
908
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:884    .bss:00000005 NCSerialDataOkay
909
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:878    .bss:00000004 NCDataOkay
910
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:872    .bss:00000003 SPI_RxDataValid
911
                            *COM*:00000004 SPI_VersionInfo
912
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:52     .text:00000066 SPI_TransmitByte
913
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:911    .bss:00000009 SPI_RXState.2020
914
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:854    .bss:00000000 SPI_RxBufferIndex
915
                             .bss:00000008 rxchksum.2022
916
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:866    .bss:00000002 SPI_TxBufferIndex
917
                            *COM*:0000001a SPI_RxBuffer
918
                            *COM*:0000001a FromNaviCtrl
919
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:240    .text:00000178 UpdateSPI_Buffer
920
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:890    .bss:00000006 NCGpsZ
921
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:744    .text:000006ee SPI_StartTransmitPacket
922
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:909    .bss:00000007 SPI_CommandCounter
923
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:896    .data:00000000 SPI_CommandSequence
924
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccXYPMr9.s:860    .bss:00000001 SPI_RxBuffer_Request
925
                            *COM*:00000001 SPI_ChkSum
926
 
927
UNDEFINED SYMBOLS
928
SendSPI
929
ParamSet
930
IntegralGyroNick
931
__mulsi3
932
__divmodsi4
933
IntegralGyroRoll
934
YawGyroHeading
935
GyroNick
936
GyroRoll
937
GyroYaw
938
NaviCntAcc
939
NaviAccNick
940
__divmodhi4
941
NaviAccRoll
942
CompassHeading
943
CompassCourse
944
CompassOffCourse
945
BeepTime
946
CompassCalState
947
FCParam
948
PPM_in
949
Poti1
950
Poti2
951
Poti3
952
Poti4
953
RC_Quality
954
RC_RSSI
955
DebugOut
956
GPSStickNick
957
GPSStickRoll
958
BoardRelease
959
MKFlags
960
UBat
961
LowVoltageWarning
962
GetActiveParamSet
963
ReadingHeight
964
SetPointHeight
965
__do_copy_data
966
__do_clear_bss