Blame | Last modification | View Log | RSS feed
1 .file "analog.c"
2 __SREG__ = 0x3f
3 __SP_H__ = 0x3e
4 __SP_L__ = 0x3d
5 __CCP__ = 0x34
6 __tmp_reg__ = 0
7 __zero_reg__ = 1
8 .text
9 .global ADC_Init
11 ADC_Init:
12 /* prologue: function */
13 /* frame size = 0 */
14 0000 9FB7 in r25,__SREG__
15 /* #APP */
16 ; 93 "analog.c" 1
17 0002 F894 cli
18 ; 0 "" 2
19 /* #NOAPP */
20 0004 11B8 out 33-32,__zero_reg__
21 0006 12B8 out 34-32,__zero_reg__
22 0008 8FEF ldi r24,lo8(-1)
23 000a 8093 7E00 sts 126,r24
24 000e ECE7 ldi r30,lo8(124)
25 0010 F0E0 ldi r31,hi8(124)
26 0012 8081 ld r24,Z
27 0014 8F71 andi r24,lo8(31)
28 0016 8083 st Z,r24
29 0018 8081 ld r24,Z
30 001a 807E andi r24,lo8(-32)
31 001c 8083 st Z,r24
32 001e AAE7 ldi r26,lo8(122)
33 0020 B0E0 ldi r27,hi8(122)
34 0022 87E0 ldi r24,lo8(7)
35 0024 8C93 st X,r24
36 0026 EBE7 ldi r30,lo8(123)
37 0028 F0E0 ldi r31,hi8(123)
38 002a 8081 ld r24,Z
39 002c 887F andi r24,lo8(-8)
40 002e 8083 st Z,r24
41 0030 8C91 ld r24,X
42 0032 886C ori r24,lo8(-56)
43 0034 8C93 st X,r24
44 0036 9FBF out __SREG__,r25
45 /* epilogue start */
46 0038 0895 ret
48 .global __vector_24
50 __vector_24:
51 003a 1F92 push __zero_reg__
52 003c 0F92 push r0
53 003e 0FB6 in r0,__SREG__
54 0040 0F92 push r0
55 0042 1124 clr __zero_reg__
56 0044 7F92 push r7
57 0046 8F92 push r8
58 0048 9F92 push r9
59 004a AF92 push r10
60 004c BF92 push r11
61 004e CF92 push r12
62 0050 DF92 push r13
63 0052 EF92 push r14
64 0054 FF92 push r15
65 0056 0F93 push r16
66 0058 1F93 push r17
67 005a 2F93 push r18
68 005c 3F93 push r19
69 005e 4F93 push r20
70 0060 5F93 push r21
71 0062 6F93 push r22
72 0064 7F93 push r23
73 0066 8F93 push r24
74 0068 9F93 push r25
75 006a AF93 push r26
76 006c BF93 push r27
77 006e EF93 push r30
78 0070 FF93 push r31
79 /* prologue: Signal */
80 /* frame size = 0 */
81 0072 7090 0000 lds r7,state.1866
82 0076 872D mov r24,r7
83 0078 7394 inc r7
84 007a 7092 0000 sts state.1866,r7
85 007e E82F mov r30,r24
86 0080 F0E0 ldi r31,lo8(0)
87 0082 E231 cpi r30,18
88 0084 F105 cpc r31,__zero_reg__
89 0086 00F0 brlo .L45
90 0088 82E0 ldi r24,lo8(2)
91 008a 8093 0000 sts ad_channel.1865,r24
92 008e 1092 0000 sts state.1866,__zero_reg__
93 0092 8091 7C00 lds r24,124
94 0096 807E andi r24,lo8(-32)
95 0098 8260 ori r24,lo8(2)
96 009a 8093 7C00 sts 124,r24
97 .L41:
98 /* epilogue start */
99 009e FF91 pop r31
100 00a0 EF91 pop r30
101 00a2 BF91 pop r27
102 00a4 AF91 pop r26
103 00a6 9F91 pop r25
104 00a8 8F91 pop r24
105 00aa 7F91 pop r23
106 00ac 6F91 pop r22
107 00ae 5F91 pop r21
108 00b0 4F91 pop r20
109 00b2 3F91 pop r19
110 00b4 2F91 pop r18
111 00b6 1F91 pop r17
112 00b8 0F91 pop r16
113 00ba FF90 pop r15
114 00bc EF90 pop r14
115 00be DF90 pop r13
116 00c0 CF90 pop r12
117 00c2 BF90 pop r11
118 00c4 AF90 pop r10
119 00c6 9F90 pop r9
120 00c8 8F90 pop r8
121 00ca 7F90 pop r7
122 00cc 0F90 pop r0
123 00ce 0FBE out __SREG__,r0
124 00d0 0F90 pop r0
125 00d2 1F90 pop __zero_reg__
126 00d4 1895 reti
127 .L45:
128 00d6 E050 subi r30,lo8(-(gs(.L23)))
129 00d8 F040 sbci r31,hi8(-(gs(.L23)))
130 00da EE0F lsl r30
131 00dc FF1F rol r31
132 00de 0590 lpm __tmp_reg__,Z+
133 00e0 F491 lpm r31,Z
134 00e2 E02D mov r30,__tmp_reg__
135 00e4 0994 ijmp
136 .data
137 .section .progmem.gcc_sw_table, "a", @progbits
138 .p2align 1
139 .L23:
140 .data
141 .section .progmem.gcc_sw_table, "a", @progbits
142 .p2align 1
143 0000 0000 .word gs(.L5)
144 0002 0000 .word gs(.L6)
145 0004 0000 .word gs(.L7)
146 0006 0000 .word gs(.L8)
147 0008 0000 .word gs(.L9)
148 000a 0000 .word gs(.L15)
149 000c 0000 .word gs(.L11)
150 000e 0000 .word gs(.L12)
151 0010 0000 .word gs(.L13)
152 0012 0000 .word gs(.L14)
153 0014 0000 .word gs(.L15)
154 0016 0000 .word gs(.L16)
155 0018 0000 .word gs(.L17)
156 001a 0000 .word gs(.L18)
157 001c 0000 .word gs(.L19)
158 001e 0000 .word gs(.L20)
159 0020 0000 .word gs(.L21)
160 0022 0000 .word gs(.L22)
161 .text
162 .L15:
163 00e6 8091 7800 lds r24,120
164 00ea 9091 7900 lds r25,(120)+1
165 00ee 2091 0000 lds r18,gyronick.1869
166 00f2 3091 0000 lds r19,(gyronick.1869)+1
167 00f6 280F add r18,r24
168 00f8 391F adc r19,r25
169 00fa 3093 0000 sts (gyronick.1869)+1,r19
170 00fe 2093 0000 sts gyronick.1869,r18
171 0102 81E0 ldi r24,lo8(1)
172 0104 8093 0000 sts ad_channel.1865,r24
173 .L24:
174 0108 8091 7C00 lds r24,124
175 010c 807E andi r24,lo8(-32)
176 010e 9091 0000 lds r25,ad_channel.1865
177 0112 892B or r24,r25
178 0114 8093 7C00 sts 124,r24
179 0118 7720 tst r7
180 011a 01F0 breq .L41
181 011c 8091 7A00 lds r24,122
182 0120 886C ori r24,lo8(-56)
183 0122 8093 7A00 sts 122,r24
184 0126 00C0 rjmp .L41
185 .L22:
186 0128 1092 0000 sts state.1866,__zero_reg__
187 012c 81E0 ldi r24,lo8(1)
188 012e 8093 0000 sts ADReady,r24
189 0132 8091 0000 lds r24,MeasurementCounter
190 0136 9091 0000 lds r25,(MeasurementCounter)+1
191 013a 0196 adiw r24,1
192 013c 9093 0000 sts (MeasurementCounter)+1,r25
193 0140 8093 0000 sts MeasurementCounter,r24
194 0144 7724 clr r7
195 .L14:
196 0146 8091 7800 lds r24,120
197 014a 9091 7900 lds r25,(120)+1
198 014e 9093 0000 sts (AdAirPressure)+1,r25
199 0152 8093 0000 sts AdAirPressure,r24
200 0156 8091 0000 lds r24,AdAirPressure
201 015a 9091 0000 lds r25,(AdAirPressure)+1
202 015e 4C01 movw r8,r24
203 0160 AA24 clr r10
204 0162 97FC sbrc r9,7
205 0164 A094 com r10
206 0166 BA2C mov r11,r10
207 0168 8091 0000 lds r24,tmpAirPressure.1874
208 016c 9091 0000 lds r25,(tmpAirPressure.1874)+1
209 0170 A091 0000 lds r26,(tmpAirPressure.1874)+2
210 0174 B091 0000 lds r27,(tmpAirPressure.1874)+3
211 0178 880E add r8,r24
212 017a 991E adc r9,r25
213 017c AA1E adc r10,r26
214 017e BB1E adc r11,r27
215 0180 8092 0000 sts tmpAirPressure.1874,r8
216 0184 9092 0000 sts (tmpAirPressure.1874)+1,r9
217 0188 A092 0000 sts (tmpAirPressure.1874)+2,r10
218 018c B092 0000 sts (tmpAirPressure.1874)+3,r11
219 0190 8091 0000 lds r24,AirPressCount.1875
220 0194 8F5F subi r24,lo8(-(1))
221 0196 8093 0000 sts AirPressCount.1875,r24
222 019a 8231 cpi r24,lo8(18)
223 019c 00F4 brsh .+2
224 019e 00C0 rjmp .L38
225 01a0 8091 0000 lds r24,AirPressure
226 01a4 9091 0000 lds r25,(AirPressure)+1
227 01a8 A091 0000 lds r26,(AirPressure)+2
228 01ac B091 0000 lds r27,(AirPressure)+3
229 01b0 7C01 movw r14,r24
230 01b2 8D01 movw r16,r26
231 01b4 EE0C lsl r14
232 01b6 FF1C rol r15
233 01b8 001F rol r16
234 01ba 111F rol r17
235 01bc EE0C lsl r14
236 01be FF1C rol r15
237 01c0 001F rol r16
238 01c2 111F rol r17
239 01c4 EE0C lsl r14
240 01c6 FF1C rol r15
241 01c8 001F rol r16
242 01ca 111F rol r17
243 01cc E81A sub r14,r24
244 01ce F90A sbc r15,r25
245 01d0 0A0B sbc r16,r26
246 01d2 1B0B sbc r17,r27
247 01d4 84E0 ldi r24,lo8(4)
248 01d6 90E0 ldi r25,hi8(4)
249 01d8 A0E0 ldi r26,hlo8(4)
250 01da B0E0 ldi r27,hhi8(4)
251 01dc E80E add r14,r24
252 01de F91E adc r15,r25
253 01e0 0A1F adc r16,r26
254 01e2 1B1F adc r17,r27
255 01e4 E80C add r14,r8
256 01e6 F91C adc r15,r9
257 01e8 0A1D adc r16,r10
258 01ea 1B1D adc r17,r11
259 01ec 6091 0000 lds r22,ExpandBaro
260 01f0 7727 clr r23
261 01f2 67FD sbrc r22,7
262 01f4 7095 com r23
263 01f6 872F mov r24,r23
264 01f8 972F mov r25,r23
265 01fa 2AE3 ldi r18,lo8(-9414)
266 01fc 3BED ldi r19,hi8(-9414)
267 01fe 4FEF ldi r20,hlo8(-9414)
268 0200 5FEF ldi r21,hhi8(-9414)
269 0202 0E94 0000 call __mulsi3
270 0206 E60E add r14,r22
271 0208 F71E adc r15,r23
272 020a 081F adc r16,r24
273 020c 191F adc r17,r25
274 020e C801 movw r24,r16
275 0210 B701 movw r22,r14
276 0212 28E0 ldi r18,lo8(8)
277 0214 30E0 ldi r19,hi8(8)
278 0216 40E0 ldi r20,hlo8(8)
279 0218 50E0 ldi r21,hhi8(8)
280 021a 0E94 0000 call __divmodsi4
281 021e C901 movw r24,r18
282 0220 DA01 movw r26,r20
283 0222 8093 0000 sts AirPressure,r24
284 0226 9093 0000 sts (AirPressure)+1,r25
285 022a A093 0000 sts (AirPressure)+2,r26
286 022e B093 0000 sts (AirPressure)+3,r27
287 0232 8091 0000 lds r24,StartAirPressure
288 0236 9091 0000 lds r25,(StartAirPressure)+1
289 023a A091 0000 lds r26,(StartAirPressure)+2
290 023e B091 0000 lds r27,(StartAirPressure)+3
291 0242 2091 0000 lds r18,AirPressure
292 0246 3091 0000 lds r19,(AirPressure)+1
293 024a 4091 0000 lds r20,(AirPressure)+2
294 024e 5091 0000 lds r21,(AirPressure)+3
295 0252 821B sub r24,r18
296 0254 930B sbc r25,r19
297 0256 A40B sbc r26,r20
298 0258 B50B sbc r27,r21
299 025a 8093 0000 sts ReadingHeight,r24
300 025e 9093 0000 sts (ReadingHeight)+1,r25
301 0262 A093 0000 sts (ReadingHeight)+2,r26
302 0266 B093 0000 sts (ReadingHeight)+3,r27
303 026a 6091 0000 lds r22,SumHeight
304 026e 7091 0000 lds r23,(SumHeight)+1
305 0272 8091 0000 lds r24,(SumHeight)+2
306 0276 9091 0000 lds r25,(SumHeight)+3
307 027a E090 0000 lds r14,SumHeight
308 027e F090 0000 lds r15,(SumHeight)+1
309 0282 0091 0000 lds r16,(SumHeight)+2
310 0286 1091 0000 lds r17,(SumHeight)+3
311 028a 20E1 ldi r18,lo8(16)
312 028c 30E0 ldi r19,hi8(16)
313 028e 40E0 ldi r20,hlo8(16)
314 0290 50E0 ldi r21,hhi8(16)
315 0292 0E94 0000 call __divmodsi4
316 0296 E21A sub r14,r18
317 0298 F30A sbc r15,r19
318 029a 040B sbc r16,r20
319 029c 150B sbc r17,r21
320 029e E092 0000 sts SumHeight,r14
321 02a2 F092 0000 sts (SumHeight)+1,r15
322 02a6 0093 0000 sts (SumHeight)+2,r16
323 02aa 1093 0000 sts (SumHeight)+3,r17
324 02ae 2091 0000 lds r18,SumHeight
325 02b2 3091 0000 lds r19,(SumHeight)+1
326 02b6 4091 0000 lds r20,(SumHeight)+2
327 02ba 5091 0000 lds r21,(SumHeight)+3
328 02be 8091 0000 lds r24,ReadingHeight
329 02c2 9091 0000 lds r25,(ReadingHeight)+1
330 02c6 A091 0000 lds r26,(ReadingHeight)+2
331 02ca B091 0000 lds r27,(ReadingHeight)+3
332 02ce 820F add r24,r18
333 02d0 931F adc r25,r19
334 02d2 A41F adc r26,r20
335 02d4 B51F adc r27,r21
336 02d6 8093 0000 sts SumHeight,r24
337 02da 9093 0000 sts (SumHeight)+1,r25
338 02de A093 0000 sts (SumHeight)+2,r26
339 02e2 B093 0000 sts (SumHeight)+3,r27
340 02e6 C090 0000 lds r12,ReadingVario
341 02ea D090 0000 lds r13,(ReadingVario)+1
342 02ee 6091 0000 lds r22,SumHeight
343 02f2 7091 0000 lds r23,(SumHeight)+1
344 02f6 8091 0000 lds r24,(SumHeight)+2
345 02fa 9091 0000 lds r25,(SumHeight)+3
346 02fe E090 0000 lds r14,ReadingHeight
347 0302 F090 0000 lds r15,(ReadingHeight)+1
348 0306 0091 0000 lds r16,(ReadingHeight)+2
349 030a 1091 0000 lds r17,(ReadingHeight)+3
350 030e 20E1 ldi r18,lo8(16)
351 0310 30E0 ldi r19,hi8(16)
352 0312 40E0 ldi r20,hlo8(16)
353 0314 50E0 ldi r21,hhi8(16)
354 0316 0E94 0000 call __divmodsi4
355 031a 5095 com r21
356 031c 4095 com r20
357 031e 3095 com r19
358 0320 2195 neg r18
359 0322 3F4F sbci r19,lo8(-1)
360 0324 4F4F sbci r20,lo8(-1)
361 0326 5F4F sbci r21,lo8(-1)
362 0328 A901 movw r20,r18
363 032a 4E0D add r20,r14
364 032c 5F1D adc r21,r15
365 032e 440F lsl r20
366 0330 551F rol r21
367 0332 440F lsl r20
368 0334 551F rol r21
369 0336 440F lsl r20
370 0338 551F rol r21
371 033a C601 movw r24,r12
372 033c 880F lsl r24
373 033e 991F rol r25
374 0340 8C0D add r24,r12
375 0342 9D1D adc r25,r13
376 0344 9C01 movw r18,r24
377 0346 220F lsl r18
378 0348 331F rol r19
379 034a 220F lsl r18
380 034c 331F rol r19
381 034e 820F add r24,r18
382 0350 931F adc r25,r19
383 0352 480F add r20,r24
384 0354 591F adc r21,r25
385 0356 57FD sbrc r21,7
386 0358 00C0 rjmp .L46
387 .L39:
388 035a 5595 asr r21
389 035c 4795 ror r20
390 035e 5595 asr r21
391 0360 4795 ror r20
392 0362 5595 asr r21
393 0364 4795 ror r20
394 0366 5595 asr r21
395 0368 4795 ror r20
396 036a 5093 0000 sts (ReadingVario)+1,r21
397 036e 4093 0000 sts ReadingVario,r20
398 0372 C501 movw r24,r10
399 0374 B401 movw r22,r8
400 0376 22E0 ldi r18,lo8(2)
401 0378 30E0 ldi r19,hi8(2)
402 037a 40E0 ldi r20,hlo8(2)
403 037c 50E0 ldi r21,hhi8(2)
404 037e 0E94 0000 call __divmodsi4
405 0382 2093 0000 sts tmpAirPressure.1874,r18
406 0386 3093 0000 sts (tmpAirPressure.1874)+1,r19
407 038a 4093 0000 sts (tmpAirPressure.1874)+2,r20
408 038e 5093 0000 sts (tmpAirPressure.1874)+3,r21
409 0392 89E0 ldi r24,lo8(9)
410 0394 8093 0000 sts AirPressCount.1875,r24
411 .L38:
412 0398 82E0 ldi r24,lo8(2)
413 039a 8093 0000 sts ad_channel.1865,r24
414 039e 00C0 rjmp .L24
415 .L13:
416 03a0 8091 7800 lds r24,120
417 03a4 9091 7900 lds r25,(120)+1
418 03a8 9093 0000 sts (AdValueAccZ)+1,r25
419 03ac 8093 0000 sts AdValueAccZ,r24
420 03b0 6091 7800 lds r22,120
421 03b4 7091 7900 lds r23,(120)+1
422 03b8 E090 0000 lds r14,AdBiasAccTop
423 03bc F090 0000 lds r15,(AdBiasAccTop)+1
424 03c0 0091 0000 lds r16,(AdBiasAccTop)+2
425 03c4 1091 0000 lds r17,(AdBiasAccTop)+3
426 03c8 8827 clr r24
427 03ca 77FD sbrc r23,7
428 03cc 8095 com r24
429 03ce 982F mov r25,r24
430 03d0 0E94 0000 call __floatsisf
431 03d4 A801 movw r20,r16
432 03d6 9701 movw r18,r14
433 03d8 0E94 0000 call __subsf3
434 03dc 0E94 0000 call __fixsfsi
435 03e0 7093 0000 sts (AdValueAccTop)+1,r23
436 03e4 6093 0000 sts AdValueAccTop,r22
437 03e8 8091 0000 lds r24,AdValueAccTop
438 03ec 9091 0000 lds r25,(AdValueAccTop)+1
439 03f0 0297 sbiw r24,2
440 03f2 04F4 brge .+2
441 03f4 00C0 rjmp .L25
442 03f6 6091 0000 lds r22,AdBiasAccTop
443 03fa 7091 0000 lds r23,(AdBiasAccTop)+1
444 03fe 8091 0000 lds r24,(AdBiasAccTop)+2
445 0402 9091 0000 lds r25,(AdBiasAccTop)+3
446 0406 20E0 ldi r18,lo8(0x443b8000)
447 0408 30E8 ldi r19,hi8(0x443b8000)
448 040a 4BE3 ldi r20,hlo8(0x443b8000)
449 040c 54E4 ldi r21,hhi8(0x443b8000)
450 040e 0E94 0000 call __ltsf2
451 0412 8823 tst r24
452 0414 04F4 brge .L26
453 0416 6091 0000 lds r22,AdBiasAccTop
454 041a 7091 0000 lds r23,(AdBiasAccTop)+1
455 041e 8091 0000 lds r24,(AdBiasAccTop)+2
456 0422 9091 0000 lds r25,(AdBiasAccTop)+3
457 0426 2AE0 ldi r18,lo8(0x3ca3d70a)
458 0428 37ED ldi r19,hi8(0x3ca3d70a)
459 042a 43EA ldi r20,hlo8(0x3ca3d70a)
460 042c 5CE3 ldi r21,hhi8(0x3ca3d70a)
461 042e 0E94 0000 call __addsf3
462 0432 6093 0000 sts AdBiasAccTop,r22
463 0436 7093 0000 sts (AdBiasAccTop)+1,r23
464 043a 8093 0000 sts (AdBiasAccTop)+2,r24
465 043e 9093 0000 sts (AdBiasAccTop)+3,r25
466 0442 8091 0000 lds r24,ModelIsFlying
467 0446 9091 0000 lds r25,(ModelIsFlying)+1
468 044a 845F subi r24,lo8(500)
469 044c 9140 sbci r25,hi8(500)
470 044e 00F4 brsh .L26
471 0450 6091 0000 lds r22,AdBiasAccTop
472 0454 7091 0000 lds r23,(AdBiasAccTop)+1
473 0458 8091 0000 lds r24,(AdBiasAccTop)+2
474 045c 9091 0000 lds r25,(AdBiasAccTop)+3
475 0460 2DEC ldi r18,lo8(0x3dcccccd)
476 0462 3CEC ldi r19,hi8(0x3dcccccd)
477 0464 4CEC ldi r20,hlo8(0x3dcccccd)
478 0466 5DE3 ldi r21,hhi8(0x3dcccccd)
479 0468 0E94 0000 call __addsf3
480 046c 6093 0000 sts AdBiasAccTop,r22
481 0470 7093 0000 sts (AdBiasAccTop)+1,r23
482 0474 8093 0000 sts (AdBiasAccTop)+2,r24
483 0478 9093 0000 sts (AdBiasAccTop)+3,r25
484 .L26:
485 047c 6091 0000 lds r22,ReadingIntegralTop
486 0480 7091 0000 lds r23,(ReadingIntegralTop)+1
487 0484 8091 0000 lds r24,(ReadingIntegralTop)+2
488 0488 9091 0000 lds r25,(ReadingIntegralTop)+3
489 048c E090 0000 lds r14,ReadingIntegralTop
490 0490 F090 0000 lds r15,(ReadingIntegralTop)+1
491 0494 0091 0000 lds r16,(ReadingIntegralTop)+2
492 0498 1091 0000 lds r17,(ReadingIntegralTop)+3
493 049c 20E0 ldi r18,lo8(1024)
494 049e 34E0 ldi r19,hi8(1024)
495 04a0 40E0 ldi r20,hlo8(1024)
496 04a2 50E0 ldi r21,hhi8(1024)
497 04a4 0E94 0000 call __divmodsi4
498 04a8 E21A sub r14,r18
499 04aa F30A sbc r15,r19
500 04ac 040B sbc r16,r20
501 04ae 150B sbc r17,r21
502 04b0 E092 0000 sts ReadingIntegralTop,r14
503 04b4 F092 0000 sts (ReadingIntegralTop)+1,r15
504 04b8 0093 0000 sts (ReadingIntegralTop)+2,r16
505 04bc 1093 0000 sts (ReadingIntegralTop)+3,r17
506 04c0 8091 0000 lds r24,AdValueAccTop
507 04c4 9091 0000 lds r25,(AdValueAccTop)+1
508 04c8 2091 0000 lds r18,ReadingIntegralTop
509 04cc 3091 0000 lds r19,(ReadingIntegralTop)+1
510 04d0 4091 0000 lds r20,(ReadingIntegralTop)+2
511 04d4 5091 0000 lds r21,(ReadingIntegralTop)+3
512 04d8 AA27 clr r26
513 04da 97FD sbrc r25,7
514 04dc A095 com r26
515 04de BA2F mov r27,r26
516 04e0 820F add r24,r18
517 04e2 931F adc r25,r19
518 04e4 A41F adc r26,r20
519 04e6 B51F adc r27,r21
520 04e8 8093 0000 sts ReadingIntegralTop,r24
521 04ec 9093 0000 sts (ReadingIntegralTop)+1,r25
522 04f0 A093 0000 sts (ReadingIntegralTop)+2,r26
523 04f4 B093 0000 sts (ReadingIntegralTop)+3,r27
524 04f8 83E0 ldi r24,lo8(3)
525 04fa 8093 0000 sts ad_channel.1865,r24
526 04fe 00C0 rjmp .L24
527 .L11:
528 0500 8091 7800 lds r24,120
529 0504 9091 7900 lds r25,(120)+1
530 0508 2091 0000 lds r18,gyroroll.1868
531 050c 3091 0000 lds r19,(gyroroll.1868)+1
532 0510 280F add r18,r24
533 0512 391F adc r19,r25
534 0514 3093 0000 sts (gyroroll.1868)+1,r19
535 0518 2093 0000 sts gyroroll.1868,r18
536 051c 84E0 ldi r24,lo8(4)
537 051e 8093 0000 sts ad_channel.1865,r24
538 0522 00C0 rjmp .L24
539 .L12:
540 0524 4091 0000 lds r20,UBat
541 0528 5091 0000 lds r21,(UBat)+1
542 052c 8091 7800 lds r24,120
543 0530 9091 7900 lds r25,(120)+1
544 0534 9A01 movw r18,r20
545 0536 220F lsl r18
546 0538 331F rol r19
547 053a 240F add r18,r20
548 053c 351F adc r19,r21
549 053e 63E0 ldi r22,lo8(3)
550 0540 70E0 ldi r23,hi8(3)
551 0542 0E94 0000 call __udivmodhi4
552 0546 260F add r18,r22
553 0548 371F adc r19,r23
554 054a 3695 lsr r19
555 054c 2795 ror r18
556 054e 3695 lsr r19
557 0550 2795 ror r18
558 0552 3093 0000 sts (UBat)+1,r19
559 0556 2093 0000 sts UBat,r18
560 055a 85E0 ldi r24,lo8(5)
561 055c 8093 0000 sts ad_channel.1865,r24
562 0560 00C0 rjmp .L24
563 .L7:
564 0562 8091 7800 lds r24,120
565 0566 9091 7900 lds r25,(120)+1
566 056a 9093 0000 sts (gyroyaw.1867)+1,r25
567 056e 8093 0000 sts gyroyaw.1867,r24
568 0572 86E0 ldi r24,lo8(6)
569 0574 8093 0000 sts ad_channel.1865,r24
570 0578 00C0 rjmp .L24
571 .L8:
572 057a 8091 7800 lds r24,120
573 057e 9091 7900 lds r25,(120)+1
574 0582 9093 0000 sts (accroll.1870)+1,r25
575 0586 8093 0000 sts accroll.1870,r24
576 058a 87E0 ldi r24,lo8(7)
577 058c 8093 0000 sts ad_channel.1865,r24
578 0590 00C0 rjmp .L24
579 .L9:
580 0592 8091 7800 lds r24,120
581 0596 9091 7900 lds r25,(120)+1
582 059a 9093 0000 sts (accnick.1871)+1,r25
583 059e 8093 0000 sts accnick.1871,r24
584 05a2 82E0 ldi r24,lo8(2)
585 05a4 8093 0000 sts ad_channel.1865,r24
586 05a8 00C0 rjmp .L24
587 .L16:
588 05aa 2091 7800 lds r18,120
589 05ae 3091 7900 lds r19,(120)+1
590 05b2 8091 0000 lds r24,gyroroll.1868
591 05b6 9091 0000 lds r25,(gyroroll.1868)+1
592 05ba 820F add r24,r18
593 05bc 931F adc r25,r19
594 05be 9093 0000 sts (gyroroll.1868)+1,r25
595 05c2 8093 0000 sts gyroroll.1868,r24
596 05c6 1092 0000 sts ad_channel.1865,__zero_reg__
597 05ca 00C0 rjmp .L24
598 .L17:
599 05cc 2091 7800 lds r18,120
600 05d0 3091 7900 lds r19,(120)+1
601 05d4 8091 0000 lds r24,gyroyaw.1867
602 05d8 9091 0000 lds r25,(gyroyaw.1867)+1
603 05dc 280F add r18,r24
604 05de 391F adc r19,r25
605 05e0 3093 0000 sts (gyroyaw.1867)+1,r19
606 05e4 2093 0000 sts gyroyaw.1867,r18
607 05e8 8091 0000 lds r24,BoardRelease
608 05ec 8A30 cpi r24,lo8(10)
609 05ee 01F4 brne .+2
610 05f0 00C0 rjmp .L47
611 05f2 8431 cpi r24,lo8(20)
612 05f4 01F4 brne .+2
613 05f6 00C0 rjmp .L48
614 05f8 3093 0000 sts (AdValueGyroYaw)+1,r19
615 05fc 2093 0000 sts AdValueGyroYaw,r18
616 .L30:
617 0600 86E0 ldi r24,lo8(6)
618 0602 8093 0000 sts ad_channel.1865,r24
619 0606 00C0 rjmp .L24
620 .L18:
621 0608 2091 7800 lds r18,120
622 060c 3091 7900 lds r19,(120)+1
623 0610 8091 0000 lds r24,accroll.1870
624 0614 9091 0000 lds r25,(accroll.1870)+1
625 0618 280F add r18,r24
626 061a 391F adc r19,r25
627 061c 3093 0000 sts (accroll.1870)+1,r19
628 0620 2093 0000 sts accroll.1870,r18
629 0624 8091 0000 lds r24,AdBiasAccRoll
630 0628 9091 0000 lds r25,(AdBiasAccRoll)+1
631 062c 821B sub r24,r18
632 062e 930B sbc r25,r19
633 0630 9093 0000 sts (AdValueAccRoll)+1,r25
634 0634 8093 0000 sts AdValueAccRoll,r24
635 0638 87E0 ldi r24,lo8(7)
636 063a 8093 0000 sts ad_channel.1865,r24
637 063e 00C0 rjmp .L24
638 .L19:
639 0640 8091 7800 lds r24,120
640 0644 9091 7900 lds r25,(120)+1
641 0648 2091 0000 lds r18,accnick.1871
642 064c 3091 0000 lds r19,(accnick.1871)+1
643 0650 820F add r24,r18
644 0652 931F adc r25,r19
645 0654 9093 0000 sts (accnick.1871)+1,r25
646 0658 8093 0000 sts accnick.1871,r24
647 065c 2091 0000 lds r18,AdBiasAccNick
648 0660 3091 0000 lds r19,(AdBiasAccNick)+1
649 0664 821B sub r24,r18
650 0666 930B sbc r25,r19
651 0668 9093 0000 sts (AdValueAccNick)+1,r25
652 066c 8093 0000 sts AdValueAccNick,r24
653 0670 82E0 ldi r24,lo8(2)
654 0672 8093 0000 sts ad_channel.1865,r24
655 0676 00C0 rjmp .L24
656 .L20:
657 0678 2091 7800 lds r18,120
658 067c 3091 7900 lds r19,(120)+1
659 0680 8091 0000 lds r24,gyronick.1869
660 0684 9091 0000 lds r25,(gyronick.1869)+1
661 0688 280F add r18,r24
662 068a 391F adc r19,r25
663 068c 8091 0000 lds r24,BoardRelease
664 0690 8A30 cpi r24,lo8(10)
665 0692 01F4 brne .+2
666 0694 00C0 rjmp .L49
667 0696 220F lsl r18
668 0698 331F rol r19
669 069a 220F lsl r18
670 069c 331F rol r19
671 069e 3093 0000 sts (gyronick.1869)+1,r19
672 06a2 2093 0000 sts gyronick.1869,r18
673 .L33:
674 06a6 6091 0000 lds r22,gyronick.1869
675 06aa 7091 0000 lds r23,(gyronick.1869)+1
676 06ae 9B01 movw r18,r22
677 06b0 3695 lsr r19
678 06b2 2795 ror r18
679 06b4 3695 lsr r19
680 06b6 2795 ror r18
681 06b8 3695 lsr r19
682 06ba 2795 ror r18
683 06bc 3093 0000 sts (AdValueGyroNick)+1,r19
684 06c0 2093 0000 sts AdValueGyroNick,r18
685 06c4 80E0 ldi r24,lo8(0)
686 06c6 90E0 ldi r25,hi8(0)
687 06c8 2091 0000 lds r18,filtergyronick.1872
688 06cc 3091 0000 lds r19,(filtergyronick.1872)+1
689 06d0 4091 0000 lds r20,(filtergyronick.1872)+2
690 06d4 5091 0000 lds r21,(filtergyronick.1872)+3
691 06d8 620F add r22,r18
692 06da 731F adc r23,r19
693 06dc 841F adc r24,r20
694 06de 951F adc r25,r21
695 06e0 22E0 ldi r18,lo8(2)
696 06e2 30E0 ldi r19,hi8(2)
697 06e4 40E0 ldi r20,hlo8(2)
698 06e6 50E0 ldi r21,hhi8(2)
699 06e8 0E94 0000 call __divmodsi4
700 06ec C901 movw r24,r18
701 06ee DA01 movw r26,r20
702 06f0 8093 0000 sts filtergyronick.1872,r24
703 06f4 9093 0000 sts (filtergyronick.1872)+1,r25
704 06f8 A093 0000 sts (filtergyronick.1872)+2,r26
705 06fc B093 0000 sts (filtergyronick.1872)+3,r27
706 0700 2091 0000 lds r18,BiasHiResGyroNick
707 0704 3091 0000 lds r19,(BiasHiResGyroNick)+1
708 0708 821B sub r24,r18
709 070a 930B sbc r25,r19
710 070c 9093 0000 sts (HiResGyroNick)+1,r25
711 0710 8093 0000 sts HiResGyroNick,r24
712 0714 8091 0000 lds r24,FilterHiResGyroNick
713 0718 9091 0000 lds r25,(FilterHiResGyroNick)+1
714 071c 2091 0000 lds r18,HiResGyroNick
715 0720 3091 0000 lds r19,(HiResGyroNick)+1
716 0724 280F add r18,r24
717 0726 391F adc r19,r25
718 0728 37FD sbrc r19,7
719 072a 00C0 rjmp .L50
720 .L34:
721 072c 3595 asr r19
722 072e 2795 ror r18
723 0730 3093 0000 sts (FilterHiResGyroNick)+1,r19
724 0734 2093 0000 sts FilterHiResGyroNick,r18
725 0738 81E0 ldi r24,lo8(1)
726 073a 8093 0000 sts ad_channel.1865,r24
727 073e 00C0 rjmp .L24
728 .L21:
729 0740 2091 7800 lds r18,120
730 0744 3091 7900 lds r19,(120)+1
731 0748 8091 0000 lds r24,gyroroll.1868
732 074c 9091 0000 lds r25,(gyroroll.1868)+1
733 0750 280F add r18,r24
734 0752 391F adc r19,r25
735 0754 8091 0000 lds r24,BoardRelease
736 0758 8A30 cpi r24,lo8(10)
737 075a 01F4 brne .+2
738 075c 00C0 rjmp .L51
739 075e 220F lsl r18
740 0760 331F rol r19
741 0762 220F lsl r18
742 0764 331F rol r19
743 0766 3093 0000 sts (gyroroll.1868)+1,r19
744 076a 2093 0000 sts gyroroll.1868,r18
745 .L36:
746 076e 6091 0000 lds r22,gyroroll.1868
747 0772 7091 0000 lds r23,(gyroroll.1868)+1
748 0776 9B01 movw r18,r22
749 0778 3695 lsr r19
750 077a 2795 ror r18
751 077c 3695 lsr r19
752 077e 2795 ror r18
753 0780 3695 lsr r19
754 0782 2795 ror r18
755 0784 3093 0000 sts (AdValueGyroRoll)+1,r19
756 0788 2093 0000 sts AdValueGyroRoll,r18
757 078c 80E0 ldi r24,lo8(0)
758 078e 90E0 ldi r25,hi8(0)
759 0790 2091 0000 lds r18,filtergyroroll.1873
760 0794 3091 0000 lds r19,(filtergyroroll.1873)+1
761 0798 4091 0000 lds r20,(filtergyroroll.1873)+2
762 079c 5091 0000 lds r21,(filtergyroroll.1873)+3
763 07a0 620F add r22,r18
764 07a2 731F adc r23,r19
765 07a4 841F adc r24,r20
766 07a6 951F adc r25,r21
767 07a8 22E0 ldi r18,lo8(2)
768 07aa 30E0 ldi r19,hi8(2)
769 07ac 40E0 ldi r20,hlo8(2)
770 07ae 50E0 ldi r21,hhi8(2)
771 07b0 0E94 0000 call __divmodsi4
772 07b4 C901 movw r24,r18
773 07b6 DA01 movw r26,r20
774 07b8 8093 0000 sts filtergyroroll.1873,r24
775 07bc 9093 0000 sts (filtergyroroll.1873)+1,r25
776 07c0 A093 0000 sts (filtergyroroll.1873)+2,r26
777 07c4 B093 0000 sts (filtergyroroll.1873)+3,r27
778 07c8 2091 0000 lds r18,BiasHiResGyroRoll
779 07cc 3091 0000 lds r19,(BiasHiResGyroRoll)+1
780 07d0 821B sub r24,r18
781 07d2 930B sbc r25,r19
782 07d4 9093 0000 sts (HiResGyroRoll)+1,r25
783 07d8 8093 0000 sts HiResGyroRoll,r24
784 07dc 8091 0000 lds r24,FilterHiResGyroRoll
785 07e0 9091 0000 lds r25,(FilterHiResGyroRoll)+1
786 07e4 2091 0000 lds r18,HiResGyroRoll
787 07e8 3091 0000 lds r19,(HiResGyroRoll)+1
788 07ec 280F add r18,r24
789 07ee 391F adc r19,r25
790 07f0 37FD sbrc r19,7
791 07f2 00C0 rjmp .L52
792 .L37:
793 07f4 3595 asr r19
794 07f6 2795 ror r18
795 07f8 3093 0000 sts (FilterHiResGyroRoll)+1,r19
796 07fc 2093 0000 sts FilterHiResGyroRoll,r18
797 0800 83E0 ldi r24,lo8(3)
798 0802 8093 0000 sts ad_channel.1865,r24
799 0806 00C0 rjmp .L24
800 .L5:
801 0808 8091 7800 lds r24,120
802 080c 9091 7900 lds r25,(120)+1
803 0810 9093 0000 sts (gyronick.1869)+1,r25
804 0814 8093 0000 sts gyronick.1869,r24
805 0818 81E0 ldi r24,lo8(1)
806 081a 8093 0000 sts ad_channel.1865,r24
807 081e 00C0 rjmp .L24
808 .L6:
809 0820 8091 7800 lds r24,120
810 0824 9091 7900 lds r25,(120)+1
811 0828 9093 0000 sts (gyroroll.1868)+1,r25
812 082c 8093 0000 sts gyroroll.1868,r24
813 0830 1092 0000 sts ad_channel.1865,__zero_reg__
814 0834 00C0 rjmp .L24
815 .L51:
816 0836 220F lsl r18
817 0838 331F rol r19
818 083a 3093 0000 sts (gyroroll.1868)+1,r19
819 083e 2093 0000 sts gyroroll.1868,r18
820 0842 00C0 rjmp .L36
821 .L47:
822 0844 2F5F subi r18,lo8(-(1))
823 0846 3F4F sbci r19,hi8(-(1))
824 0848 3695 lsr r19
825 084a 2795 ror r18
826 084c 3093 0000 sts (AdValueGyroYaw)+1,r19
827 0850 2093 0000 sts AdValueGyroYaw,r18
828 0854 00C0 rjmp .L30
829 .L49:
830 0856 220F lsl r18
831 0858 331F rol r19
832 085a 3093 0000 sts (gyronick.1869)+1,r19
833 085e 2093 0000 sts gyronick.1869,r18
834 0862 00C0 rjmp .L33
835 .L25:
836 0864 8091 0000 lds r24,AdValueAccTop
837 0868 9091 0000 lds r25,(AdValueAccTop)+1
838 086c 8F5F subi r24,lo8(-1)
839 086e 9F4F sbci r25,hi8(-1)
840 0870 04F0 brlt .+2
841 0872 00C0 rjmp .L26
842 0874 6091 0000 lds r22,AdBiasAccTop
843 0878 7091 0000 lds r23,(AdBiasAccTop)+1
844 087c 8091 0000 lds r24,(AdBiasAccTop)+2
845 0880 9091 0000 lds r25,(AdBiasAccTop)+3
846 0884 20E0 ldi r18,lo8(0x44098000)
847 0886 30E8 ldi r19,hi8(0x44098000)
848 0888 49E0 ldi r20,hlo8(0x44098000)
849 088a 54E4 ldi r21,hhi8(0x44098000)
850 088c 0E94 0000 call __gtsf2
851 0890 1816 cp __zero_reg__,r24
852 0892 04F0 brlt .+2
853 0894 00C0 rjmp .L26
854 0896 6091 0000 lds r22,AdBiasAccTop
855 089a 7091 0000 lds r23,(AdBiasAccTop)+1
856 089e 8091 0000 lds r24,(AdBiasAccTop)+2
857 08a2 9091 0000 lds r25,(AdBiasAccTop)+3
858 08a6 2AE0 ldi r18,lo8(0x3ca3d70a)
859 08a8 37ED ldi r19,hi8(0x3ca3d70a)
860 08aa 43EA ldi r20,hlo8(0x3ca3d70a)
861 08ac 5CE3 ldi r21,hhi8(0x3ca3d70a)
862 08ae 0E94 0000 call __subsf3
863 08b2 6093 0000 sts AdBiasAccTop,r22
864 08b6 7093 0000 sts (AdBiasAccTop)+1,r23
865 08ba 8093 0000 sts (AdBiasAccTop)+2,r24
866 08be 9093 0000 sts (AdBiasAccTop)+3,r25
867 08c2 8091 0000 lds r24,ModelIsFlying
868 08c6 9091 0000 lds r25,(ModelIsFlying)+1
869 08ca 845F subi r24,lo8(500)
870 08cc 9140 sbci r25,hi8(500)
871 08ce 00F0 brlo .+2
872 08d0 00C0 rjmp .L26
873 08d2 6091 0000 lds r22,AdBiasAccTop
874 08d6 7091 0000 lds r23,(AdBiasAccTop)+1
875 08da 8091 0000 lds r24,(AdBiasAccTop)+2
876 08de 9091 0000 lds r25,(AdBiasAccTop)+3
877 08e2 2DEC ldi r18,lo8(0x3dcccccd)
878 08e4 3CEC ldi r19,hi8(0x3dcccccd)
879 08e6 4CEC ldi r20,hlo8(0x3dcccccd)
880 08e8 5DE3 ldi r21,hhi8(0x3dcccccd)
881 08ea 0E94 0000 call __subsf3
882 08ee 6093 0000 sts AdBiasAccTop,r22
883 08f2 7093 0000 sts (AdBiasAccTop)+1,r23
884 08f6 8093 0000 sts (AdBiasAccTop)+2,r24
885 08fa 9093 0000 sts (AdBiasAccTop)+3,r25
886 08fe 00C0 rjmp .L26
887 .L46:
888 0900 415F subi r20,lo8(-(15))
889 0902 5F4F sbci r21,hi8(-(15))
890 0904 00C0 rjmp .L39
891 .L48:
892 0906 8FEF ldi r24,lo8(2047)
893 0908 97E0 ldi r25,hi8(2047)
894 090a 821B sub r24,r18
895 090c 930B sbc r25,r19
896 090e 9093 0000 sts (AdValueGyroYaw)+1,r25
897 0912 8093 0000 sts AdValueGyroYaw,r24
898 0916 00C0 rjmp .L30
899 .L50:
900 0918 2F5F subi r18,lo8(-(1))
901 091a 3F4F sbci r19,hi8(-(1))
902 091c 00C0 rjmp .L34
903 .L52:
904 091e 2F5F subi r18,lo8(-(1))
905 0920 3F4F sbci r19,hi8(-(1))
906 0922 00C0 rjmp .L37
908 .global SearchDacGyroOffset
910 SearchDacGyroOffset:
911 0924 AF92 push r10
912 0926 BF92 push r11
913 0928 DF92 push r13
914 092a EF92 push r14
915 092c FF92 push r15
916 092e 0F93 push r16
917 0930 1F93 push r17
918 0932 CF93 push r28
919 0934 DF93 push r29
920 /* prologue: function */
921 /* frame size = 0 */
922 0936 1092 0000 sts GyroDefectNick,__zero_reg__
923 093a 1092 0000 sts GyroDefectRoll,__zero_reg__
924 093e 1092 0000 sts GyroDefectYaw,__zero_reg__
925 0942 80ED ldi r24,lo8(2000)
926 0944 97E0 ldi r25,hi8(2000)
927 0946 0E94 0000 call SetDelay
928 094a EC01 movw r28,r24
929 094c 8091 0000 lds r24,BoardRelease
930 0950 8D30 cpi r24,lo8(13)
931 0952 01F0 breq .L83
932 .L76:
933 /* epilogue start */
934 0954 DF91 pop r29
935 0956 CF91 pop r28
936 0958 1F91 pop r17
937 095a 0F91 pop r16
938 095c FF90 pop r15
939 095e EF90 pop r14
940 0960 DF90 pop r13
941 0962 BF90 pop r11
942 0964 AF90 pop r10
943 0966 0895 ret
944 .L83:
945 0968 0CE8 ldi r16,lo8(-116)
946 096a FF24 clr r15
947 096c F394 inc r15
948 096e F5EF ldi r31,lo8(-11)
949 0970 EF2E mov r14,r31
950 0972 EAE0 ldi r30,lo8(10)
951 0974 DE2E mov r13,r30
952 0976 70E0 ldi r23,lo8(__c.1826)
953 0978 A72E mov r10,r23
954 097a 70E0 ldi r23,hi8(__c.1826)
955 097c B72E mov r11,r23
956 .L82:
957 097e 8091 0000 lds r24,AdValueGyroNick
958 0982 9091 0000 lds r25,(AdValueGyroNick)+1
959 0986 8C5F subi r24,lo8(1020)
960 0988 9340 sbci r25,hi8(1020)
961 098a 04F0 brlt .+2
962 098c 00C0 rjmp .L56
963 098e 8091 0000 lds r24,DacOffsetGyroNick
964 0992 8150 subi r24,lo8(-(-1))
965 0994 8093 0000 sts DacOffsetGyroNick,r24
966 0998 10E0 ldi r17,lo8(0)
967 .L57:
968 099a 8091 0000 lds r24,AdValueGyroRoll
969 099e 9091 0000 lds r25,(AdValueGyroRoll)+1
970 09a2 8C5F subi r24,lo8(1020)
971 09a4 9340 sbci r25,hi8(1020)
972 09a6 04F0 brlt .+2
973 09a8 00C0 rjmp .L59
974 09aa 8091 0000 lds r24,DacOffsetGyroRoll
975 09ae 8150 subi r24,lo8(-(-1))
976 09b0 8093 0000 sts DacOffsetGyroRoll,r24
977 .L60:
978 09b4 8091 0000 lds r24,AdValueGyroYaw
979 09b8 9091 0000 lds r25,(AdValueGyroYaw)+1
980 09bc 8C5F subi r24,lo8(1020)
981 09be 9340 sbci r25,hi8(1020)
982 09c0 04F0 brlt .+2
983 09c2 00C0 rjmp .L62
984 09c4 8091 0000 lds r24,DacOffsetGyroYaw
985 09c8 8150 subi r24,lo8(-(-1))
986 09ca 8093 0000 sts DacOffsetGyroYaw,r24
987 .L63:
988 09ce 87E0 ldi r24,lo8(7)
989 09d0 0E94 0000 call I2C_Start
990 09d4 8091 0000 lds r24,DacOffsetGyroNick
991 09d8 8A30 cpi r24,lo8(10)
992 09da 00F0 brlo .+2
993 09dc 00C0 rjmp .L65
994 09de F092 0000 sts GyroDefectNick,r15
995 09e2 D092 0000 sts DacOffsetGyroNick,r13
996 .L66:
997 09e6 8091 0000 lds r24,DacOffsetGyroRoll
998 09ea 8A30 cpi r24,lo8(10)
999 09ec 00F0 brlo .+2
1000 09ee 00C0 rjmp .L67
1001 09f0 F092 0000 sts GyroDefectRoll,r15
1002 09f4 D092 0000 sts DacOffsetGyroRoll,r13
1003 .L68:
1004 09f8 8091 0000 lds r24,DacOffsetGyroYaw
1005 09fc 8A30 cpi r24,lo8(10)
1006 09fe 00F4 brsh .L69
1007 0a00 F092 0000 sts GyroDefectYaw,r15
1008 0a04 D092 0000 sts DacOffsetGyroYaw,r13
1009 .L78:
1010 0a08 8091 0000 lds r24,twi_state
1011 0a0c 8823 tst r24
1012 0a0e 01F0 breq .L71
1013 0a10 CE01 movw r24,r28
1014 0a12 0E94 0000 call CheckDelay
1015 0a16 8823 tst r24
1016 0a18 01F0 breq .L78
1017 0a1a 00D0 rcall .
1018 0a1c 0F92 push __tmp_reg__
1019 0a1e EDB7 in r30,__SP_L__
1020 0a20 FEB7 in r31,__SP_H__
1021 0a22 1182 std Z+1,__zero_reg__
1022 0a24 B382 std Z+3,r11
1023 0a26 A282 std Z+2,r10
1024 0a28 0E94 0000 call _printf_P
1025 0a2c 0F90 pop __tmp_reg__
1026 0a2e 0F90 pop __tmp_reg__
1027 0a30 0F90 pop __tmp_reg__
1028 .L71:
1029 0a32 1092 0000 sts ADReady,__zero_reg__
1030 0a36 8091 7A00 lds r24,122
1031 0a3a 886C ori r24,lo8(-56)
1032 0a3c 8093 7A00 sts 122,r24
1033 .L73:
1034 0a40 8091 0000 lds r24,ADReady
1035 0a44 8823 tst r24
1036 0a46 01F0 breq .L73
1037 0a48 0A30 cpi r16,lo8(10)
1038 0a4a 00F4 brsh .+2
1039 0a4c 00C0 rjmp .L84
1040 0a4e 0150 subi r16,lo8(-(-1))
1041 0a50 01F4 brne .+2
1042 0a52 00C0 rjmp .L85
1043 .L75:
1044 0a54 1330 cpi r17,lo8(3)
1045 0a56 01F0 breq .+2
1046 0a58 00C0 rjmp .L82
1047 0a5a 0B30 cpi r16,lo8(11)
1048 0a5c 00F4 brsh .+2
1049 0a5e 00C0 rjmp .L82
1050 0a60 09E0 ldi r16,lo8(9)
1051 0a62 00C0 rjmp .L82
1052 .L69:
1053 0a64 863F cpi r24,lo8(-10)
1054 0a66 00F0 brlo .L78
1055 0a68 F092 0000 sts GyroDefectYaw,r15
1056 0a6c E092 0000 sts DacOffsetGyroYaw,r14
1057 0a70 00C0 rjmp .L78
1058 .L67:
1059 0a72 863F cpi r24,lo8(-10)
1060 0a74 00F4 brsh .+2
1061 0a76 00C0 rjmp .L68
1062 0a78 F092 0000 sts GyroDefectRoll,r15
1063 0a7c E092 0000 sts DacOffsetGyroRoll,r14
1064 0a80 00C0 rjmp .L68
1065 .L65:
1066 0a82 863F cpi r24,lo8(-10)
1067 0a84 00F4 brsh .+2
1068 0a86 00C0 rjmp .L66
1069 0a88 F092 0000 sts GyroDefectNick,r15
1070 0a8c E092 0000 sts DacOffsetGyroNick,r14
1071 0a90 00C0 rjmp .L66
1072 .L62:
1073 0a92 8091 0000 lds r24,AdValueGyroYaw
1074 0a96 9091 0000 lds r25,(AdValueGyroYaw)+1
1075 0a9a 8750 subi r24,lo8(1031)
1076 0a9c 9440 sbci r25,hi8(1031)
1077 0a9e 04F0 brlt .L64
1078 0aa0 8091 0000 lds r24,DacOffsetGyroYaw
1079 0aa4 8F5F subi r24,lo8(-(1))
1080 0aa6 8093 0000 sts DacOffsetGyroYaw,r24
1081 0aaa 00C0 rjmp .L63
1082 .L59:
1083 0aac 8091 0000 lds r24,AdValueGyroRoll
1084 0ab0 9091 0000 lds r25,(AdValueGyroRoll)+1
1085 0ab4 8750 subi r24,lo8(1031)
1086 0ab6 9440 sbci r25,hi8(1031)
1087 0ab8 04F0 brlt .L61
1088 0aba 8091 0000 lds r24,DacOffsetGyroRoll
1089 0abe 8F5F subi r24,lo8(-(1))
1090 0ac0 8093 0000 sts DacOffsetGyroRoll,r24
1091 0ac4 00C0 rjmp .L60
1092 .L56:
1093 0ac6 8091 0000 lds r24,AdValueGyroNick
1094 0aca 9091 0000 lds r25,(AdValueGyroNick)+1
1095 0ace 8750 subi r24,lo8(1031)
1096 0ad0 9440 sbci r25,hi8(1031)
1097 0ad2 04F4 brge .L58
1098 0ad4 11E0 ldi r17,lo8(1)
1099 0ad6 00C0 rjmp .L57
1100 .L84:
1101 0ad8 8AE0 ldi r24,lo8(10)
1102 0ada 90E0 ldi r25,hi8(10)
1103 0adc 0E94 0000 call Delay_ms_Mess
1104 0ae0 0150 subi r16,lo8(-(-1))
1105 0ae2 01F0 breq .+2
1106 0ae4 00C0 rjmp .L75
1107 .L85:
1108 0ae6 86E4 ldi r24,lo8(70)
1109 0ae8 90E0 ldi r25,hi8(70)
1110 0aea 0E94 0000 call Delay_ms_Mess
1111 0aee 00C0 rjmp .L76
1112 .L64:
1113 0af0 1F5F subi r17,lo8(-(1))
1114 0af2 00C0 rjmp .L63
1115 .L61:
1116 0af4 1F5F subi r17,lo8(-(1))
1117 0af6 00C0 rjmp .L60
1118 .L58:
1119 0af8 8091 0000 lds r24,DacOffsetGyroNick
1120 0afc 8F5F subi r24,lo8(-(1))
1121 0afe 8093 0000 sts DacOffsetGyroNick,r24
1122 0b02 10E0 ldi r17,lo8(0)
1123 0b04 00C0 rjmp .L57
1125 .global SearchAirPressureOffset
1127 SearchAirPressureOffset:
1128 0b06 1F93 push r17
1129 0b08 CF93 push r28
1130 0b0a DF93 push r29
1131 /* prologue: function */
1132 /* frame size = 0 */
1133 0b0c 83E0 ldi r24,lo8(3)
1134 0b0e 90E0 ldi r25,hi8(3)
1135 0b10 0E94 0000 call GetParamByte
1136 0b14 182F mov r17,r24
1137 0b16 8531 cpi r24,lo8(21)
1138 0b18 00F0 brlo .L87
1139 0b1a 1A50 subi r17,lo8(-(-10))
1140 .L87:
1141 0b1c 17BD out 71-32,r17
1142 0b1e 1092 0000 sts ExpandBaro,__zero_reg__
1143 0b22 84E6 ldi r24,lo8(100)
1144 0b24 90E0 ldi r25,hi8(100)
1145 0b26 0E94 0000 call Delay_ms_Mess
1146 0b2a 8091 0000 lds r24,AdAirPressure
1147 0b2e 9091 0000 lds r25,(AdAirPressure)+1
1148 0b32 8052 subi r24,lo8(800)
1149 0b34 9340 sbci r25,hi8(800)
1150 0b36 04F0 brlt .+2
1151 0b38 00C0 rjmp .L88
1152 0b3a 10E0 ldi r17,lo8(0)
1153 0b3c C0E0 ldi r28,lo8(__c.1808)
1154 0b3e D0E0 ldi r29,hi8(__c.1808)
1155 0b40 00C0 rjmp .L92
1156 .L94:
1157 0b42 1F5F subi r17,lo8(-(1))
1158 0b44 1A3F cpi r17,lo8(-6)
1159 0b46 00F4 brsh .L90
1160 .L92:
1161 0b48 17BD out 71-32,r17
1162 0b4a 82E3 ldi r24,lo8(50)
1163 0b4c 90E0 ldi r25,hi8(50)
1164 0b4e 0E94 0000 call Delay_ms_Mess
1165 0b52 00D0 rcall .
1166 0b54 0F92 push __tmp_reg__
1167 0b56 EDB7 in r30,__SP_L__
1168 0b58 FEB7 in r31,__SP_H__
1169 0b5a 1182 std Z+1,__zero_reg__
1170 0b5c D383 std Z+3,r29
1171 0b5e C283 std Z+2,r28
1172 0b60 0E94 0000 call _printf_P
1173 0b64 8091 0000 lds r24,AdAirPressure
1174 0b68 9091 0000 lds r25,(AdAirPressure)+1
1175 0b6c 0F90 pop __tmp_reg__
1176 0b6e 0F90 pop __tmp_reg__
1177 0b70 0F90 pop __tmp_reg__
1178 0b72 8052 subi r24,lo8(800)
1179 0b74 9340 sbci r25,hi8(800)
1180 0b76 04F4 brge .L94
1181 .L90:
1182 0b78 83E0 ldi r24,lo8(3)
1183 0b7a 90E0 ldi r25,hi8(3)
1184 0b7c 612F mov r22,r17
1185 0b7e 0E94 0000 call SetParamByte
1186 0b82 1093 0000 sts PressureSensorOffset,r17
1187 0b86 6091 0000 lds r22,AdAirPressure
1188 0b8a 7091 0000 lds r23,(AdAirPressure)+1
1189 0b8e 8827 clr r24
1190 0b90 77FD sbrc r23,7
1191 0b92 8095 com r24
1192 0b94 982F mov r25,r24
1193 0b96 22E1 ldi r18,lo8(18)
1194 0b98 30E0 ldi r19,hi8(18)
1195 0b9a 40E0 ldi r20,hlo8(18)
1196 0b9c 50E0 ldi r21,hhi8(18)
1197 0b9e 0E94 0000 call __mulsi3
1198 0ba2 6093 0000 sts AirPressure,r22
1199 0ba6 7093 0000 sts (AirPressure)+1,r23
1200 0baa 8093 0000 sts (AirPressure)+2,r24
1201 0bae 9093 0000 sts (AirPressure)+3,r25
1202 0bb2 8CE2 ldi r24,lo8(300)
1203 0bb4 91E0 ldi r25,hi8(300)
1204 0bb6 0E94 0000 call Delay_ms_Mess
1205 /* epilogue start */
1206 0bba DF91 pop r29
1207 0bbc CF91 pop r28
1208 0bbe 1F91 pop r17
1209 0bc0 0895 ret
1210 .L88:
1211 0bc2 1A3F cpi r17,lo8(-6)
1212 0bc4 00F4 brsh .L90
1213 0bc6 C0E0 ldi r28,lo8(__c.1808)
1214 0bc8 D0E0 ldi r29,hi8(__c.1808)
1215 0bca 00C0 rjmp .L92
1217 .global Test
1218 .global Test
1219 .section .bss
1222 Test:
1223 0000 0000 .skip 2,0
1224 .global UBat
1225 .data
1228 UBat:
1229 0000 6400 .word 100
1230 .global AdValueGyroNick
1231 .global AdValueGyroNick
1232 .section .bss
1235 AdValueGyroNick:
1236 0002 0000 .skip 2,0
1237 .global AdValueGyroRoll
1238 .global AdValueGyroRoll
1241 AdValueGyroRoll:
1242 0004 0000 .skip 2,0
1243 .global AdValueGyroYaw
1244 .global AdValueGyroYaw
1247 AdValueGyroYaw:
1248 0006 0000 .skip 2,0
1249 .global FilterHiResGyroNick
1250 .global FilterHiResGyroNick
1253 FilterHiResGyroNick:
1254 0008 0000 .skip 2,0
1255 .global FilterHiResGyroRoll
1256 .global FilterHiResGyroRoll
1259 FilterHiResGyroRoll:
1260 000a 0000 .skip 2,0
1261 .global HiResGyroNick
1262 .data
1265 HiResGyroNick:
1266 0002 C409 .word 2500
1267 .global HiResGyroRoll
1270 HiResGyroRoll:
1271 0004 C409 .word 2500
1272 .global AdValueAccRoll
1273 .global AdValueAccRoll
1274 .section .bss
1277 AdValueAccRoll:
1278 000c 0000 .skip 2,0
1279 .global AdValueAccNick
1280 .global AdValueAccNick
1283 AdValueAccNick:
1284 000e 0000 .skip 2,0
1285 .global AdValueAccTop
1286 .global AdValueAccTop
1289 AdValueAccTop:
1290 0010 0000 .skip 2,0
1291 .global AdValueAccZ
1292 .global AdValueAccZ
1295 AdValueAccZ:
1296 0012 0000 .skip 2,0
1297 .global AirPressure
1298 .data
1301 AirPressure:
1302 0006 00 .byte 0
1303 0007 7D .byte 125
1304 0008 00 .byte 0
1305 0009 00 .byte 0
1306 .global AdAirPressure
1309 AdAirPressure:
1310 000a FF03 .word 1023
1311 .global ReadingHeight
1312 .global ReadingHeight
1313 .section .bss
1316 ReadingHeight:
1317 0014 0000 0000 .skip 4,0
1318 .global ReadingVario
1319 .global ReadingVario
1322 ReadingVario:
1323 0018 0000 .skip 2,0
1324 .global SumHeight
1325 .global SumHeight
1328 SumHeight:
1329 001a 0000 0000 .skip 4,0
1330 .global MeasurementCounter
1331 .global MeasurementCounter
1334 MeasurementCounter:
1335 001e 0000 .skip 2,0
1336 .global ADReady
1337 .data
1340 ADReady:
1341 000c 01 .byte 1
1342 .global DacOffsetGyroNick
1345 DacOffsetGyroNick:
1346 000d 73 .byte 115
1347 .global DacOffsetGyroRoll
1350 DacOffsetGyroRoll:
1351 000e 73 .byte 115
1352 .global DacOffsetGyroYaw
1355 DacOffsetGyroYaw:
1356 000f 73 .byte 115
1357 .global GyroDefectNick
1358 .global GyroDefectNick
1359 .section .bss
1362 GyroDefectNick:
1363 0020 00 .skip 1,0
1364 .global GyroDefectRoll
1365 .global GyroDefectRoll
1368 GyroDefectRoll:
1369 0021 00 .skip 1,0
1370 .global GyroDefectYaw
1371 .global GyroDefectYaw
1374 GyroDefectYaw:
1375 0022 00 .skip 1,0
1376 .global ExpandBaro
1377 .global ExpandBaro
1380 ExpandBaro:
1381 0023 00 .skip 1,0
1382 .lcomm AirPressCount.1875,1
1383 .lcomm tmpAirPressure.1874,4
1384 .lcomm filtergyroroll.1873,4
1385 .lcomm filtergyronick.1872,4
1386 .lcomm accnick.1871,2
1387 .lcomm accroll.1870,2
1388 .lcomm gyronick.1869,2
1389 .lcomm gyroroll.1868,2
1390 .lcomm gyroyaw.1867,2
1391 .lcomm state.1866,1
1392 .data
1395 ad_channel.1865:
1396 0010 02 .byte 2
1397 .section .progmem.data,"a",@progbits
1400 __c.1826:
1401 0000 0D0A 2044 .string "\r\n DAC or I2C Error1 check I2C, 3Vref, DAC, and BL-Ctrl"
1401 4143 206F
1401 7220 4932
1401 4320 4572
1401 726F 7231
1404 __c.1808:
1405 0038 2E00 .string "."
1406 .comm StartAirPressure,4,1
1407 .comm PressureSensorOffset,1,1
1408 .global __do_copy_data
1409 .global __do_clear_bss
DEFINED SYMBOLS
*ABS*:00000000 analog.c
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:2 *ABS*:0000003f __SREG__
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:3 *ABS*:0000003e __SP_H__
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:4 *ABS*:0000003d __SP_L__
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:5 *ABS*:00000034 __CCP__
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:6 *ABS*:00000000 __tmp_reg__
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:7 *ABS*:00000001 __zero_reg__
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:11 .text:00000000 ADC_Init
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:50 .text:0000003a __vector_24
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1390 .bss:0000003b state.1866
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1395 .data:00000010 ad_channel.1865
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1387 .bss:00000035 gyronick.1869
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1340 .data:0000000c ADReady
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1334 .bss:0000001e MeasurementCounter
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1309 .data:0000000a AdAirPressure
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1382 .bss:00000025 tmpAirPressure.1874
.bss:00000024 AirPressCount.1875
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1301 .data:00000006 AirPressure
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1380 .bss:00000023 ExpandBaro
*COM*:00000004 StartAirPressure
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1316 .bss:00000014 ReadingHeight
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1328 .bss:0000001a SumHeight
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1322 .bss:00000018 ReadingVario
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1295 .bss:00000012 AdValueAccZ
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1289 .bss:00000010 AdValueAccTop
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1388 .bss:00000037 gyroroll.1868
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1228 .data:00000000 UBat
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1389 .bss:00000039 gyroyaw.1867
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1386 .bss:00000033 accroll.1870
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1385 .bss:00000031 accnick.1871
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1247 .bss:00000006 AdValueGyroYaw
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1277 .bss:0000000c AdValueAccRoll
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1283 .bss:0000000e AdValueAccNick
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1235 .bss:00000002 AdValueGyroNick
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1384 .bss:0000002d filtergyronick.1872
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1265 .data:00000002 HiResGyroNick
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1253 .bss:00000008 FilterHiResGyroNick
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1241 .bss:00000004 AdValueGyroRoll
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1383 .bss:00000029 filtergyroroll.1873
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1270 .data:00000004 HiResGyroRoll
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1259 .bss:0000000a FilterHiResGyroRoll
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:910 .text:00000924 SearchDacGyroOffset
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1362 .bss:00000020 GyroDefectNick
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1368 .bss:00000021 GyroDefectRoll
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1374 .bss:00000022 GyroDefectYaw
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1400 .progmem.data:00000000 __c.1826
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1345 .data:0000000d DacOffsetGyroNick
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1350 .data:0000000e DacOffsetGyroRoll
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1355 .data:0000000f DacOffsetGyroYaw
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1127 .text:00000b06 SearchAirPressureOffset
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1404 .progmem.data:00000038 __c.1808
*COM*:00000001 PressureSensorOffset
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccEia1ik.s:1222 .bss:00000000 Test
UNDEFINED SYMBOLS
__mulsi3
__divmodsi4
AdBiasAccTop
__floatsisf
__subsf3
__fixsfsi
__ltsf2
__addsf3
ModelIsFlying
ReadingIntegralTop
__udivmodhi4
BoardRelease
AdBiasAccRoll
AdBiasAccNick
BiasHiResGyroNick
BiasHiResGyroRoll
__gtsf2
SetDelay
I2C_Start
twi_state
CheckDelay
_printf_P
Delay_ms_Mess
GetParamByte
SetParamByte
__do_copy_data
__do_clear_bss