Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2299 | - | 1 | 1 .file "timer0.c" |
2 | 2 .arch atmega1284p |
||
3 | 3 __SREG__ = 0x3f |
||
4 | 4 __SP_H__ = 0x3e |
||
5 | 5 __SP_L__ = 0x3d |
||
6 | 6 __tmp_reg__ = 0 |
||
7 | 7 __zero_reg__ = 1 |
||
8 | 8 .global __do_copy_data |
||
9 | 9 .global __do_clear_bss |
||
10 | 10 .global ServoRollValue |
||
11 | 11 .global ServoRollValue |
||
12 | 12 .section .bss |
||
13 | 15 ServoRollValue: |
||
14 | 16 0000 0000 .skip 2,0 |
||
15 | 17 .global ServoNickValue |
||
16 | 18 .global ServoNickValue |
||
17 | 21 ServoNickValue: |
||
18 | 22 0002 0000 .skip 2,0 |
||
19 | 23 .global NickServoValue |
||
20 | 24 .data |
||
21 | 27 NickServoValue: |
||
22 | 28 0000 0020 .word 8192 |
||
23 | 29 .global BeepMuster |
||
24 | 32 BeepMuster: |
||
25 | 33 0002 FFFF .word -1 |
||
26 | 34 .global ServoRollOffset |
||
27 | 37 ServoRollOffset: |
||
28 | 38 0004 C01F .word 8128 |
||
29 | 39 .global ServoNickOffset |
||
30 | 42 ServoNickOffset: |
||
31 | 43 0006 C01F .word 8128 |
||
32 | 44 .global RemainingPulse |
||
33 | 45 .global RemainingPulse |
||
34 | 46 .section .bss |
||
35 | 49 RemainingPulse: |
||
36 | 50 0004 0000 .skip 2,0 |
||
37 | 51 .global CalculateServoSignals |
||
38 | 52 .data |
||
39 | 55 CalculateServoSignals: |
||
40 | 56 0008 01 .byte 1 |
||
41 | 57 .global ServoActive |
||
42 | 58 .global ServoActive |
||
43 | 59 .section .bss |
||
44 | 62 ServoActive: |
||
45 | 63 0006 00 .skip 1,0 |
||
46 | 64 .global SendSPI |
||
47 | 65 .global SendSPI |
||
48 | 68 SendSPI: |
||
49 | 69 0007 00 .skip 1,0 |
||
50 | 70 .global beeptime |
||
51 | 71 .global beeptime |
||
52 | 74 beeptime: |
||
53 | 75 0008 0000 .skip 2,0 |
||
54 | 76 .global cntKompass |
||
55 | 77 .global cntKompass |
||
56 | 80 cntKompass: |
||
57 | 81 000a 0000 .skip 2,0 |
||
58 | 82 .global UpdateMotor |
||
59 | 83 .global UpdateMotor |
||
60 | 86 UpdateMotor: |
||
61 | 87 000c 00 .skip 1,0 |
||
62 | 88 .global CountMilliseconds |
||
63 | 89 .global CountMilliseconds |
||
64 | 92 CountMilliseconds: |
||
65 | 93 000d 0000 .skip 2,0 |
||
66 | 94 .data |
||
67 | 97 cnt_1ms.3: |
||
68 | 98 0009 01 .byte 1 |
||
69 | 99 .lcomm cnt.4,1 |
||
70 | 100 .lcomm compass_active.5,1 |
||
71 | 101 .text |
||
72 | 102 .global __vector_18 |
||
73 | 104 __vector_18: |
||
74 | 105 /* prologue: frame size=0 */ |
||
75 | 106 0000 1F92 push __zero_reg__ |
||
76 | 107 0002 0F92 push __tmp_reg__ |
||
77 | 108 0004 0FB6 in __tmp_reg__,__SREG__ |
||
78 | 109 0006 0F92 push __tmp_reg__ |
||
79 | 110 0008 1124 clr __zero_reg__ |
||
80 | 111 000a 2F93 push r18 |
||
81 | 112 000c 3F93 push r19 |
||
82 | 113 000e 5F93 push r21 |
||
83 | 114 0010 6F93 push r22 |
||
84 | 115 0012 7F93 push r23 |
||
85 | 116 0014 8F93 push r24 |
||
86 | 117 0016 9F93 push r25 |
||
87 | 118 0018 AF93 push r26 |
||
88 | 119 001a BF93 push r27 |
||
89 | 120 001c EF93 push r30 |
||
90 | 121 001e FF93 push r31 |
||
91 | 122 /* prologue end (size=16) */ |
||
92 | 123 0020 20E0 ldi r18,lo8(0) |
||
93 | 124 0022 8091 0000 lds r24,SendSPI |
||
94 | 125 0026 8823 tst r24 |
||
95 | 126 0028 01F0 breq .L2 |
||
96 | 127 002a 8091 0000 lds r24,SendSPI |
||
97 | 128 002e 8150 subi r24,lo8(-(-1)) |
||
98 | 129 0030 8093 0000 sts SendSPI,r24 |
||
99 | 130 .L2: |
||
100 | 131 0034 8091 0000 lds r24,SpektrumTimer |
||
101 | 132 0038 8823 tst r24 |
||
102 | 133 003a 01F0 breq .L3 |
||
103 | 134 003c 8150 subi r24,lo8(-(-1)) |
||
104 | 135 003e 8093 0000 sts SpektrumTimer,r24 |
||
105 | 136 .L3: |
||
106 | 137 0042 8091 0000 lds r24,cnt.4 |
||
107 | 138 0046 8150 subi r24,lo8(-(-1)) |
||
108 | 139 0048 8093 0000 sts cnt.4,r24 |
||
109 | 140 004c 8F3F cpi r24,lo8(-1) |
||
110 | 141 004e 01F0 breq .+2 |
||
111 | 142 0050 00C0 rjmp .L4 |
||
112 | 143 0052 89E0 ldi r24,lo8(9) |
||
113 | 144 0054 8093 0000 sts cnt.4,r24 |
||
114 | 145 0058 8091 0000 lds r24,CountMilliseconds |
||
115 | 146 005c 9091 0000 lds r25,(CountMilliseconds)+1 |
||
116 | 147 0060 0196 adiw r24,1 |
||
117 | 148 0062 9093 0000 sts (CountMilliseconds)+1,r25 |
||
118 | 149 0066 8093 0000 sts CountMilliseconds,r24 |
||
119 | 150 006a 8091 0000 lds r24,cnt_1ms.3 |
||
120 | 151 006e 8F5F subi r24,lo8(-(1)) |
||
121 | 152 0070 8170 andi r24,lo8(1) |
||
122 | 153 0072 8093 0000 sts cnt_1ms.3,r24 |
||
123 | 154 0076 8823 tst r24 |
||
124 | 155 0078 01F4 brne .L5 |
||
125 | 156 007a 81E0 ldi r24,lo8(1) |
||
126 | 157 007c 8093 0000 sts UpdateMotor,r24 |
||
127 | 158 .L5: |
||
128 | 159 0080 3499 sbic 38-0x20,4 |
||
129 | 160 0082 00C0 rjmp .L6 |
||
130 | 161 0084 81E0 ldi r24,lo8(1) |
||
131 | 162 0086 8093 0000 sts compass_active.5,r24 |
||
132 | 163 .L6: |
||
133 | 164 008a 8091 0000 lds r24,beeptime |
||
134 | 165 008e 9091 0000 lds r25,(beeptime)+1 |
||
135 | 166 0092 892B or r24,r25 |
||
136 | 167 0094 01F0 breq .L7 |
||
137 | 168 0096 8091 0000 lds r24,beeptime |
||
138 | 169 009a 9091 0000 lds r25,(beeptime)+1 |
||
139 | 170 009e 0B97 sbiw r24,11 |
||
140 | 171 00a0 00F0 brlo .L8 |
||
141 | 172 00a2 8091 0000 lds r24,beeptime |
||
142 | 173 00a6 9091 0000 lds r25,(beeptime)+1 |
||
143 | 174 00aa 0A97 sbiw r24,10 |
||
144 | 175 00ac 9093 0000 sts (beeptime)+1,r25 |
||
145 | 176 00b0 8093 0000 sts beeptime,r24 |
||
146 | 177 00b4 00C0 rjmp .L9 |
||
147 | 178 .L8: |
||
148 | 179 00b6 1092 0000 sts (beeptime)+1,__zero_reg__ |
||
149 | 180 00ba 1092 0000 sts beeptime,__zero_reg__ |
||
150 | 181 .L9: |
||
151 | 182 00be 8091 0000 lds r24,beeptime |
||
152 | 183 00c2 9091 0000 lds r25,(beeptime)+1 |
||
153 | 184 00c6 2091 0000 lds r18,BeepMuster |
||
154 | 185 00ca 3091 0000 lds r19,(BeepMuster)+1 |
||
155 | 186 00ce 8223 and r24,r18 |
||
156 | 187 00d0 9323 and r25,r19 |
||
157 | 188 00d2 892B or r24,r25 |
||
158 | 189 00d4 01F0 breq .L10 |
||
159 | 190 00d6 21E0 ldi r18,lo8(1) |
||
160 | 191 00d8 00C0 rjmp .L12 |
||
161 | 192 .L10: |
||
162 | 193 00da 20E0 ldi r18,lo8(0) |
||
163 | 194 00dc 00C0 rjmp .L12 |
||
164 | 195 .L7: |
||
165 | 196 00de 8FEF ldi r24,lo8(-1) |
||
166 | 197 00e0 9FEF ldi r25,hi8(-1) |
||
167 | 198 00e2 9093 0000 sts (BeepMuster)+1,r25 |
||
168 | 199 00e6 8093 0000 sts BeepMuster,r24 |
||
169 | 200 .L12: |
||
170 | 201 00ea 8091 0000 lds r24,PlatinenVersion |
||
171 | 202 00ee 2223 tst r18 |
||
172 | 203 00f0 01F0 breq .L13 |
||
173 | 204 00f2 8A30 cpi r24,lo8(10) |
||
174 | 205 00f4 01F4 brne .L14 |
||
175 | 206 00f6 5A9A sbi 43-0x20,2 |
||
176 | 207 00f8 00C0 rjmp .L4 |
||
177 | 208 .L14: |
||
178 | 209 00fa 479A sbi 40-0x20,7 |
||
179 | 210 00fc 00C0 rjmp .L4 |
||
180 | 211 .L13: |
||
181 | 212 00fe 8A30 cpi r24,lo8(10) |
||
182 | 213 0100 01F4 brne .L17 |
||
183 | 214 0102 5A98 cbi 43-0x20,2 |
||
184 | 215 0104 00C0 rjmp .L4 |
||
185 | 216 .L17: |
||
186 | 217 0106 4798 cbi 40-0x20,7 |
||
187 | 218 .L4: |
||
188 | 219 0108 8091 0000 lds r24,compass_active.5 |
||
189 | 220 010c 8823 tst r24 |
||
190 | 221 010e 01F4 brne .+2 |
||
191 | 222 0110 00C0 rjmp .L1 |
||
192 | 223 0112 2091 0000 lds r18,NaviDataOkay |
||
193 | 224 0116 2223 tst r18 |
||
194 | 225 0118 01F0 breq .+2 |
||
195 | 226 011a 00C0 rjmp .L1 |
||
196 | 227 011c 8091 0000 lds r24,Parameter_GlobalConfig |
||
197 | 228 0120 83FF sbrs r24,3 |
||
198 | 229 0122 00C0 rjmp .L1 |
||
199 | 230 0124 86B1 in r24,38-0x20 |
||
200 | 231 0126 9927 clr r25 |
||
201 | 232 0128 FC01 movw r30,r24 |
||
202 | 233 012a E071 andi r30,lo8(16) |
||
203 | 234 012c F070 andi r31,hi8(16) |
||
204 | 235 012e 84FF sbrs r24,4 |
||
205 | 236 0130 00C0 rjmp .L20 |
||
206 | 237 0132 8091 0000 lds r24,cntKompass |
||
207 | 238 0136 9091 0000 lds r25,(cntKompass)+1 |
||
208 | 239 013a 0196 adiw r24,1 |
||
209 | 240 013c 9093 0000 sts (cntKompass)+1,r25 |
||
210 | 241 0140 8093 0000 sts cntKompass,r24 |
||
211 | 242 0144 8091 0000 lds r24,cntKompass |
||
212 | 243 0148 9091 0000 lds r25,(cntKompass)+1 |
||
213 | 244 014c 895E subi r24,lo8(1001) |
||
214 | 245 014e 9340 sbci r25,hi8(1001) |
||
215 | 246 0150 00F0 brlo .L1 |
||
216 | 247 0152 2093 0000 sts compass_active.5,r18 |
||
217 | 248 0156 00C0 rjmp .L1 |
||
218 | 249 .L20: |
||
219 | 250 0158 8091 0000 lds r24,cntKompass |
||
220 | 251 015c 9091 0000 lds r25,(cntKompass)+1 |
||
221 | 252 0160 892B or r24,r25 |
||
222 | 253 0162 01F0 breq .L23 |
||
223 | 254 0164 8091 0000 lds r24,cntKompass |
||
224 | 255 0168 9091 0000 lds r25,(cntKompass)+1 |
||
225 | 256 016c 8A56 subi r24,lo8(362) |
||
226 | 257 016e 9140 sbci r25,hi8(362) |
||
227 | 258 0170 00F4 brsh .L23 |
||
228 | 259 0172 8091 0000 lds r24,cntKompass |
||
229 | 260 0176 9091 0000 lds r25,(cntKompass)+1 |
||
230 | 261 017a 69E2 ldi r22,lo8(41) |
||
231 | 262 017c 70E0 ldi r23,hi8(41) |
||
232 | 263 017e 0E94 0000 call __udivmodhi4 |
||
233 | 264 0182 8091 0000 lds r24,cntKompass |
||
234 | 265 0186 9091 0000 lds r25,(cntKompass)+1 |
||
235 | 266 018a 860F add r24,r22 |
||
236 | 267 018c 971F adc r25,r23 |
||
237 | 268 018e 9093 0000 sts (cntKompass)+1,r25 |
||
238 | 269 0192 8093 0000 sts cntKompass,r24 |
||
239 | 270 0196 8091 0000 lds r24,cntKompass |
||
240 | 271 019a 9091 0000 lds r25,(cntKompass)+1 |
||
241 | 272 019e 0B97 sbiw r24,11 |
||
242 | 273 01a0 00F0 brlo .L24 |
||
243 | 274 01a2 8091 0000 lds r24,cntKompass |
||
244 | 275 01a6 9091 0000 lds r25,(cntKompass)+1 |
||
245 | 276 01aa 0A97 sbiw r24,10 |
||
246 | 277 01ac 9093 0000 sts (KompassValue)+1,r25 |
||
247 | 278 01b0 8093 0000 sts KompassValue,r24 |
||
248 | 279 01b4 00C0 rjmp .L23 |
||
249 | 280 .L24: |
||
250 | 281 01b6 F093 0000 sts (KompassValue)+1,r31 |
||
251 | 282 01ba E093 0000 sts KompassValue,r30 |
||
252 | 283 .L23: |
||
253 | 284 01be 1092 0000 sts (cntKompass)+1,__zero_reg__ |
||
254 | 285 01c2 1092 0000 sts cntKompass,__zero_reg__ |
||
255 | 286 .L1: |
||
256 | 287 /* epilogue: frame size=0 */ |
||
257 | 288 01c6 FF91 pop r31 |
||
258 | 289 01c8 EF91 pop r30 |
||
259 | 290 01ca BF91 pop r27 |
||
260 | 291 01cc AF91 pop r26 |
||
261 | 292 01ce 9F91 pop r25 |
||
262 | 293 01d0 8F91 pop r24 |
||
263 | 294 01d2 7F91 pop r23 |
||
264 | 295 01d4 6F91 pop r22 |
||
265 | 296 01d6 5F91 pop r21 |
||
266 | 297 01d8 3F91 pop r19 |
||
267 | 298 01da 2F91 pop r18 |
||
268 | 299 01dc 0F90 pop __tmp_reg__ |
||
269 | 300 01de 0FBE out __SREG__,__tmp_reg__ |
||
270 | 301 01e0 0F90 pop __tmp_reg__ |
||
271 | 302 01e2 1F90 pop __zero_reg__ |
||
272 | 303 01e4 1895 reti |
||
273 | 304 /* epilogue end (size=16) */ |
||
274 | 305 /* function __vector_18 size 247 (215) */ |
||
275 | 307 .global SetDelay |
||
276 | 309 SetDelay: |
||
277 | 310 /* prologue: frame size=0 */ |
||
278 | 311 /* prologue end (size=0) */ |
||
279 | 312 01e6 2091 0000 lds r18,CountMilliseconds |
||
280 | 313 01ea 3091 0000 lds r19,(CountMilliseconds)+1 |
||
281 | 314 01ee 280F add r18,r24 |
||
282 | 315 01f0 391F adc r19,r25 |
||
283 | 316 01f2 C901 movw r24,r18 |
||
284 | 317 01f4 0196 adiw r24,1 |
||
285 | 318 /* epilogue: frame size=0 */ |
||
286 | 319 01f6 0895 ret |
||
287 | 320 /* epilogue end (size=1) */ |
||
288 | 321 /* function SetDelay size 9 (8) */ |
||
289 | 323 .global CheckDelay |
||
290 | 325 CheckDelay: |
||
291 | 326 /* prologue: frame size=0 */ |
||
292 | 327 /* prologue end (size=0) */ |
||
293 | 328 01f8 2091 0000 lds r18,CountMilliseconds |
||
294 | 329 01fc 3091 0000 lds r19,(CountMilliseconds)+1 |
||
295 | 330 0200 821B sub r24,r18 |
||
296 | 331 0202 930B sbc r25,r19 |
||
297 | 332 0204 892F mov r24,r25 |
||
298 | 333 0206 9927 clr r25 |
||
299 | 334 0208 8695 lsr r24 |
||
300 | 335 020a 8074 andi r24,lo8(64) |
||
301 | 336 020c 9070 andi r25,hi8(64) |
||
302 | 337 /* epilogue: frame size=0 */ |
||
303 | 338 020e 0895 ret |
||
304 | 339 /* epilogue end (size=1) */ |
||
305 | 340 /* function CheckDelay size 12 (11) */ |
||
306 | 342 .global Delay_ms |
||
307 | 344 Delay_ms: |
||
308 | 345 /* prologue: frame size=0 */ |
||
309 | 346 0210 CF93 push r28 |
||
310 | 347 0212 DF93 push r29 |
||
311 | 348 /* prologue end (size=2) */ |
||
312 | 349 0214 0E94 0000 call SetDelay |
||
313 | 350 0218 EC01 movw r28,r24 |
||
314 | 351 .L29: |
||
315 | 352 021a CE01 movw r24,r28 |
||
316 | 353 021c 0E94 0000 call CheckDelay |
||
317 | 354 0220 8823 tst r24 |
||
318 | 355 0222 01F0 breq .L29 |
||
319 | 356 /* epilogue: frame size=0 */ |
||
320 | 357 0224 DF91 pop r29 |
||
321 | 358 0226 CF91 pop r28 |
||
322 | 359 0228 0895 ret |
||
323 | 360 /* epilogue end (size=3) */ |
||
324 | 361 /* function Delay_ms size 13 (8) */ |
||
325 | 363 .global Delay_ms_Mess |
||
326 | 365 Delay_ms_Mess: |
||
327 | 366 /* prologue: frame size=0 */ |
||
328 | 367 022a CF93 push r28 |
||
329 | 368 022c DF93 push r29 |
||
330 | 369 /* prologue end (size=2) */ |
||
331 | 370 022e 0E94 0000 call SetDelay |
||
332 | 371 0232 EC01 movw r28,r24 |
||
333 | 372 0234 00C0 rjmp .L40 |
||
334 | 373 .L36: |
||
335 | 374 0236 8091 0000 lds r24,AdReady |
||
336 | 375 023a 8823 tst r24 |
||
337 | 376 023c 01F0 breq .L40 |
||
338 | 377 023e 9093 0000 sts AdReady,r25 |
||
339 | 378 0242 8FEC ldi r24,lo8(-49) |
||
340 | 379 0244 8093 7A00 sts 122,r24 |
||
341 | 380 .L40: |
||
342 | 381 0248 CE01 movw r24,r28 |
||
343 | 382 024a 0E94 0000 call CheckDelay |
||
344 | 383 024e 982F mov r25,r24 |
||
345 | 384 0250 8823 tst r24 |
||
346 | 385 0252 01F0 breq .L36 |
||
347 | 386 /* epilogue: frame size=0 */ |
||
348 | 387 0254 DF91 pop r29 |
||
349 | 388 0256 CF91 pop r28 |
||
350 | 389 0258 0895 ret |
||
351 | 390 /* epilogue end (size=3) */ |
||
352 | 391 /* function Delay_ms_Mess size 24 (19) */ |
||
353 | 393 .global TIMER2_Init |
||
354 | 395 TIMER2_Init: |
||
355 | 396 /* prologue: frame size=0 */ |
||
356 | 397 /* prologue end (size=0) */ |
||
357 | 398 025a 9FB7 in r25,95-0x20 |
||
358 | 399 /* #APP */ |
||
359 | 400 025c F894 cli |
||
360 | 401 /* #NOAPP */ |
||
361 | 402 025e 5F98 cbi 43-0x20,7 |
||
362 | 403 0260 3E9A sbi 39-0x20,6 |
||
363 | 404 0262 469A sbi 40-0x20,6 |
||
364 | 405 0264 8091 B000 lds r24,176 |
||
365 | 406 0268 8F70 andi r24,lo8(15) |
||
366 | 407 026a 8093 B000 sts 176,r24 |
||
367 | 408 026e 8091 B000 lds r24,176 |
||
368 | 409 0272 8360 ori r24,lo8(3) |
||
369 | 410 0274 8093 B000 sts 176,r24 |
||
370 | 411 0278 8091 B100 lds r24,177 |
||
371 | 412 027c 8B73 andi r24,lo8(59) |
||
372 | 413 027e 8093 B100 sts 177,r24 |
||
373 | 414 0282 8091 B100 lds r24,177 |
||
374 | 415 0286 8B60 ori r24,lo8(11) |
||
375 | 416 0288 8093 B100 sts 177,r24 |
||
376 | 417 028c 1092 B200 sts 178,__zero_reg__ |
||
377 | 418 0290 8FEF ldi r24,lo8(-1) |
||
378 | 419 0292 8093 B300 sts 179,r24 |
||
379 | 420 0296 8091 B000 lds r24,176 |
||
380 | 421 029a 8068 ori r24,lo8(-128) |
||
381 | 422 029c 8093 B000 sts 176,r24 |
||
382 | 423 02a0 8091 7000 lds r24,112 |
||
383 | 424 02a4 8A7F andi r24,lo8(-6) |
||
384 | 425 02a6 8093 7000 sts 112,r24 |
||
385 | 426 02aa 8091 7000 lds r24,112 |
||
386 | 427 02ae 8260 ori r24,lo8(2) |
||
387 | 428 02b0 8093 7000 sts 112,r24 |
||
388 | 429 02b4 9FBF out 95-0x20,r25 |
||
389 | 430 /* epilogue: frame size=0 */ |
||
390 | 431 02b6 0895 ret |
||
391 | 432 /* epilogue end (size=1) */ |
||
392 | 433 /* function TIMER2_Init size 48 (47) */ |
||
393 | 435 .global Timer_Init |
||
394 | 437 Timer_Init: |
||
395 | 438 /* prologue: frame size=0 */ |
||
396 | 439 /* prologue end (size=0) */ |
||
397 | 440 02b8 8AE0 ldi r24,lo8(10) |
||
398 | 441 02ba 90E0 ldi r25,hi8(10) |
||
399 | 442 02bc 0E94 0000 call SetDelay |
||
400 | 443 02c0 9093 0000 sts (tim_main)+1,r25 |
||
401 | 444 02c4 8093 0000 sts tim_main,r24 |
||
402 | 445 02c8 82E0 ldi r24,lo8(2) |
||
403 | 446 02ca 85BD out 69-0x20,r24 |
||
404 | 447 02cc 83EA ldi r24,lo8(-93) |
||
405 | 448 02ce 84BD out 68-0x20,r24 |
||
406 | 449 02d0 17BC out 71-0x20,__zero_reg__ |
||
407 | 450 02d2 84EB ldi r24,lo8(-76) |
||
408 | 451 02d4 88BD out 72-0x20,r24 |
||
409 | 452 02d6 86E0 ldi r24,lo8(6) |
||
410 | 453 02d8 86BD out 70-0x20,r24 |
||
411 | 454 02da 8091 6E00 lds r24,110 |
||
412 | 455 02de 8160 ori r24,lo8(1) |
||
413 | 456 02e0 8093 6E00 sts 110,r24 |
||
414 | 457 /* epilogue: frame size=0 */ |
||
415 | 458 02e4 0895 ret |
||
416 | 459 /* epilogue end (size=1) */ |
||
417 | 460 /* function Timer_Init size 23 (22) */ |
||
418 | 462 .global CalcNickServoValue |
||
419 | 464 CalcNickServoValue: |
||
420 | 465 /* prologue: frame size=0 */ |
||
421 | 466 /* prologue end (size=0) */ |
||
422 | 467 02e6 8091 0000 lds r24,EE_Parameter+109 |
||
423 | 468 02ea 2091 0000 lds r18,Parameter_ServoNickControl |
||
424 | 469 02ee 82FF sbrs r24,2 |
||
425 | 470 02f0 00C0 rjmp .L44 |
||
426 | 471 02f2 9091 0000 lds r25,EE_Parameter+48 |
||
427 | 472 02f6 8CE3 ldi r24,lo8(60) |
||
428 | 473 02f8 989F mul r25,r24 |
||
429 | 474 02fa B001 movw r22,r0 |
||
430 | 475 02fc 1124 clr r1 |
||
431 | 476 02fe 9091 0000 lds r25,EE_Parameter+47 |
||
432 | 477 0302 80E5 ldi r24,lo8(80) |
||
433 | 478 0304 989F mul r25,r24 |
||
434 | 479 0306 A001 movw r20,r0 |
||
435 | 480 0308 1124 clr r1 |
||
436 | 481 030a 922F mov r25,r18 |
||
437 | 482 030c 9058 subi r25,lo8(-(-128)) |
||
438 | 483 030e 97FD sbrc r25,7 |
||
439 | 484 0310 9D5F subi r25,lo8(-(3)) |
||
440 | 485 .L45: |
||
441 | 486 0312 9595 asr r25 |
||
442 | 487 0314 9595 asr r25 |
||
443 | 488 0316 86E0 ldi r24,lo8(6) |
||
444 | 489 0318 9802 muls r25,r24 |
||
445 | 490 031a C001 movw r24,r0 |
||
446 | 491 031c 1124 clr r1 |
||
447 | 492 031e 2091 0000 lds r18,NickServoValue |
||
448 | 493 0322 3091 0000 lds r19,(NickServoValue)+1 |
||
449 | 494 0326 281B sub r18,r24 |
||
450 | 495 0328 390B sbc r19,r25 |
||
451 | 496 032a 3093 0000 sts (NickServoValue)+1,r19 |
||
452 | 497 032e 2093 0000 sts NickServoValue,r18 |
||
453 | 498 0332 4217 cp r20,r18 |
||
454 | 499 0334 5307 cpc r21,r19 |
||
455 | 500 0336 04F0 brlt .L46 |
||
456 | 501 0338 5093 0000 sts (NickServoValue)+1,r21 |
||
457 | 502 033c 4093 0000 sts NickServoValue,r20 |
||
458 | 503 0340 0895 ret |
||
459 | 504 .L46: |
||
460 | 505 0342 2617 cp r18,r22 |
||
461 | 506 0344 3707 cpc r19,r23 |
||
462 | 507 0346 04F0 brlt .L43 |
||
463 | 508 0348 7093 0000 sts (NickServoValue)+1,r23 |
||
464 | 509 034c 6093 0000 sts NickServoValue,r22 |
||
465 | 510 0350 0895 ret |
||
466 | 511 .L44: |
||
467 | 512 0352 822F mov r24,r18 |
||
468 | 513 0354 9927 clr r25 |
||
469 | 514 0356 36E0 ldi r19,6 |
||
470 | 515 0358 880F 1: lsl r24 |
||
471 | 516 035a 991F rol r25 |
||
472 | 517 035c 3A95 dec r19 |
||
473 | 518 035e 01F4 brne 1b |
||
474 | 519 0360 9093 0000 sts (NickServoValue)+1,r25 |
||
475 | 520 0364 8093 0000 sts NickServoValue,r24 |
||
476 | 521 .L43: |
||
477 | 522 0368 0895 ret |
||
478 | 523 /* epilogue: frame size=0 */ |
||
479 | 524 /* epilogue: noreturn */ |
||
480 | 525 /* epilogue end (size=0) */ |
||
481 | 526 /* function CalcNickServoValue size 67 (67) */ |
||
482 | 528 .global CalculateServo |
||
483 | 530 CalculateServo: |
||
484 | 531 /* prologue: frame size=0 */ |
||
485 | 532 036a A0E0 ldi r26,lo8(0) |
||
486 | 533 036c B0E0 ldi r27,hi8(0) |
||
487 | 534 036e E0E0 ldi r30,pm_lo8(1f) |
||
488 | 535 0370 F0E0 ldi r31,pm_hi8(1f) |
||
489 | 536 0372 0C94 0000 jmp __prologue_saves__+22 |
||
490 | 537 1: |
||
491 | 538 /* prologue end (size=6) */ |
||
492 | 539 0376 8091 0000 lds r24,EE_Parameter+55 |
||
493 | 540 037a E82F mov r30,r24 |
||
494 | 541 037c FF27 clr r31 |
||
495 | 542 037e E050 subi r30,lo8(-(sintab)) |
||
496 | 543 0380 F040 sbci r31,hi8(-(sintab)) |
||
497 | 544 0382 9681 ldd r25,Z+6 |
||
498 | 545 0384 D080 ld r13,Z |
||
499 | 546 0386 8091 0000 lds r24,CalculateServoSignals |
||
500 | 547 038a A92F mov r26,r25 |
||
501 | 548 038c BB27 clr r27 |
||
502 | 549 038e A7FD sbrc r26,7 |
||
503 | 550 0390 B095 com r27 |
||
504 | 551 0392 CB2F mov r28,r27 |
||
505 | 552 0394 DB2F mov r29,r27 |
||
506 | 553 0396 8130 cpi r24,lo8(1) |
||
507 | 554 0398 01F0 breq .+2 |
||
508 | 555 039a 00C0 rjmp .L51 |
||
509 | 556 039c 2091 0000 lds r18,IntegralNick |
||
510 | 557 03a0 3091 0000 lds r19,(IntegralNick)+1 |
||
511 | 558 03a4 4091 0000 lds r20,(IntegralNick)+2 |
||
512 | 559 03a8 5091 0000 lds r21,(IntegralNick)+3 |
||
513 | 560 03ac BD01 movw r22,r26 |
||
514 | 561 03ae CE01 movw r24,r28 |
||
515 | 562 03b0 0E94 0000 call __mulsi3 |
||
516 | 563 03b4 97FF sbrs r25,7 |
||
517 | 564 03b6 00C0 rjmp .L52 |
||
518 | 565 03b8 6158 subi r22,lo8(-(127)) |
||
519 | 566 03ba 7F4F sbci r23,hi8(-(127)) |
||
520 | 567 03bc 8F4F sbci r24,hlo8(-(127)) |
||
521 | 568 03be 9F4F sbci r25,hhi8(-(127)) |
||
522 | 569 .L52: |
||
523 | 570 03c0 7B01 movw r14,r22 |
||
524 | 571 03c2 8C01 movw r16,r24 |
||
525 | 572 03c4 C7E0 ldi r28,7 |
||
526 | 573 03c6 1595 1: asr r17 |
||
527 | 574 03c8 0795 ror r16 |
||
528 | 575 03ca F794 ror r15 |
||
529 | 576 03cc E794 ror r14 |
||
530 | 577 03ce CA95 dec r28 |
||
531 | 578 03d0 01F4 brne 1b |
||
532 | 579 03d2 8D2D mov r24,r13 |
||
533 | 580 03d4 9927 clr r25 |
||
534 | 581 03d6 87FD sbrc r24,7 |
||
535 | 582 03d8 9095 com r25 |
||
536 | 583 03da A92F mov r26,r25 |
||
537 | 584 03dc B92F mov r27,r25 |
||
538 | 585 03de 2091 0000 lds r18,IntegralRoll |
||
539 | 586 03e2 3091 0000 lds r19,(IntegralRoll)+1 |
||
540 | 587 03e6 4091 0000 lds r20,(IntegralRoll)+2 |
||
541 | 588 03ea 5091 0000 lds r21,(IntegralRoll)+3 |
||
542 | 589 03ee BC01 movw r22,r24 |
||
543 | 590 03f0 CD01 movw r24,r26 |
||
544 | 591 03f2 0E94 0000 call __mulsi3 |
||
545 | 592 03f6 97FF sbrs r25,7 |
||
546 | 593 03f8 00C0 rjmp .L53 |
||
547 | 594 03fa 6158 subi r22,lo8(-(127)) |
||
548 | 595 03fc 7F4F sbci r23,hi8(-(127)) |
||
549 | 596 03fe 8F4F sbci r24,hlo8(-(127)) |
||
550 | 597 0400 9F4F sbci r25,hhi8(-(127)) |
||
551 | 598 .L53: |
||
552 | 599 0402 B7E0 ldi r27,7 |
||
553 | 600 0404 9595 1: asr r25 |
||
554 | 601 0406 8795 ror r24 |
||
555 | 602 0408 7795 ror r23 |
||
556 | 603 040a 6795 ror r22 |
||
557 | 604 040c BA95 dec r27 |
||
558 | 605 040e 01F4 brne 1b |
||
559 | 606 0410 F801 movw r30,r16 |
||
560 | 607 0412 E701 movw r28,r14 |
||
561 | 608 0414 C61B sub r28,r22 |
||
562 | 609 0416 D70B sbc r29,r23 |
||
563 | 610 0418 E80B sbc r30,r24 |
||
564 | 611 041a F90B sbc r31,r25 |
||
565 | 612 041c 2091 0000 lds r18,POI_KameraNick |
||
566 | 613 0420 3091 0000 lds r19,(POI_KameraNick)+1 |
||
567 | 614 0424 C901 movw r24,r18 |
||
568 | 615 0426 A3E0 ldi r26,3 |
||
569 | 616 0428 880F 1: lsl r24 |
||
570 | 617 042a 991F rol r25 |
||
571 | 618 042c AA95 dec r26 |
||
572 | 619 042e 01F4 brne 1b |
||
573 | 620 0430 821B sub r24,r18 |
||
574 | 621 0432 930B sbc r25,r19 |
||
575 | 622 0434 AA27 clr r26 |
||
576 | 623 0436 97FD sbrc r25,7 |
||
577 | 624 0438 A095 com r26 |
||
578 | 625 043a BA2F mov r27,r26 |
||
579 | 626 043c C81B sub r28,r24 |
||
580 | 627 043e D90B sbc r29,r25 |
||
581 | 628 0440 EA0B sbc r30,r26 |
||
582 | 629 0442 FB0B sbc r31,r27 |
||
583 | 630 0444 8091 0000 lds r24,Parameter_ServoNickComp |
||
584 | 631 0448 9927 clr r25 |
||
585 | 632 044a AA27 clr r26 |
||
586 | 633 044c BB27 clr r27 |
||
587 | 634 044e BC01 movw r22,r24 |
||
588 | 635 0450 CD01 movw r24,r26 |
||
589 | 636 0452 9E01 movw r18,r28 |
||
590 | 637 0454 AF01 movw r20,r30 |
||
591 | 638 0456 0E94 0000 call __mulsi3 |
||
592 | 639 045a 97FF sbrs r25,7 |
||
593 | 640 045c 00C0 rjmp .L54 |
||
594 | 641 045e 6150 subi r22,lo8(-(511)) |
||
595 | 642 0460 7E4F sbci r23,hi8(-(511)) |
||
596 | 643 0462 8F4F sbci r24,hlo8(-(511)) |
||
597 | 644 0464 9F4F sbci r25,hhi8(-(511)) |
||
598 | 645 .L54: |
||
599 | 646 0466 FC01 movw r30,r24 |
||
600 | 647 0468 EB01 movw r28,r22 |
||
601 | 648 046a 79E0 ldi r23,9 |
||
602 | 649 046c F595 1: asr r31 |
||
603 | 650 046e E795 ror r30 |
||
604 | 651 0470 D795 ror r29 |
||
605 | 652 0472 C795 ror r28 |
||
606 | 653 0474 7A95 dec r23 |
||
607 | 654 0476 01F4 brne 1b |
||
608 | 655 0478 1091 0000 lds r17,EE_Parameter+109 |
||
609 | 656 047c 6091 0000 lds r22,NickServoValue |
||
610 | 657 0480 7091 0000 lds r23,(NickServoValue)+1 |
||
611 | 658 0484 12FF sbrs r17,2 |
||
612 | 659 0486 00C0 rjmp .L55 |
||
613 | 660 0488 7093 0000 sts (ServoNickOffset)+1,r23 |
||
614 | 661 048c 6093 0000 sts ServoNickOffset,r22 |
||
615 | 662 0490 00C0 rjmp .L56 |
||
616 | 663 .L55: |
||
617 | 664 0492 4091 0000 lds r20,ServoNickOffset |
||
618 | 665 0496 5091 0000 lds r21,(ServoNickOffset)+1 |
||
619 | 666 049a 8091 0000 lds r24,EE_Parameter+54 |
||
620 | 667 049e 282F mov r18,r24 |
||
621 | 668 04a0 3327 clr r19 |
||
622 | 669 04a2 CB01 movw r24,r22 |
||
623 | 670 04a4 841B sub r24,r20 |
||
624 | 671 04a6 950B sbc r25,r21 |
||
625 | 672 04a8 B901 movw r22,r18 |
||
626 | 673 04aa 0E94 0000 call __divmodhi4 |
||
627 | 674 04ae 8091 0000 lds r24,ServoNickOffset |
||
628 | 675 04b2 9091 0000 lds r25,(ServoNickOffset)+1 |
||
629 | 676 04b6 860F add r24,r22 |
||
630 | 677 04b8 971F adc r25,r23 |
||
631 | 678 04ba 9093 0000 sts (ServoNickOffset)+1,r25 |
||
632 | 679 04be 8093 0000 sts ServoNickOffset,r24 |
||
633 | 680 .L56: |
||
634 | 681 04c2 10FF sbrs r17,0 |
||
635 | 682 04c4 00C0 rjmp .L57 |
||
636 | 683 04c6 8091 0000 lds r24,ServoNickOffset |
||
637 | 684 04ca 9091 0000 lds r25,(ServoNickOffset)+1 |
||
638 | 685 04ce 97FD sbrc r25,7 |
||
639 | 686 04d0 0F96 adiw r24,15 |
||
640 | 687 .L58: |
||
641 | 688 04d2 64E0 ldi r22,4 |
||
642 | 689 04d4 9595 1: asr r25 |
||
643 | 690 04d6 8795 ror r24 |
||
644 | 691 04d8 6A95 dec r22 |
||
645 | 692 04da 01F4 brne 1b |
||
646 | 693 04dc AA27 clr r26 |
||
647 | 694 04de 97FD sbrc r25,7 |
||
648 | 695 04e0 A095 com r26 |
||
649 | 696 04e2 BA2F mov r27,r26 |
||
650 | 697 04e4 C80F add r28,r24 |
||
651 | 698 04e6 D91F adc r29,r25 |
||
652 | 699 04e8 EA1F adc r30,r26 |
||
653 | 700 04ea FB1F adc r31,r27 |
||
654 | 701 04ec 00C0 rjmp .L59 |
||
655 | 702 .L57: |
||
656 | 703 04ee 8091 0000 lds r24,ServoNickOffset |
||
657 | 704 04f2 9091 0000 lds r25,(ServoNickOffset)+1 |
||
658 | 705 04f6 97FD sbrc r25,7 |
||
659 | 706 04f8 0F96 adiw r24,15 |
||
660 | 707 .L60: |
||
661 | 708 04fa 54E0 ldi r21,4 |
||
662 | 709 04fc 9595 1: asr r25 |
||
663 | 710 04fe 8795 ror r24 |
||
664 | 711 0500 5A95 dec r21 |
||
665 | 712 0502 01F4 brne 1b |
||
666 | 713 0504 AA27 clr r26 |
||
667 | 714 0506 97FD sbrc r25,7 |
||
668 | 715 0508 A095 com r26 |
||
669 | 716 050a BA2F mov r27,r26 |
||
670 | 717 050c 8C1B sub r24,r28 |
||
671 | 718 050e 9D0B sbc r25,r29 |
||
672 | 719 0510 AE0B sbc r26,r30 |
||
673 | 720 0512 BF0B sbc r27,r31 |
||
674 | 721 0514 FD01 movw r30,r26 |
||
675 | 722 0516 EC01 movw r28,r24 |
||
676 | 723 .L59: |
||
677 | 724 0518 2091 0000 lds r18,EE_Parameter+106 |
||
678 | 725 051c 2223 tst r18 |
||
679 | 726 051e 01F0 breq .L61 |
||
680 | 727 0520 3327 clr r19 |
||
681 | 728 0522 8091 0000 lds r24,ServoNickValue |
||
682 | 729 0526 9091 0000 lds r25,(ServoNickValue)+1 |
||
683 | 730 052a 829F mul r24,r18 |
||
684 | 731 052c A001 movw r20,r0 |
||
685 | 732 052e 839F mul r24,r19 |
||
686 | 733 0530 500D add r21,r0 |
||
687 | 734 0532 929F mul r25,r18 |
||
688 | 735 0534 500D add r21,r0 |
||
689 | 736 0536 1124 clr r1 |
||
690 | 737 0538 CA01 movw r24,r20 |
||
691 | 738 053a AA27 clr r26 |
||
692 | 739 053c 97FD sbrc r25,7 |
||
693 | 740 053e A095 com r26 |
||
694 | 741 0540 BA2F mov r27,r26 |
||
695 | 742 0542 8C0F add r24,r28 |
||
696 | 743 0544 9D1F adc r25,r29 |
||
697 | 744 0546 AE1F adc r26,r30 |
||
698 | 745 0548 BF1F adc r27,r31 |
||
699 | 746 054a 2F5F subi r18,lo8(-(1)) |
||
700 | 747 054c 3F4F sbci r19,hi8(-(1)) |
||
701 | 748 054e 4427 clr r20 |
||
702 | 749 0550 37FD sbrc r19,7 |
||
703 | 750 0552 4095 com r20 |
||
704 | 751 0554 542F mov r21,r20 |
||
705 | 752 0556 BC01 movw r22,r24 |
||
706 | 753 0558 CD01 movw r24,r26 |
||
707 | 754 055a 0E94 0000 call __divmodsi4 |
||
708 | 755 055e 3093 0000 sts (ServoNickValue)+1,r19 |
||
709 | 756 0562 2093 0000 sts ServoNickValue,r18 |
||
710 | 757 0566 00C0 rjmp .L62 |
||
711 | 758 .L61: |
||
712 | 759 0568 D093 0000 sts (ServoNickValue)+1,r29 |
||
713 | 760 056c C093 0000 sts ServoNickValue,r28 |
||
714 | 761 .L62: |
||
715 | 762 0570 8091 0000 lds r24,EE_Parameter+47 |
||
716 | 763 0574 282F mov r18,r24 |
||
717 | 764 0576 3327 clr r19 |
||
718 | 765 0578 220F lsl r18 |
||
719 | 766 057a 331F rol r19 |
||
720 | 767 057c 220F lsl r18 |
||
721 | 768 057e 331F rol r19 |
||
722 | 769 0580 8091 0000 lds r24,ServoNickValue |
||
723 | 770 0584 9091 0000 lds r25,(ServoNickValue)+1 |
||
724 | 771 0588 8217 cp r24,r18 |
||
725 | 772 058a 9307 cpc r25,r19 |
||
726 | 773 058c 04F0 brlt .L81 |
||
727 | 774 058e 8091 0000 lds r24,EE_Parameter+48 |
||
728 | 775 0592 282F mov r18,r24 |
||
729 | 776 0594 3327 clr r19 |
||
730 | 777 0596 220F lsl r18 |
||
731 | 778 0598 331F rol r19 |
||
732 | 779 059a 220F lsl r18 |
||
733 | 780 059c 331F rol r19 |
||
734 | 781 059e 8091 0000 lds r24,ServoNickValue |
||
735 | 782 05a2 9091 0000 lds r25,(ServoNickValue)+1 |
||
736 | 783 05a6 2817 cp r18,r24 |
||
737 | 784 05a8 3907 cpc r19,r25 |
||
738 | 785 05aa 04F4 brge .L64 |
||
739 | 786 .L81: |
||
740 | 787 05ac 3093 0000 sts (ServoNickValue)+1,r19 |
||
741 | 788 05b0 2093 0000 sts ServoNickValue,r18 |
||
742 | 789 .L64: |
||
743 | 790 05b4 8091 0000 lds r24,PlatinenVersion |
||
744 | 791 05b8 8431 cpi r24,lo8(20) |
||
745 | 792 05ba 00F4 brsh .+2 |
||
746 | 793 05bc 00C0 rjmp .L79 |
||
747 | 794 05be 8091 0000 lds r24,CalculateServoSignals |
||
748 | 795 05c2 8F5F subi r24,lo8(-(1)) |
||
749 | 796 05c4 8093 0000 sts CalculateServoSignals,r24 |
||
750 | 797 05c8 00C0 rjmp .L50 |
||
751 | 798 .L51: |
||
752 | 799 05ca 2091 0000 lds r18,IntegralRoll |
||
753 | 800 05ce 3091 0000 lds r19,(IntegralRoll)+1 |
||
754 | 801 05d2 4091 0000 lds r20,(IntegralRoll)+2 |
||
755 | 802 05d6 5091 0000 lds r21,(IntegralRoll)+3 |
||
756 | 803 05da BD01 movw r22,r26 |
||
757 | 804 05dc CE01 movw r24,r28 |
||
758 | 805 05de 0E94 0000 call __mulsi3 |
||
759 | 806 05e2 97FF sbrs r25,7 |
||
760 | 807 05e4 00C0 rjmp .L69 |
||
761 | 808 05e6 6158 subi r22,lo8(-(127)) |
||
762 | 809 05e8 7F4F sbci r23,hi8(-(127)) |
||
763 | 810 05ea 8F4F sbci r24,hlo8(-(127)) |
||
764 | 811 05ec 9F4F sbci r25,hhi8(-(127)) |
||
765 | 812 .L69: |
||
766 | 813 05ee 7B01 movw r14,r22 |
||
767 | 814 05f0 8C01 movw r16,r24 |
||
768 | 815 05f2 87E0 ldi r24,7 |
||
769 | 816 05f4 1595 1: asr r17 |
||
770 | 817 05f6 0795 ror r16 |
||
771 | 818 05f8 F794 ror r15 |
||
772 | 819 05fa E794 ror r14 |
||
773 | 820 05fc 8A95 dec r24 |
||
774 | 821 05fe 01F4 brne 1b |
||
775 | 822 0600 8D2D mov r24,r13 |
||
776 | 823 0602 9927 clr r25 |
||
777 | 824 0604 87FD sbrc r24,7 |
||
778 | 825 0606 9095 com r25 |
||
779 | 826 0608 A92F mov r26,r25 |
||
780 | 827 060a B92F mov r27,r25 |
||
781 | 828 060c 2091 0000 lds r18,IntegralNick |
||
782 | 829 0610 3091 0000 lds r19,(IntegralNick)+1 |
||
783 | 830 0614 4091 0000 lds r20,(IntegralNick)+2 |
||
784 | 831 0618 5091 0000 lds r21,(IntegralNick)+3 |
||
785 | 832 061c BC01 movw r22,r24 |
||
786 | 833 061e CD01 movw r24,r26 |
||
787 | 834 0620 0E94 0000 call __mulsi3 |
||
788 | 835 0624 9B01 movw r18,r22 |
||
789 | 836 0626 AC01 movw r20,r24 |
||
790 | 837 0628 97FF sbrs r25,7 |
||
791 | 838 062a 00C0 rjmp .L70 |
||
792 | 839 062c 2158 subi r18,lo8(-(127)) |
||
793 | 840 062e 3F4F sbci r19,hi8(-(127)) |
||
794 | 841 0630 4F4F sbci r20,hlo8(-(127)) |
||
795 | 842 0632 5F4F sbci r21,hhi8(-(127)) |
||
796 | 843 .L70: |
||
797 | 844 0634 C7E0 ldi r28,7 |
||
798 | 845 0636 5595 1: asr r21 |
||
799 | 846 0638 4795 ror r20 |
||
800 | 847 063a 3795 ror r19 |
||
801 | 848 063c 2795 ror r18 |
||
802 | 849 063e CA95 dec r28 |
||
803 | 850 0640 01F4 brne 1b |
||
804 | 851 0642 2E0D add r18,r14 |
||
805 | 852 0644 3F1D adc r19,r15 |
||
806 | 853 0646 401F adc r20,r16 |
||
807 | 854 0648 511F adc r21,r17 |
||
808 | 855 064a 8091 0000 lds r24,Parameter_ServoRollComp |
||
809 | 856 064e 9927 clr r25 |
||
810 | 857 0650 AA27 clr r26 |
||
811 | 858 0652 BB27 clr r27 |
||
812 | 859 0654 BC01 movw r22,r24 |
||
813 | 860 0656 CD01 movw r24,r26 |
||
814 | 861 0658 0E94 0000 call __mulsi3 |
||
815 | 862 065c 97FF sbrs r25,7 |
||
816 | 863 065e 00C0 rjmp .L71 |
||
817 | 864 0660 6150 subi r22,lo8(-(511)) |
||
818 | 865 0662 7E4F sbci r23,hi8(-(511)) |
||
819 | 866 0664 8F4F sbci r24,hlo8(-(511)) |
||
820 | 867 0666 9F4F sbci r25,hhi8(-(511)) |
||
821 | 868 .L71: |
||
822 | 869 0668 FC01 movw r30,r24 |
||
823 | 870 066a EB01 movw r28,r22 |
||
824 | 871 066c B9E0 ldi r27,9 |
||
825 | 872 066e F595 1: asr r31 |
||
826 | 873 0670 E795 ror r30 |
||
827 | 874 0672 D795 ror r29 |
||
828 | 875 0674 C795 ror r28 |
||
829 | 876 0676 BA95 dec r27 |
||
830 | 877 0678 01F4 brne 1b |
||
831 | 878 067a 8091 0000 lds r24,Parameter_ServoRollControl |
||
832 | 879 067e 9927 clr r25 |
||
833 | 880 0680 A6E0 ldi r26,6 |
||
834 | 881 0682 880F 1: lsl r24 |
||
835 | 882 0684 991F rol r25 |
||
836 | 883 0686 AA95 dec r26 |
||
837 | 884 0688 01F4 brne 1b |
||
838 | 885 068a 4091 0000 lds r20,ServoRollOffset |
||
839 | 886 068e 5091 0000 lds r21,(ServoRollOffset)+1 |
||
840 | 887 0692 2091 0000 lds r18,EE_Parameter+54 |
||
841 | 888 0696 3327 clr r19 |
||
842 | 889 0698 841B sub r24,r20 |
||
843 | 890 069a 950B sbc r25,r21 |
||
844 | 891 069c B901 movw r22,r18 |
||
845 | 892 069e 0E94 0000 call __divmodhi4 |
||
846 | 893 06a2 8091 0000 lds r24,ServoRollOffset |
||
847 | 894 06a6 9091 0000 lds r25,(ServoRollOffset)+1 |
||
848 | 895 06aa 860F add r24,r22 |
||
849 | 896 06ac 971F adc r25,r23 |
||
850 | 897 06ae 9093 0000 sts (ServoRollOffset)+1,r25 |
||
851 | 898 06b2 8093 0000 sts ServoRollOffset,r24 |
||
852 | 899 06b6 8091 0000 lds r24,EE_Parameter+109 |
||
853 | 900 06ba 81FF sbrs r24,1 |
||
854 | 901 06bc 00C0 rjmp .L72 |
||
855 | 902 06be 8091 0000 lds r24,ServoRollOffset |
||
856 | 903 06c2 9091 0000 lds r25,(ServoRollOffset)+1 |
||
857 | 904 06c6 97FD sbrc r25,7 |
||
858 | 905 06c8 0F96 adiw r24,15 |
||
859 | 906 .L73: |
||
860 | 907 06ca 74E0 ldi r23,4 |
||
861 | 908 06cc 9595 1: asr r25 |
||
862 | 909 06ce 8795 ror r24 |
||
863 | 910 06d0 7A95 dec r23 |
||
864 | 911 06d2 01F4 brne 1b |
||
865 | 912 06d4 AA27 clr r26 |
||
866 | 913 06d6 97FD sbrc r25,7 |
||
867 | 914 06d8 A095 com r26 |
||
868 | 915 06da BA2F mov r27,r26 |
||
869 | 916 06dc C80F add r28,r24 |
||
870 | 917 06de D91F adc r29,r25 |
||
871 | 918 06e0 EA1F adc r30,r26 |
||
872 | 919 06e2 FB1F adc r31,r27 |
||
873 | 920 06e4 00C0 rjmp .L74 |
||
874 | 921 .L72: |
||
875 | 922 06e6 8091 0000 lds r24,ServoRollOffset |
||
876 | 923 06ea 9091 0000 lds r25,(ServoRollOffset)+1 |
||
877 | 924 06ee 97FD sbrc r25,7 |
||
878 | 925 06f0 0F96 adiw r24,15 |
||
879 | 926 .L75: |
||
880 | 927 06f2 64E0 ldi r22,4 |
||
881 | 928 06f4 9595 1: asr r25 |
||
882 | 929 06f6 8795 ror r24 |
||
883 | 930 06f8 6A95 dec r22 |
||
884 | 931 06fa 01F4 brne 1b |
||
885 | 932 06fc AA27 clr r26 |
||
886 | 933 06fe 97FD sbrc r25,7 |
||
887 | 934 0700 A095 com r26 |
||
888 | 935 0702 BA2F mov r27,r26 |
||
889 | 936 0704 8C1B sub r24,r28 |
||
890 | 937 0706 9D0B sbc r25,r29 |
||
891 | 938 0708 AE0B sbc r26,r30 |
||
892 | 939 070a BF0B sbc r27,r31 |
||
893 | 940 070c FD01 movw r30,r26 |
||
894 | 941 070e EC01 movw r28,r24 |
||
895 | 942 .L74: |
||
896 | 943 0710 2091 0000 lds r18,EE_Parameter+107 |
||
897 | 944 0714 2223 tst r18 |
||
898 | 945 0716 01F0 breq .L76 |
||
899 | 946 0718 3327 clr r19 |
||
900 | 947 071a 8091 0000 lds r24,ServoRollValue |
||
901 | 948 071e 9091 0000 lds r25,(ServoRollValue)+1 |
||
902 | 949 0722 829F mul r24,r18 |
||
903 | 950 0724 A001 movw r20,r0 |
||
904 | 951 0726 839F mul r24,r19 |
||
905 | 952 0728 500D add r21,r0 |
||
906 | 953 072a 929F mul r25,r18 |
||
907 | 954 072c 500D add r21,r0 |
||
908 | 955 072e 1124 clr r1 |
||
909 | 956 0730 CA01 movw r24,r20 |
||
910 | 957 0732 AA27 clr r26 |
||
911 | 958 0734 97FD sbrc r25,7 |
||
912 | 959 0736 A095 com r26 |
||
913 | 960 0738 BA2F mov r27,r26 |
||
914 | 961 073a 8C0F add r24,r28 |
||
915 | 962 073c 9D1F adc r25,r29 |
||
916 | 963 073e AE1F adc r26,r30 |
||
917 | 964 0740 BF1F adc r27,r31 |
||
918 | 965 0742 2F5F subi r18,lo8(-(1)) |
||
919 | 966 0744 3F4F sbci r19,hi8(-(1)) |
||
920 | 967 0746 4427 clr r20 |
||
921 | 968 0748 37FD sbrc r19,7 |
||
922 | 969 074a 4095 com r20 |
||
923 | 970 074c 542F mov r21,r20 |
||
924 | 971 074e BC01 movw r22,r24 |
||
925 | 972 0750 CD01 movw r24,r26 |
||
926 | 973 0752 0E94 0000 call __divmodsi4 |
||
927 | 974 0756 3093 0000 sts (ServoRollValue)+1,r19 |
||
928 | 975 075a 2093 0000 sts ServoRollValue,r18 |
||
929 | 976 075e 00C0 rjmp .L77 |
||
930 | 977 .L76: |
||
931 | 978 0760 D093 0000 sts (ServoRollValue)+1,r29 |
||
932 | 979 0764 C093 0000 sts ServoRollValue,r28 |
||
933 | 980 .L77: |
||
934 | 981 0768 8091 0000 lds r24,EE_Parameter+51 |
||
935 | 982 076c 282F mov r18,r24 |
||
936 | 983 076e 3327 clr r19 |
||
937 | 984 0770 220F lsl r18 |
||
938 | 985 0772 331F rol r19 |
||
939 | 986 0774 220F lsl r18 |
||
940 | 987 0776 331F rol r19 |
||
941 | 988 0778 8091 0000 lds r24,ServoRollValue |
||
942 | 989 077c 9091 0000 lds r25,(ServoRollValue)+1 |
||
943 | 990 0780 8217 cp r24,r18 |
||
944 | 991 0782 9307 cpc r25,r19 |
||
945 | 992 0784 04F0 brlt .L82 |
||
946 | 993 0786 8091 0000 lds r24,EE_Parameter+52 |
||
947 | 994 078a 282F mov r18,r24 |
||
948 | 995 078c 3327 clr r19 |
||
949 | 996 078e 220F lsl r18 |
||
950 | 997 0790 331F rol r19 |
||
951 | 998 0792 220F lsl r18 |
||
952 | 999 0794 331F rol r19 |
||
953 | 1000 0796 8091 0000 lds r24,ServoRollValue |
||
954 | 1001 079a 9091 0000 lds r25,(ServoRollValue)+1 |
||
955 | 1002 079e 2817 cp r18,r24 |
||
956 | 1003 07a0 3907 cpc r19,r25 |
||
957 | 1004 07a2 04F4 brge .L79 |
||
958 | 1005 .L82: |
||
959 | 1006 07a4 3093 0000 sts (ServoRollValue)+1,r19 |
||
960 | 1007 07a8 2093 0000 sts ServoRollValue,r18 |
||
961 | 1008 .L79: |
||
962 | 1009 07ac 1092 0000 sts CalculateServoSignals,__zero_reg__ |
||
963 | 1010 .L50: |
||
964 | 1011 /* epilogue: frame size=0 */ |
||
965 | 1012 07b0 E7E0 ldi r30,7 |
||
966 | 1013 07b2 CDB7 in r28,__SP_L__ |
||
967 | 1014 07b4 DEB7 in r29,__SP_H__ |
||
968 | 1015 07b6 0C94 0000 jmp __epilogue_restores__+22 |
||
969 | 1016 /* epilogue end (size=5) */ |
||
970 | 1017 /* function CalculateServo size 556 (545) */ |
||
971 | 1019 .lcomm PulseOutput.0,1 |
||
972 | 1020 .lcomm ServoFrameTime.1,2 |
||
973 | 1021 .lcomm ServoIndex.2,1 |
||
974 | 1022 .global __vector_9 |
||
975 | 1024 __vector_9: |
||
976 | 1025 /* prologue: frame size=0 */ |
||
977 | 1026 07ba 1F92 push __zero_reg__ |
||
978 | 1027 07bc 0F92 push __tmp_reg__ |
||
979 | 1028 07be 0FB6 in __tmp_reg__,__SREG__ |
||
980 | 1029 07c0 0F92 push __tmp_reg__ |
||
981 | 1030 07c2 1124 clr __zero_reg__ |
||
982 | 1031 07c4 2F93 push r18 |
||
983 | 1032 07c6 3F93 push r19 |
||
984 | 1033 07c8 4F93 push r20 |
||
985 | 1034 07ca 5F93 push r21 |
||
986 | 1035 07cc 8F93 push r24 |
||
987 | 1036 07ce 9F93 push r25 |
||
988 | 1037 07d0 EF93 push r30 |
||
989 | 1038 07d2 FF93 push r31 |
||
990 | 1039 /* prologue end (size=13) */ |
||
991 | 1040 07d4 8091 0000 lds r24,PlatinenVersion |
||
992 | 1041 07d8 9091 0000 lds r25,PulseOutput.0 |
||
993 | 1042 07dc 8431 cpi r24,lo8(20) |
||
994 | 1043 07de 00F0 brlo .+2 |
||
995 | 1044 07e0 00C0 rjmp .L84 |
||
996 | 1045 07e2 9923 tst r25 |
||
997 | 1046 07e4 01F0 breq .+2 |
||
998 | 1047 07e6 00C0 rjmp .L91 |
||
999 | 1048 07e8 8091 B000 lds r24,176 |
||
1000 | 1049 07ec 86FF sbrs r24,6 |
||
1001 | 1050 07ee 00C0 rjmp .L86 |
||
1002 | 1051 07f0 8091 B000 lds r24,176 |
||
1003 | 1052 07f4 8F7B andi r24,lo8(-65) |
||
1004 | 1053 07f6 8093 B000 sts 176,r24 |
||
1005 | 1054 07fa 8091 0000 lds r24,ServoNickValue |
||
1006 | 1055 07fe 9091 0000 lds r25,(ServoNickValue)+1 |
||
1007 | 1056 0802 8755 subi r24,lo8(-(425)) |
||
1008 | 1057 0804 9E4F sbci r25,hi8(-(425)) |
||
1009 | 1058 0806 9093 0000 sts (RemainingPulse)+1,r25 |
||
1010 | 1059 080a 8093 0000 sts RemainingPulse,r24 |
||
1011 | 1060 080e 25E0 ldi r18,hi8(1501) |
||
1012 | 1061 0810 8D3D cpi r24,lo8(1501) |
||
1013 | 1062 0812 9207 cpc r25,r18 |
||
1014 | 1063 0814 00F0 brlo .L87 |
||
1015 | 1064 0816 8CED ldi r24,lo8(1500) |
||
1016 | 1065 0818 95E0 ldi r25,hi8(1500) |
||
1017 | 1066 081a 00C0 rjmp .L121 |
||
1018 | 1067 .L87: |
||
1019 | 1068 081c 8757 subi r24,lo8(375) |
||
1020 | 1069 081e 9140 sbci r25,hi8(375) |
||
1021 | 1070 0820 00F4 brsh .L88 |
||
1022 | 1071 0822 87E7 ldi r24,lo8(375) |
||
1023 | 1072 0824 91E0 ldi r25,hi8(375) |
||
1024 | 1073 .L121: |
||
1025 | 1074 0826 9093 0000 sts (RemainingPulse)+1,r25 |
||
1026 | 1075 082a 8093 0000 sts RemainingPulse,r24 |
||
1027 | 1076 .L88: |
||
1028 | 1077 082e 8091 0000 lds r24,RemainingPulse |
||
1029 | 1078 0832 9091 0000 lds r25,(RemainingPulse)+1 |
||
1030 | 1079 0836 00C0 rjmp .L126 |
||
1031 | 1080 .L86: |
||
1032 | 1081 0838 8091 B000 lds r24,176 |
||
1033 | 1082 083c 8064 ori r24,lo8(64) |
||
1034 | 1083 083e 8093 B000 sts 176,r24 |
||
1035 | 1084 0842 8091 0000 lds r24,EE_Parameter+53 |
||
1036 | 1085 0846 282F mov r18,r24 |
||
1037 | 1086 0848 3327 clr r19 |
||
1038 | 1087 084a 8DED ldi r24,lo8(1757) |
||
1039 | 1088 084c 96E0 ldi r25,hi8(1757) |
||
1040 | 1089 084e 289F mul r18,r24 |
||
1041 | 1090 0850 A001 movw r20,r0 |
||
1042 | 1091 0852 299F mul r18,r25 |
||
1043 | 1092 0854 500D add r21,r0 |
||
1044 | 1093 0856 389F mul r19,r24 |
||
1045 | 1094 0858 500D add r21,r0 |
||
1046 | 1095 085a 1124 clr r1 |
||
1047 | 1096 085c CA01 movw r24,r20 |
||
1048 | 1097 085e 2091 0000 lds r18,ServoFrameTime.1 |
||
1049 | 1098 0862 3091 0000 lds r19,(ServoFrameTime.1)+1 |
||
1050 | 1099 0866 821B sub r24,r18 |
||
1051 | 1100 0868 930B sbc r25,r19 |
||
1052 | 1101 086a 9093 0000 sts (RemainingPulse)+1,r25 |
||
1053 | 1102 086e 8093 0000 sts RemainingPulse,r24 |
||
1054 | 1103 0872 81E0 ldi r24,lo8(1) |
||
1055 | 1104 0874 8093 0000 sts CalculateServoSignals,r24 |
||
1056 | 1105 0878 00C0 rjmp .L109 |
||
1057 | 1106 .L84: |
||
1058 | 1107 087a 9923 tst r25 |
||
1059 | 1108 087c 01F0 breq .+2 |
||
1060 | 1109 087e 00C0 rjmp .L91 |
||
1061 | 1110 0880 8091 B000 lds r24,176 |
||
1062 | 1111 0884 86FF sbrs r24,6 |
||
1063 | 1112 0886 00C0 rjmp .L93 |
||
1064 | 1113 0888 8091 B000 lds r24,176 |
||
1065 | 1114 088c 8F7B andi r24,lo8(-65) |
||
1066 | 1115 088e 8093 B000 sts 176,r24 |
||
1067 | 1116 0892 E091 0000 lds r30,ServoIndex.2 |
||
1068 | 1117 0896 2091 0000 lds r18,EE_Parameter+53 |
||
1069 | 1118 089a EE23 tst r30 |
||
1070 | 1119 089c 01F4 brne .L94 |
||
1071 | 1120 089e 3327 clr r19 |
||
1072 | 1121 08a0 8DED ldi r24,lo8(1757) |
||
1073 | 1122 08a2 96E0 ldi r25,hi8(1757) |
||
1074 | 1123 08a4 289F mul r18,r24 |
||
1075 | 1124 08a6 A001 movw r20,r0 |
||
1076 | 1125 08a8 299F mul r18,r25 |
||
1077 | 1126 08aa 500D add r21,r0 |
||
1078 | 1127 08ac 389F mul r19,r24 |
||
1079 | 1128 08ae 500D add r21,r0 |
||
1080 | 1129 08b0 1124 clr r1 |
||
1081 | 1130 08b2 CA01 movw r24,r20 |
||
1082 | 1131 08b4 2091 0000 lds r18,ServoFrameTime.1 |
||
1083 | 1132 08b8 3091 0000 lds r19,(ServoFrameTime.1)+1 |
||
1084 | 1133 08bc 821B sub r24,r18 |
||
1085 | 1134 08be 930B sbc r25,r19 |
||
1086 | 1135 08c0 9093 0000 sts (RemainingPulse)+1,r25 |
||
1087 | 1136 08c4 8093 0000 sts RemainingPulse,r24 |
||
1088 | 1137 08c8 1092 0000 sts (ServoFrameTime.1)+1,__zero_reg__ |
||
1089 | 1138 08cc 1092 0000 sts ServoFrameTime.1,__zero_reg__ |
||
1090 | 1139 08d0 469A sbi 40-0x20,6 |
||
1091 | 1140 08d2 00C0 rjmp .L109 |
||
1092 | 1141 .L94: |
||
1093 | 1142 08d4 2E17 cp r18,r30 |
||
1094 | 1143 08d6 00F4 brsh .L96 |
||
1095 | 1144 08d8 8AE0 ldi r24,lo8(10) |
||
1096 | 1145 08da 90E0 ldi r25,hi8(10) |
||
1097 | 1146 08dc 9093 0000 sts (RemainingPulse)+1,r25 |
||
1098 | 1147 08e0 8093 0000 sts RemainingPulse,r24 |
||
1099 | 1148 08e4 00C0 rjmp .L109 |
||
1100 | 1149 .L96: |
||
1101 | 1150 08e6 89EA ldi r24,lo8(937) |
||
1102 | 1151 08e8 93E0 ldi r25,hi8(937) |
||
1103 | 1152 08ea 9093 0000 sts (RemainingPulse)+1,r25 |
||
1104 | 1153 08ee 8093 0000 sts RemainingPulse,r24 |
||
1105 | 1154 08f2 8E2F mov r24,r30 |
||
1106 | 1155 08f4 9927 clr r25 |
||
1107 | 1156 08f6 8330 cpi r24,3 |
||
1108 | 1157 08f8 9105 cpc r25,__zero_reg__ |
||
1109 | 1158 08fa 01F0 breq .L101 |
||
1110 | 1159 08fc 8430 cpi r24,4 |
||
1111 | 1160 08fe 9105 cpc r25,__zero_reg__ |
||
1112 | 1161 0900 04F4 brge .L105 |
||
1113 | 1162 0902 8130 cpi r24,1 |
||
1114 | 1163 0904 9105 cpc r25,__zero_reg__ |
||
1115 | 1164 0906 01F0 breq .L99 |
||
1116 | 1165 0908 0297 sbiw r24,2 |
||
1117 | 1166 090a 01F0 breq .L100 |
||
1118 | 1167 090c 00C0 rjmp .L104 |
||
1119 | 1168 .L105: |
||
1120 | 1169 090e 8430 cpi r24,4 |
||
1121 | 1170 0910 9105 cpc r25,__zero_reg__ |
||
1122 | 1171 0912 01F0 breq .L102 |
||
1123 | 1172 0914 0597 sbiw r24,5 |
||
1124 | 1173 0916 01F0 breq .L103 |
||
1125 | 1174 0918 00C0 rjmp .L104 |
||
1126 | 1175 .L99: |
||
1127 | 1176 091a 8091 0000 lds r24,ServoNickValue |
||
1128 | 1177 091e 9091 0000 lds r25,(ServoNickValue)+1 |
||
1129 | 1178 0922 00C0 rjmp .L125 |
||
1130 | 1179 .L100: |
||
1131 | 1180 0924 8091 0000 lds r24,ServoRollValue |
||
1132 | 1181 0928 9091 0000 lds r25,(ServoRollValue)+1 |
||
1133 | 1182 .L125: |
||
1134 | 1183 092c 8755 subi r24,lo8(-(425)) |
||
1135 | 1184 092e 9E4F sbci r25,hi8(-(425)) |
||
1136 | 1185 0930 00C0 rjmp .L122 |
||
1137 | 1186 .L101: |
||
1138 | 1187 0932 8091 0000 lds r24,Parameter_Servo3 |
||
1139 | 1188 0936 00C0 rjmp .L127 |
||
1140 | 1189 .L102: |
||
1141 | 1190 0938 8091 0000 lds r24,Parameter_Servo4 |
||
1142 | 1191 093c 00C0 rjmp .L127 |
||
1143 | 1192 .L103: |
||
1144 | 1193 093e 8091 0000 lds r24,Parameter_Servo5 |
||
1145 | 1194 .L127: |
||
1146 | 1195 0942 9927 clr r25 |
||
1147 | 1196 0944 880F lsl r24 |
||
1148 | 1197 0946 991F rol r25 |
||
1149 | 1198 0948 880F lsl r24 |
||
1150 | 1199 094a 991F rol r25 |
||
1151 | 1200 094c 00C0 rjmp .L125 |
||
1152 | 1201 .L104: |
||
1153 | 1202 094e FF27 clr r31 |
||
1154 | 1203 0950 EE0F add r30,r30 |
||
1155 | 1204 0952 FF1F adc r31,r31 |
||
1156 | 1205 0954 E050 subi r30,lo8(-(PPM_in)) |
||
1157 | 1206 0956 F040 sbci r31,hi8(-(PPM_in)) |
||
1158 | 1207 0958 2081 ld r18,Z |
||
1159 | 1208 095a 3181 ldd r19,Z+1 |
||
1160 | 1209 095c 220F add r18,r18 |
||
1161 | 1210 095e 331F adc r19,r19 |
||
1162 | 1211 0960 8091 0000 lds r24,RemainingPulse |
||
1163 | 1212 0964 9091 0000 lds r25,(RemainingPulse)+1 |
||
1164 | 1213 0968 820F add r24,r18 |
||
1165 | 1214 096a 931F adc r25,r19 |
||
1166 | 1215 .L122: |
||
1167 | 1216 096c 9093 0000 sts (RemainingPulse)+1,r25 |
||
1168 | 1217 0970 8093 0000 sts RemainingPulse,r24 |
||
1169 | 1218 0974 8091 0000 lds r24,RemainingPulse |
||
1170 | 1219 0978 9091 0000 lds r25,(RemainingPulse)+1 |
||
1171 | 1220 097c 55E0 ldi r21,hi8(1501) |
||
1172 | 1221 097e 8D3D cpi r24,lo8(1501) |
||
1173 | 1222 0980 9507 cpc r25,r21 |
||
1174 | 1223 0982 00F0 brlo .L106 |
||
1175 | 1224 0984 8CED ldi r24,lo8(1500) |
||
1176 | 1225 0986 95E0 ldi r25,hi8(1500) |
||
1177 | 1226 0988 00C0 rjmp .L123 |
||
1178 | 1227 .L106: |
||
1179 | 1228 098a 8757 subi r24,lo8(375) |
||
1180 | 1229 098c 9140 sbci r25,hi8(375) |
||
1181 | 1230 098e 00F4 brsh .L107 |
||
1182 | 1231 0990 87E7 ldi r24,lo8(375) |
||
1183 | 1232 0992 91E0 ldi r25,hi8(375) |
||
1184 | 1233 .L123: |
||
1185 | 1234 0994 9093 0000 sts (RemainingPulse)+1,r25 |
||
1186 | 1235 0998 8093 0000 sts RemainingPulse,r24 |
||
1187 | 1236 .L107: |
||
1188 | 1237 099c 2091 0000 lds r18,RemainingPulse |
||
1189 | 1238 09a0 3091 0000 lds r19,(RemainingPulse)+1 |
||
1190 | 1239 09a4 2C5B subi r18,lo8(-(-188)) |
||
1191 | 1240 09a6 3040 sbci r19,hi8(-(-188)) |
||
1192 | 1241 09a8 3093 0000 sts (RemainingPulse)+1,r19 |
||
1193 | 1242 09ac 2093 0000 sts RemainingPulse,r18 |
||
1194 | 1243 09b0 8091 0000 lds r24,ServoFrameTime.1 |
||
1195 | 1244 09b4 9091 0000 lds r25,(ServoFrameTime.1)+1 |
||
1196 | 1245 09b8 820F add r24,r18 |
||
1197 | 1246 09ba 931F adc r25,r19 |
||
1198 | 1247 .L126: |
||
1199 | 1248 09bc 9093 0000 sts (ServoFrameTime.1)+1,r25 |
||
1200 | 1249 09c0 8093 0000 sts ServoFrameTime.1,r24 |
||
1201 | 1250 09c4 00C0 rjmp .L109 |
||
1202 | 1251 .L93: |
||
1203 | 1252 09c6 8091 B000 lds r24,176 |
||
1204 | 1253 09ca 8064 ori r24,lo8(64) |
||
1205 | 1254 09cc 8093 B000 sts 176,r24 |
||
1206 | 1255 09d0 8CEB ldi r24,lo8(188) |
||
1207 | 1256 09d2 90E0 ldi r25,hi8(188) |
||
1208 | 1257 09d4 9093 0000 sts (RemainingPulse)+1,r25 |
||
1209 | 1258 09d8 8093 0000 sts RemainingPulse,r24 |
||
1210 | 1259 09dc 8091 0000 lds r24,ServoFrameTime.1 |
||
1211 | 1260 09e0 9091 0000 lds r25,(ServoFrameTime.1)+1 |
||
1212 | 1261 09e4 8454 subi r24,lo8(-(188)) |
||
1213 | 1262 09e6 9F4F sbci r25,hi8(-(188)) |
||
1214 | 1263 09e8 9093 0000 sts (ServoFrameTime.1)+1,r25 |
||
1215 | 1264 09ec 8093 0000 sts ServoFrameTime.1,r24 |
||
1216 | 1265 09f0 8091 0000 lds r24,ServoActive |
||
1217 | 1266 09f4 8823 tst r24 |
||
1218 | 1267 09f6 01F0 breq .L112 |
||
1219 | 1268 09f8 8091 0000 lds r24,SenderOkay |
||
1220 | 1269 09fc 8823 tst r24 |
||
1221 | 1270 09fe 01F4 brne .L111 |
||
1222 | 1271 .L112: |
||
1223 | 1272 0a00 8091 0000 lds r24,ServoActive |
||
1224 | 1273 0a04 8230 cpi r24,lo8(2) |
||
1225 | 1274 0a06 01F4 brne .L110 |
||
1226 | 1275 .L111: |
||
1227 | 1276 0a08 4698 cbi 40-0x20,6 |
||
1228 | 1277 0a0a 00C0 rjmp .L113 |
||
1229 | 1278 .L110: |
||
1230 | 1279 0a0c 469A sbi 40-0x20,6 |
||
1231 | 1280 .L113: |
||
1232 | 1281 0a0e 8091 0000 lds r24,ServoIndex.2 |
||
1233 | 1282 0a12 8F5F subi r24,lo8(-(1)) |
||
1234 | 1283 0a14 8093 0000 sts ServoIndex.2,r24 |
||
1235 | 1284 0a18 282F mov r18,r24 |
||
1236 | 1285 0a1a 3327 clr r19 |
||
1237 | 1286 0a1c 8091 0000 lds r24,EE_Parameter+53 |
||
1238 | 1287 0a20 9927 clr r25 |
||
1239 | 1288 0a22 0196 adiw r24,1 |
||
1240 | 1289 0a24 8217 cp r24,r18 |
||
1241 | 1290 0a26 9307 cpc r25,r19 |
||
1242 | 1291 0a28 04F4 brge .L109 |
||
1243 | 1292 0a2a 81E0 ldi r24,lo8(1) |
||
1244 | 1293 0a2c 8093 0000 sts CalculateServoSignals,r24 |
||
1245 | 1294 0a30 1092 0000 sts ServoIndex.2,__zero_reg__ |
||
1246 | 1295 .L109: |
||
1247 | 1296 0a34 81E0 ldi r24,lo8(1) |
||
1248 | 1297 0a36 8093 0000 sts PulseOutput.0,r24 |
||
1249 | 1298 .L91: |
||
1250 | 1299 0a3a 2091 0000 lds r18,RemainingPulse |
||
1251 | 1300 0a3e 3091 0000 lds r19,(RemainingPulse)+1 |
||
1252 | 1301 0a42 41E0 ldi r20,hi8(383) |
||
1253 | 1302 0a44 2F37 cpi r18,lo8(383) |
||
1254 | 1303 0a46 3407 cpc r19,r20 |
||
1255 | 1304 0a48 00F0 brlo .L115 |
||
1256 | 1305 0a4a 8FEF ldi r24,lo8(-1) |
||
1257 | 1306 0a4c 8093 B300 sts 179,r24 |
||
1258 | 1307 0a50 2F5F subi r18,lo8(-(-255)) |
||
1259 | 1308 0a52 3040 sbci r19,hi8(-(-255)) |
||
1260 | 1309 0a54 00C0 rjmp .L124 |
||
1261 | 1310 .L115: |
||
1262 | 1311 0a56 2F3F cpi r18,255 |
||
1263 | 1312 0a58 3105 cpc r19,__zero_reg__ |
||
1264 | 1313 0a5a 01F0 breq .L117 |
||
1265 | 1314 0a5c 00F0 brlo .L117 |
||
1266 | 1315 0a5e A901 movw r20,r18 |
||
1267 | 1316 0a60 4F5F subi r20,lo8(-(-255)) |
||
1268 | 1317 0a62 5040 sbci r21,hi8(-(-255)) |
||
1269 | 1318 0a64 4F37 cpi r20,127 |
||
1270 | 1319 0a66 5105 cpc r21,__zero_reg__ |
||
1271 | 1320 0a68 00F4 brsh .L118 |
||
1272 | 1321 0a6a 80E8 ldi r24,lo8(-128) |
||
1273 | 1322 0a6c 8093 B300 sts 179,r24 |
||
1274 | 1323 0a70 2058 subi r18,lo8(-(-128)) |
||
1275 | 1324 0a72 3040 sbci r19,hi8(-(-128)) |
||
1276 | 1325 .L124: |
||
1277 | 1326 0a74 3093 0000 sts (RemainingPulse)+1,r19 |
||
1278 | 1327 0a78 2093 0000 sts RemainingPulse,r18 |
||
1279 | 1328 0a7c 00C0 rjmp .L83 |
||
1280 | 1329 .L118: |
||
1281 | 1330 0a7e 8FEF ldi r24,lo8(-1) |
||
1282 | 1331 0a80 8093 B300 sts 179,r24 |
||
1283 | 1332 0a84 5093 0000 sts (RemainingPulse)+1,r21 |
||
1284 | 1333 0a88 4093 0000 sts RemainingPulse,r20 |
||
1285 | 1334 0a8c 00C0 rjmp .L83 |
||
1286 | 1335 .L117: |
||
1287 | 1336 0a8e 8091 0000 lds r24,RemainingPulse |
||
1288 | 1337 0a92 8093 B300 sts 179,r24 |
||
1289 | 1338 0a96 1092 0000 sts (RemainingPulse)+1,__zero_reg__ |
||
1290 | 1339 0a9a 1092 0000 sts RemainingPulse,__zero_reg__ |
||
1291 | 1340 0a9e 1092 0000 sts PulseOutput.0,__zero_reg__ |
||
1292 | 1341 .L83: |
||
1293 | 1342 /* epilogue: frame size=0 */ |
||
1294 | 1343 0aa2 FF91 pop r31 |
||
1295 | 1344 0aa4 EF91 pop r30 |
||
1296 | 1345 0aa6 9F91 pop r25 |
||
1297 | 1346 0aa8 8F91 pop r24 |
||
1298 | 1347 0aaa 5F91 pop r21 |
||
1299 | 1348 0aac 4F91 pop r20 |
||
1300 | 1349 0aae 3F91 pop r19 |
||
1301 | 1350 0ab0 2F91 pop r18 |
||
1302 | 1351 0ab2 0F90 pop __tmp_reg__ |
||
1303 | 1352 0ab4 0FBE out __SREG__,__tmp_reg__ |
||
1304 | 1353 0ab6 0F90 pop __tmp_reg__ |
||
1305 | 1354 0ab8 1F90 pop __zero_reg__ |
||
1306 | 1355 0aba 1895 reti |
||
1307 | 1356 /* epilogue end (size=13) */ |
||
1308 | 1357 /* function __vector_9 size 389 (363) */ |
||
1309 | 1359 .comm tim_main,2,1 |
||
1310 | 1360 /* File "timer0.c": code 1388 = 0x056c (1305), prologues 39, epilogues 44 */ |
||
1311 | DEFINED SYMBOLS |
||
1312 | *ABS*:00000000 timer0.c |
||
1313 | C:\Temp/cccXNykM.s:3 *ABS*:0000003f __SREG__ |
||
1314 | C:\Temp/cccXNykM.s:4 *ABS*:0000003e __SP_H__ |
||
1315 | C:\Temp/cccXNykM.s:5 *ABS*:0000003d __SP_L__ |
||
1316 | C:\Temp/cccXNykM.s:6 *ABS*:00000000 __tmp_reg__ |
||
1317 | C:\Temp/cccXNykM.s:7 *ABS*:00000001 __zero_reg__ |
||
1318 | C:\Temp/cccXNykM.s:15 .bss:00000000 ServoRollValue |
||
1319 | C:\Temp/cccXNykM.s:21 .bss:00000002 ServoNickValue |
||
1320 | C:\Temp/cccXNykM.s:27 .data:00000000 NickServoValue |
||
1321 | C:\Temp/cccXNykM.s:32 .data:00000002 BeepMuster |
||
1322 | C:\Temp/cccXNykM.s:37 .data:00000004 ServoRollOffset |
||
1323 | C:\Temp/cccXNykM.s:42 .data:00000006 ServoNickOffset |
||
1324 | C:\Temp/cccXNykM.s:49 .bss:00000004 RemainingPulse |
||
1325 | C:\Temp/cccXNykM.s:55 .data:00000008 CalculateServoSignals |
||
1326 | C:\Temp/cccXNykM.s:62 .bss:00000006 ServoActive |
||
1327 | C:\Temp/cccXNykM.s:68 .bss:00000007 SendSPI |
||
1328 | C:\Temp/cccXNykM.s:74 .bss:00000008 beeptime |
||
1329 | C:\Temp/cccXNykM.s:80 .bss:0000000a cntKompass |
||
1330 | C:\Temp/cccXNykM.s:86 .bss:0000000c UpdateMotor |
||
1331 | C:\Temp/cccXNykM.s:92 .bss:0000000d CountMilliseconds |
||
1332 | C:\Temp/cccXNykM.s:97 .data:00000009 cnt_1ms.3 |
||
1333 | .bss:0000000f cnt.4 |
||
1334 | C:\Temp/cccXNykM.s:99 .bss:00000010 compass_active.5 |
||
1335 | C:\Temp/cccXNykM.s:104 .text:00000000 __vector_18 |
||
1336 | C:\Temp/cccXNykM.s:309 .text:000001e6 SetDelay |
||
1337 | C:\Temp/cccXNykM.s:325 .text:000001f8 CheckDelay |
||
1338 | C:\Temp/cccXNykM.s:344 .text:00000210 Delay_ms |
||
1339 | C:\Temp/cccXNykM.s:365 .text:0000022a Delay_ms_Mess |
||
1340 | C:\Temp/cccXNykM.s:395 .text:0000025a TIMER2_Init |
||
1341 | C:\Temp/cccXNykM.s:437 .text:000002b8 Timer_Init |
||
1342 | *COM*:00000002 tim_main |
||
1343 | C:\Temp/cccXNykM.s:464 .text:000002e6 CalcNickServoValue |
||
1344 | C:\Temp/cccXNykM.s:530 .text:0000036a CalculateServo |
||
1345 | C:\Temp/cccXNykM.s:100 .bss:00000011 PulseOutput.0 |
||
1346 | C:\Temp/cccXNykM.s:1019 .bss:00000012 ServoFrameTime.1 |
||
1347 | C:\Temp/cccXNykM.s:1020 .bss:00000014 ServoIndex.2 |
||
1348 | C:\Temp/cccXNykM.s:1024 .text:000007ba __vector_9 |
||
1349 | |||
1350 | UNDEFINED SYMBOLS |
||
1351 | __do_copy_data |
||
1352 | __do_clear_bss |
||
1353 | SpektrumTimer |
||
1354 | PlatinenVersion |
||
1355 | NaviDataOkay |
||
1356 | Parameter_GlobalConfig |
||
1357 | __udivmodhi4 |
||
1358 | KompassValue |
||
1359 | AdReady |
||
1360 | EE_Parameter |
||
1361 | Parameter_ServoNickControl |
||
1362 | __prologue_saves__ |
||
1363 | sintab |
||
1364 | IntegralNick |
||
1365 | __mulsi3 |
||
1366 | IntegralRoll |
||
1367 | POI_KameraNick |
||
1368 | Parameter_ServoNickComp |
||
1369 | __divmodhi4 |
||
1370 | __divmodsi4 |
||
1371 | Parameter_ServoRollComp |
||
1372 | Parameter_ServoRollControl |
||
1373 | __epilogue_restores__ |
||
1374 | Parameter_Servo3 |
||
1375 | Parameter_Servo4 |
||
1376 | Parameter_Servo5 |
||
1377 | PPM_in |
||
1378 | SenderOkay |