1 .file "spi.c" 2 __SREG__ = 0x3f 3 __SP_H__ = 0x3e 4 __SP_L__ = 0x3d 5 __tmp_reg__ = 0 6 __zero_reg__ = 1 7 .global __do_copy_data 8 .global __do_clear_bss 9 .text 10 .global SPI_MasterInit 12 SPI_MasterInit: 13 /* prologue: frame size=0 */ 14 /* prologue end (size=0) */ 15 0000 84B1 in r24,36-0x20 16 0002 806A ori r24,lo8(-96) 17 0004 84B9 out 36-0x20,r24 18 0006 3D9A sbi 39-0x20,5 19 0008 82E5 ldi r24,lo8(82) 20 000a 8CBD out 76-0x20,r24 21 000c 1DBC out 77-0x20,__zero_reg__ 22 000e 459A sbi 40-0x20,5 23 0010 81E0 ldi r24,lo8(1) 24 0012 8093 0000 sts SPITransferCompleted,r24 25 0016 8AEA ldi r24,lo8(-86) 26 0018 8093 0000 sts ToNaviCtrl,r24 27 001c 83E8 ldi r24,lo8(-125) 28 001e 8093 0000 sts ToNaviCtrl+1,r24 29 0022 8AE0 ldi r24,lo8(10) 30 0024 8093 0000 sts ToNaviCtrl+2,r24 31 0028 1092 0000 sts (ToNaviCtrl+3)+1,__zero_reg__ 32 002c 1092 0000 sts ToNaviCtrl+3,__zero_reg__ 33 0030 1092 0000 sts (ToNaviCtrl+5)+1,__zero_reg__ 34 0034 1092 0000 sts ToNaviCtrl+5,__zero_reg__ 35 0038 1092 0000 sts SPI_RxDataValid,__zero_reg__ 36 003c 1092 0000 sts SPI_VersionInfo,__zero_reg__ 37 0040 88E4 ldi r24,lo8(72) 38 0042 8093 0000 sts SPI_VersionInfo+1,r24 39 0046 8FE0 ldi r24,lo8(15) 40 0048 8093 0000 sts SPI_VersionInfo+2,r24 41 004c 85E0 ldi r24,lo8(5) 42 004e 8093 0000 sts SPI_VersionInfo+3,r24 43 /* epilogue: frame size=0 */ 44 0052 0895 ret 45 /* epilogue end (size=1) */ 46 /* function SPI_MasterInit size 42 (41) */ 48 .global UpdateSPI_Buffer 50 UpdateSPI_Buffer: 51 /* prologue: frame size=0 */ 52 0054 EF92 push r14 53 0056 FF92 push r15 54 0058 0F93 push r16 55 005a 1F93 push r17 56 /* prologue end (size=4) */ 57 /* #APP */ 58 005c F894 cli 59 /* #NOAPP */ 60 005e E090 0000 lds r14,EE_Parameter+20 61 0062 FF24 clr r15 62 0064 EE0C lsl r14 63 0066 FF1C rol r15 64 0068 EE0C lsl r14 65 006a FF1C rol r15 66 006c 0027 clr r16 67 006e F7FC sbrc r15,7 68 0070 0095 com r16 69 0072 102F mov r17,r16 70 0074 6091 0000 lds r22,IntegralNick 71 0078 7091 0000 lds r23,(IntegralNick)+1 72 007c 8091 0000 lds r24,(IntegralNick)+2 73 0080 9091 0000 lds r25,(IntegralNick)+3 74 0084 A801 movw r20,r16 75 0086 9701 movw r18,r14 76 0088 0E94 0000 call __divmodsi4 77 008c 3093 0000 sts (ToNaviCtrl+3)+1,r19 78 0090 2093 0000 sts ToNaviCtrl+3,r18 79 0094 6091 0000 lds r22,IntegralRoll 80 0098 7091 0000 lds r23,(IntegralRoll)+1 81 009c 8091 0000 lds r24,(IntegralRoll)+2 82 00a0 9091 0000 lds r25,(IntegralRoll)+3 83 00a4 A801 movw r20,r16 84 00a6 9701 movw r18,r14 85 00a8 0E94 0000 call __divmodsi4 86 00ac 3093 0000 sts (ToNaviCtrl+5)+1,r19 87 00b0 2093 0000 sts ToNaviCtrl+5,r18 88 00b4 6091 0000 lds r22,ErsatzKompass 89 00b8 7091 0000 lds r23,(ErsatzKompass)+1 90 00bc 8091 0000 lds r24,(ErsatzKompass)+2 91 00c0 9091 0000 lds r25,(ErsatzKompass)+3 92 00c4 2AE0 ldi r18,lo8(10) 93 00c6 30E0 ldi r19,hi8(10) 94 00c8 40E0 ldi r20,hlo8(10) 95 00ca 50E0 ldi r21,hhi8(10) 96 00cc 0E94 0000 call __mulsi3 97 00d0 2091 0000 lds r18,GIER_GRAD_FAKTOR 98 00d4 3091 0000 lds r19,(GIER_GRAD_FAKTOR)+1 99 00d8 4091 0000 lds r20,(GIER_GRAD_FAKTOR)+2 100 00dc 5091 0000 lds r21,(GIER_GRAD_FAKTOR)+3 101 00e0 0E94 0000 call __divmodsi4 102 00e4 3093 0000 sts (ToNaviCtrl+11)+1,r19 103 00e8 2093 0000 sts ToNaviCtrl+11,r18 104 00ec E091 0000 lds r30,NaviCntAcc 105 00f0 F091 0000 lds r31,(NaviCntAcc)+1 106 00f4 8091 0000 lds r24,NaviAccNick 107 00f8 9091 0000 lds r25,(NaviAccNick)+1 108 00fc BF01 movw r22,r30 109 00fe 0E94 0000 call __divmodhi4 110 0102 CB01 movw r24,r22 111 0104 880F lsl r24 112 0106 991F rol r25 113 0108 860F add r24,r22 114 010a 971F adc r25,r23 115 010c 9C01 movw r18,r24 116 010e 220F lsl r18 117 0110 331F rol r19 118 0112 96FD sbrc r25,6 119 0114 00C0 rjmp .L39 120 .L4: 121 0116 3595 asr r19 122 0118 2795 ror r18 123 011a 3595 asr r19 124 011c 2795 ror r18 125 011e 3093 0000 sts (ToNaviCtrl+7)+1,r19 126 0122 2093 0000 sts ToNaviCtrl+7,r18 127 0126 8091 0000 lds r24,NaviAccRoll 128 012a 9091 0000 lds r25,(NaviAccRoll)+1 129 012e BF01 movw r22,r30 130 0130 0E94 0000 call __divmodhi4 131 0134 CB01 movw r24,r22 132 0136 880F lsl r24 133 0138 991F rol r25 134 013a 860F add r24,r22 135 013c 971F adc r25,r23 136 013e 9C01 movw r18,r24 137 0140 220F lsl r18 138 0142 331F rol r19 139 0144 96FD sbrc r25,6 140 0146 00C0 rjmp .L40 141 .L5: 142 0148 3595 asr r19 143 014a 2795 ror r18 144 014c 3595 asr r19 145 014e 2795 ror r18 146 0150 3093 0000 sts (ToNaviCtrl+9)+1,r19 147 0154 2093 0000 sts ToNaviCtrl+9,r18 148 0158 1092 0000 sts (NaviCntAcc)+1,__zero_reg__ 149 015c 1092 0000 sts NaviCntAcc,__zero_reg__ 150 0160 1092 0000 sts (NaviAccNick)+1,__zero_reg__ 151 0164 1092 0000 sts NaviAccNick,__zero_reg__ 152 0168 1092 0000 sts (NaviAccRoll)+1,__zero_reg__ 153 016c 1092 0000 sts NaviAccRoll,__zero_reg__ 154 0170 8091 0000 lds r24,ToNaviCtrl+2 155 0174 8C30 cpi r24,lo8(12) 156 0176 01F4 brne .+2 157 0178 00C0 rjmp .L9 158 017a 8D30 cpi r24,lo8(13) 159 017c 00F4 brsh .+2 160 017e 00C0 rjmp .L41 161 0180 8D30 cpi r24,lo8(13) 162 0182 01F4 brne .+2 163 0184 00C0 rjmp .L10 164 0186 8E30 cpi r24,lo8(14) 165 0188 01F4 brne .+2 166 018a 00C0 rjmp .L42 167 .L6: 168 /* #APP */ 169 018c 7894 sei 170 /* #NOAPP */ 171 018e 8091 0000 lds r24,SPI_RxDataValid 172 0192 8823 tst r24 173 0194 01F4 brne .+2 174 0196 00C0 rjmp .L24 175 .L45: 176 0198 2091 0000 lds r18,FromNaviCtrl+1 177 019c 3091 0000 lds r19,(FromNaviCtrl+1)+1 178 01a0 C901 movw r24,r18 179 01a2 8150 subi r24,lo8(-(511)) 180 01a4 9E4F sbci r25,hi8(-(511)) 181 01a6 8F5F subi r24,lo8(1023) 182 01a8 9340 sbci r25,hi8(1023) 183 01aa 00F4 brsh .L26 184 01ac 4091 0000 lds r20,FromNaviCtrl+3 185 01b0 5091 0000 lds r21,(FromNaviCtrl+3)+1 186 01b4 CA01 movw r24,r20 187 01b6 8150 subi r24,lo8(-(511)) 188 01b8 9E4F sbci r25,hi8(-(511)) 189 01ba 8F5F subi r24,lo8(1023) 190 01bc 9340 sbci r25,hi8(1023) 191 01be 00F4 brsh .+2 192 01c0 00C0 rjmp .L43 193 .L26: 194 01c2 8091 0000 lds r24,FromNaviCtrl+7 195 01c6 9091 0000 lds r25,(FromNaviCtrl+7)+1 196 01ca 21E0 ldi r18,hi8(361) 197 01cc 8936 cpi r24,lo8(361) 198 01ce 9207 cpc r25,r18 199 01d0 04F4 brge .L30 200 01d2 9093 0000 sts (KompassValue)+1,r25 201 01d6 8093 0000 sts KompassValue,r24 202 .L30: 203 01da 8091 0000 lds r24,KompassValue 204 01de 9091 0000 lds r25,(KompassValue)+1 205 01e2 845E subi r24,lo8(-(540)) 206 01e4 9D4F sbci r25,hi8(-(540)) 207 01e6 2091 0000 lds r18,KompassStartwert 208 01ea 3091 0000 lds r19,(KompassStartwert)+1 209 01ee 821B sub r24,r18 210 01f0 930B sbc r25,r19 211 01f2 68E6 ldi r22,lo8(360) 212 01f4 71E0 ldi r23,hi8(360) 213 01f6 0E94 0000 call __divmodhi4 214 01fa 845B subi r24,lo8(-(-180)) 215 01fc 9040 sbci r25,hi8(-(-180)) 216 01fe 9093 0000 sts (KompassRichtung)+1,r25 217 0202 8093 0000 sts KompassRichtung,r24 218 0206 2091 0000 lds r18,FromNaviCtrl+11 219 020a 3091 0000 lds r19,(FromNaviCtrl+11)+1 220 020e 8091 0000 lds r24,beeptime 221 0212 9091 0000 lds r25,(beeptime)+1 222 0216 8217 cp r24,r18 223 0218 9307 cpc r25,r19 224 021a 00F4 brsh .L32 225 021c 8091 0000 lds r24,WinkelOut+6 226 0220 8823 tst r24 227 0222 01F4 brne .+2 228 0224 00C0 rjmp .L44 229 .L32: 230 0226 8091 0000 lds r24,FromNaviCtrl 231 022a 8736 cpi r24,lo8(103) 232 022c 01F0 breq .+2 233 022e 00C0 rjmp .L37 234 0230 8091 0000 lds r24,FromNaviCtrl+13 235 0234 8093 0000 sts FromNaviCtrl_Value,r24 236 0238 8091 0000 lds r24,FromNaviCtrl+14 237 023c 8093 0000 sts FromNaviCtrl_Value+2,r24 238 0240 8091 0000 lds r24,FromNaviCtrl+15 239 0244 8093 0000 sts FromNaviCtrl_Value+1,r24 240 0248 00C0 rjmp .L37 241 .L41: 242 024a 8A30 cpi r24,lo8(10) 243 024c 01F4 brne .+2 244 024e 00C0 rjmp .L7 245 0250 8B30 cpi r24,lo8(11) 246 0252 01F0 breq .+2 247 0254 00C0 rjmp .L6 248 0256 E091 0000 lds r30,EE_Parameter+2 249 025a F0E0 ldi r31,lo8(0) 250 025c EE0F lsl r30 251 025e FF1F rol r31 252 0260 E050 subi r30,lo8(-(PPM_in)) 253 0262 F040 sbci r31,hi8(-(PPM_in)) 254 0264 0190 ld __tmp_reg__,Z+ 255 0266 F081 ld r31,Z 256 0268 E02D mov r30,__tmp_reg__ 257 026a 2FEF ldi r18,hi8(-127) 258 026c E138 cpi r30,lo8(-127) 259 026e F207 cpc r31,r18 260 0270 04F4 brge .L13 261 0272 E1E8 ldi r30,lo8(-127) 262 0274 FFEF ldi r31,hi8(-127) 263 .L13: 264 0276 E038 cpi r30,128 265 0278 F105 cpc r31,__zero_reg__ 266 027a 04F0 brlt .L14 267 027c EFE7 ldi r30,lo8(127) 268 027e F0E0 ldi r31,hi8(127) 269 .L14: 270 0280 E093 0000 sts ToNaviCtrl+19,r30 271 0284 E091 0000 lds r30,EE_Parameter+3 272 0288 F0E0 ldi r31,lo8(0) 273 028a EE0F lsl r30 274 028c FF1F rol r31 275 028e E050 subi r30,lo8(-(PPM_in)) 276 0290 F040 sbci r31,hi8(-(PPM_in)) 277 0292 0190 ld __tmp_reg__,Z+ 278 0294 F081 ld r31,Z 279 0296 E02D mov r30,__tmp_reg__ 280 0298 4FEF ldi r20,hi8(-127) 281 029a E138 cpi r30,lo8(-127) 282 029c F407 cpc r31,r20 283 029e 04F4 brge .L15 284 02a0 E1E8 ldi r30,lo8(-127) 285 02a2 FFEF ldi r31,hi8(-127) 286 .L15: 287 02a4 E038 cpi r30,128 288 02a6 F105 cpc r31,__zero_reg__ 289 02a8 04F0 brlt .L16 290 02aa EFE7 ldi r30,lo8(127) 291 02ac F0E0 ldi r31,hi8(127) 292 .L16: 293 02ae E093 0000 sts ToNaviCtrl+20,r30 294 02b2 E091 0000 lds r30,EE_Parameter+1 295 02b6 F0E0 ldi r31,lo8(0) 296 02b8 EE0F lsl r30 297 02ba FF1F rol r31 298 02bc E050 subi r30,lo8(-(PPM_in)) 299 02be F040 sbci r31,hi8(-(PPM_in)) 300 02c0 0190 ld __tmp_reg__,Z+ 301 02c2 F081 ld r31,Z 302 02c4 E02D mov r30,__tmp_reg__ 303 02c6 6FEF ldi r22,hi8(-127) 304 02c8 E138 cpi r30,lo8(-127) 305 02ca F607 cpc r31,r22 306 02cc 04F4 brge .L17 307 02ce E1E8 ldi r30,lo8(-127) 308 02d0 FFEF ldi r31,hi8(-127) 309 .L17: 310 02d2 E038 cpi r30,128 311 02d4 F105 cpc r31,__zero_reg__ 312 02d6 04F0 brlt .L18 313 02d8 EFE7 ldi r30,lo8(127) 314 02da F0E0 ldi r31,hi8(127) 315 .L18: 316 02dc E093 0000 sts ToNaviCtrl+21,r30 317 02e0 E091 0000 lds r30,EE_Parameter 318 02e4 F0E0 ldi r31,lo8(0) 319 02e6 EE0F lsl r30 320 02e8 FF1F rol r31 321 02ea E050 subi r30,lo8(-(PPM_in)) 322 02ec F040 sbci r31,hi8(-(PPM_in)) 323 02ee 0190 ld __tmp_reg__,Z+ 324 02f0 F081 ld r31,Z 325 02f2 E02D mov r30,__tmp_reg__ 326 02f4 8FEF ldi r24,hi8(-127) 327 02f6 E138 cpi r30,lo8(-127) 328 02f8 F807 cpc r31,r24 329 02fa 04F4 brge .L19 330 02fc E1E8 ldi r30,lo8(-127) 331 02fe FFEF ldi r31,hi8(-127) 332 .L19: 333 0300 E038 cpi r30,128 334 0302 F105 cpc r31,__zero_reg__ 335 0304 04F0 brlt .L20 336 0306 EFE7 ldi r30,lo8(127) 337 0308 F0E0 ldi r31,hi8(127) 338 .L20: 339 030a E093 0000 sts ToNaviCtrl+22,r30 340 030e 8091 0000 lds r24,Poti1 341 0312 8093 0000 sts ToNaviCtrl+23,r24 342 0316 8091 0000 lds r24,Poti2 343 031a 8093 0000 sts ToNaviCtrl+24,r24 344 031e 8091 0000 lds r24,Poti3 345 0322 8093 0000 sts ToNaviCtrl+25,r24 346 0326 8091 0000 lds r24,Poti4 347 032a 8093 0000 sts ToNaviCtrl+26,r24 348 032e 8091 0000 lds r24,SenderOkay 349 0332 8093 0000 sts ToNaviCtrl+27,r24 350 /* #APP */ 351 0336 7894 sei 352 /* #NOAPP */ 353 0338 8091 0000 lds r24,SPI_RxDataValid 354 033c 8823 tst r24 355 033e 01F0 breq .+2 356 0340 00C0 rjmp .L45 357 .L24: 358 0342 1092 0000 sts (GPS_Nick)+1,__zero_reg__ 359 0346 1092 0000 sts GPS_Nick,__zero_reg__ 360 034a 1092 0000 sts (GPS_Roll)+1,__zero_reg__ 361 034e 1092 0000 sts GPS_Roll,__zero_reg__ 362 0352 00C0 rjmp .L37 363 .L40: 364 0354 2D5F subi r18,lo8(-(3)) 365 0356 3F4F sbci r19,hi8(-(3)) 366 0358 00C0 rjmp .L5 367 .L39: 368 035a 2D5F subi r18,lo8(-(3)) 369 035c 3F4F sbci r19,hi8(-(3)) 370 035e 00C0 rjmp .L4 371 .L44: 372 0360 3093 0000 sts (beeptime)+1,r19 373 0364 2093 0000 sts beeptime,r18 374 0368 00C0 rjmp .L32 375 .L43: 376 036a 8091 0000 lds r24,EE_Parameter+8 377 036e 85FF sbrs r24,5 378 0370 00C0 rjmp .L26 379 0372 3093 0000 sts (GPS_Nick)+1,r19 380 0376 2093 0000 sts GPS_Nick,r18 381 037a 5093 0000 sts (GPS_Roll)+1,r21 382 037e 4093 0000 sts GPS_Roll,r20 383 0382 00C0 rjmp .L26 384 .L42: 385 0384 8091 0000 lds r24,SPI_VersionInfo 386 0388 8093 0000 sts ToNaviCtrl+19,r24 387 038c 8091 0000 lds r24,SPI_VersionInfo+1 388 0390 8093 0000 sts ToNaviCtrl+20,r24 389 0394 8091 0000 lds r24,SPI_VersionInfo+2 390 0398 8093 0000 sts ToNaviCtrl+21,r24 391 039c 8091 0000 lds r24,SPI_VersionInfo+3 392 03a0 8093 0000 sts ToNaviCtrl+22,r24 393 03a4 8091 0000 lds r24,PlatinenVersion 394 03a8 8093 0000 sts ToNaviCtrl+23,r24 395 03ac 00C0 rjmp .L6 396 .L10: 397 03ae 8091 0000 lds r24,EE_Parameter+58 398 03b2 8093 0000 sts ToNaviCtrl+19,r24 399 03b6 8091 0000 lds r24,EE_Parameter+59 400 03ba 8093 0000 sts ToNaviCtrl+20,r24 401 03be 8091 0000 lds r24,EE_Parameter+60 402 03c2 8093 0000 sts ToNaviCtrl+21,r24 403 03c6 8091 0000 lds r24,EE_Parameter+61 404 03ca 8093 0000 sts ToNaviCtrl+22,r24 405 03ce 8091 0000 lds r24,EE_Parameter+62 406 03d2 8093 0000 sts ToNaviCtrl+23,r24 407 03d6 8091 0000 lds r24,EE_Parameter+66 408 03da 8093 0000 sts ToNaviCtrl+24,r24 409 03de 8091 0000 lds r24,EE_Parameter+67 410 03e2 8093 0000 sts ToNaviCtrl+25,r24 411 03e6 8091 0000 lds r24,EE_Parameter+68 412 03ea 8093 0000 sts ToNaviCtrl+26,r24 413 03ee 8091 0000 lds r24,EE_Parameter+71 414 03f2 8093 0000 sts ToNaviCtrl+27,r24 415 03f6 8091 0000 lds r24,EE_Parameter+69 416 03fa 8093 0000 sts ToNaviCtrl+28,r24 417 03fe 8091 0000 lds r24,EE_Parameter+70 418 0402 8093 0000 sts ToNaviCtrl+29,r24 419 0406 8091 0000 lds r24,EE_Parameter+72 420 040a 8093 0000 sts ToNaviCtrl+30,r24 421 040e 00C0 rjmp .L6 422 .L7: 423 0410 8091 0000 lds r24,Parameter_UserParam1 424 0414 8093 0000 sts ToNaviCtrl+19,r24 425 0418 8091 0000 lds r24,Parameter_UserParam2 426 041c 8093 0000 sts ToNaviCtrl+20,r24 427 0420 8091 0000 lds r24,Parameter_UserParam3 428 0424 8093 0000 sts ToNaviCtrl+21,r24 429 0428 8091 0000 lds r24,Parameter_UserParam4 430 042c 8093 0000 sts ToNaviCtrl+22,r24 431 0430 8091 0000 lds r24,Parameter_UserParam5 432 0434 8093 0000 sts ToNaviCtrl+23,r24 433 0438 8091 0000 lds r24,Parameter_UserParam6 434 043c 8093 0000 sts ToNaviCtrl+24,r24 435 0440 8091 0000 lds r24,Parameter_UserParam7 436 0444 8093 0000 sts ToNaviCtrl+25,r24 437 0448 8091 0000 lds r24,Parameter_UserParam8 438 044c 8093 0000 sts ToNaviCtrl+26,r24 439 0450 8091 0000 lds r24,MikroKopterFlags 440 0454 8093 0000 sts ToNaviCtrl+27,r24 441 0458 837F andi r24,lo8(-13) 442 045a 8093 0000 sts MikroKopterFlags,r24 443 045e 8091 0000 lds r24,UBat 444 0462 9091 0000 lds r25,(UBat)+1 445 0466 8093 0000 sts ToNaviCtrl+28,r24 446 046a 8091 0000 lds r24,EE_Parameter+25 447 046e 8093 0000 sts ToNaviCtrl+29,r24 448 0472 A0E0 ldi r26,lo8(EEPromArray+2) 449 0474 B0E0 ldi r27,hi8(EEPromArray+2) 450 /* #APP */ 451 0476 0E94 0000 call __eeprom_read_byte_1F2021 452 047a 802D mov r24,__tmp_reg__ 453 /* #NOAPP */ 454 047c 8093 0000 sts ToNaviCtrl+30,r24 455 0480 00C0 rjmp .L6 456 .L9: 457 0482 8091 0000 lds r24,WinkelOut+6 458 0486 8630 cpi r24,lo8(6) 459 0488 00F0 brlo .L21 460 048a 1092 0000 sts WinkelOut+6,__zero_reg__ 461 048e 85E0 ldi r24,lo8(5) 462 0490 8093 0000 sts ToNaviCtrl+19,r24 463 .L23: 464 0494 8091 0000 lds r24,HoehenWert 465 0498 9091 0000 lds r25,(HoehenWert)+1 466 049c 9093 0000 sts (ToNaviCtrl+21)+1,r25 467 04a0 8093 0000 sts ToNaviCtrl+21,r24 468 04a4 8091 0000 lds r24,EE_Parameter+73 469 04a8 8093 0000 sts ToNaviCtrl+20,r24 470 04ac 8091 0000 lds r24,EE_Parameter+63 471 04b0 8093 0000 sts ToNaviCtrl+23,r24 472 04b4 8091 0000 lds r24,EE_Parameter+64 473 04b8 8093 0000 sts ToNaviCtrl+24,r24 474 04bc 8091 0000 lds r24,EE_Parameter+65 475 04c0 8093 0000 sts ToNaviCtrl+25,r24 476 04c4 00C0 rjmp .L6 477 .L21: 478 04c6 8093 0000 sts ToNaviCtrl+19,r24 479 04ca 00C0 rjmp .L23 480 .L37: 481 /* epilogue: frame size=0 */ 482 04cc 1F91 pop r17 483 04ce 0F91 pop r16 484 04d0 FF90 pop r15 485 04d2 EF90 pop r14 486 04d4 0895 ret 487 /* epilogue end (size=5) */ 488 /* function UpdateSPI_Buffer size 583 (574) */ 490 .global SPI_StartTransmitPacket 492 SPI_StartTransmitPacket: 493 /* prologue: frame size=0 */ 494 /* prologue end (size=0) */ 495 04d6 8091 0000 lds r24,SPITransferCompleted 496 04da 8823 tst r24 497 04dc 01F4 brne .+2 498 04de 00C0 rjmp .L51 499 04e0 4598 cbi 40-0x20,5 500 04e2 80E0 ldi r24,lo8(ToNaviCtrl) 501 04e4 90E0 ldi r25,hi8(ToNaviCtrl) 502 04e6 9093 0000 sts (SPI_TX_Buffer)+1,r25 503 04ea 8093 0000 sts SPI_TX_Buffer,r24 504 04ee 9091 0000 lds r25,SPI_CommandCounter 505 04f2 E92F mov r30,r25 506 04f4 F0E0 ldi r31,lo8(0) 507 04f6 E050 subi r30,lo8(-(SPI_CommandSequence)) 508 04f8 F040 sbci r31,hi8(-(SPI_CommandSequence)) 509 04fa 8081 ld r24,Z 510 04fc 8093 0000 sts ToNaviCtrl+2,r24 511 0500 9F5F subi r25,lo8(-(1)) 512 0502 9093 0000 sts SPI_CommandCounter,r25 513 0506 9630 cpi r25,lo8(6) 514 0508 00F0 brlo .L49 515 050a 1092 0000 sts SPI_CommandCounter,__zero_reg__ 516 .L49: 517 050e 1092 0000 sts SPITransferCompleted,__zero_reg__ 518 0512 0E94 0000 call UpdateSPI_Buffer 519 0516 81E0 ldi r24,lo8(1) 520 0518 8093 0000 sts SPI_BufferIndex,r24 521 /* #APP */ 522 051c 0000 nop 523 051e 0000 nop 524 0520 0000 nop 525 0522 0000 nop 526 0524 0000 nop 527 0526 0000 nop 528 0528 0000 nop 529 052a 0000 nop 530 052c 0000 nop 531 052e 0000 nop 532 0530 0000 nop 533 0532 0000 nop 534 0534 0000 nop 535 0536 0000 nop 536 0538 0000 nop 537 053a 0000 nop 538 053c 0000 nop 539 053e 0000 nop 540 0540 0000 nop 541 0542 0000 nop 542 0544 0000 nop 543 0546 0000 nop 544 0548 0000 nop 545 054a 0000 nop 546 /* #NOAPP */ 547 054c 8091 0000 lds r24,ToNaviCtrl 548 0550 8093 0000 sts ToNaviCtrl+31,r24 549 0554 8EBD out 78-0x20,r24 550 .L51: 551 0556 0895 ret 552 /* epilogue: frame size=0 */ 553 /* epilogue: noreturn */ 554 /* epilogue end (size=0) */ 555 /* function SPI_StartTransmitPacket size 89 (89) */ 557 .global SPI_TransmitByte 559 SPI_TransmitByte: 560 /* prologue: frame size=0 */ 561 /* prologue end (size=0) */ 562 0558 8091 0000 lds r24,SPITransferCompleted 563 055c 8823 tst r24 564 055e 01F4 brne .L72 565 0560 0DB4 in __tmp_reg__,77-0x20 566 0562 07FE sbrs __tmp_reg__,7 567 .L72: 568 0564 0895 ret 569 .L75: 570 0566 84E0 ldi r24,lo8(4) 571 0568 8093 0000 sts SendSPI,r24 572 056c 459A sbi 40-0x20,5 573 056e 9EB5 in r25,78-0x20 574 0570 8091 0000 lds r24,SPI_RXState.2396 575 0574 8130 cpi r24,lo8(1) 576 0576 01F4 brne .+2 577 0578 00C0 rjmp .L58 578 057a 8130 cpi r24,lo8(1) 579 057c 00F0 brlo .+2 580 057e 00C0 rjmp .L76 581 0580 1092 0000 sts SPI_RxBufferIndex,__zero_reg__ 582 0584 9093 0000 sts rxchksum.2398,r25 583 0588 9138 cpi r25,lo8(-127) 584 058a 01F4 brne .+2 585 058c 00C0 rjmp .L77 586 .L56: 587 058e 2091 0000 lds r18,SPI_BufferIndex 588 0592 2032 cpi r18,lo8(32) 589 0594 00F0 brlo .+2 590 0596 00C0 rjmp .L69 591 0598 4598 cbi 40-0x20,5 592 /* #APP */ 593 059a 0000 nop 594 059c 0000 nop 595 059e 0000 nop 596 05a0 0000 nop 597 05a2 0000 nop 598 05a4 0000 nop 599 05a6 0000 nop 600 05a8 0000 nop 601 05aa 0000 nop 602 05ac 0000 nop 603 05ae 0000 nop 604 05b0 0000 nop 605 05b2 0000 nop 606 05b4 0000 nop 607 05b6 0000 nop 608 05b8 0000 nop 609 05ba 0000 nop 610 05bc 0000 nop 611 05be 0000 nop 612 05c0 0000 nop 613 05c2 0000 nop 614 05c4 0000 nop 615 05c6 0000 nop 616 05c8 0000 nop 617 /* #NOAPP */ 618 05ca E091 0000 lds r30,SPI_TX_Buffer 619 05ce F091 0000 lds r31,(SPI_TX_Buffer)+1 620 05d2 E20F add r30,r18 621 05d4 F11D adc r31,__zero_reg__ 622 05d6 8081 ld r24,Z 623 05d8 8EBD out 78-0x20,r24 624 05da 8081 ld r24,Z 625 05dc 9091 0000 lds r25,ToNaviCtrl+31 626 05e0 890F add r24,r25 627 05e2 8093 0000 sts ToNaviCtrl+31,r24 628 .L71: 629 05e6 2F5F subi r18,lo8(-(1)) 630 05e8 2093 0000 sts SPI_BufferIndex,r18 631 05ec 0895 ret 632 .L58: 633 05ee 9535 cpi r25,lo8(85) 634 05f0 01F0 breq .L78 635 .L68: 636 05f2 1092 0000 sts SPI_RXState.2396,__zero_reg__ 637 05f6 00C0 rjmp .L56 638 .L69: 639 05f8 81E0 ldi r24,lo8(1) 640 05fa 8093 0000 sts SPITransferCompleted,r24 641 05fe 00C0 rjmp .L71 642 .L76: 643 0600 8230 cpi r24,lo8(2) 644 0602 01F0 breq .+2 645 0604 00C0 rjmp .L56 646 0606 8091 0000 lds r24,SPI_RxBufferIndex 647 060a E82F mov r30,r24 648 060c F0E0 ldi r31,lo8(0) 649 060e E050 subi r30,lo8(-(SPI_Buffer)) 650 0610 F040 sbci r31,hi8(-(SPI_Buffer)) 651 0612 9083 st Z,r25 652 0614 8F5F subi r24,lo8(-(1)) 653 0616 8093 0000 sts SPI_RxBufferIndex,r24 654 061a 8A31 cpi r24,lo8(26) 655 061c 00F0 brlo .L63 656 061e 8091 0000 lds r24,rxchksum.2398 657 0622 9817 cp r25,r24 658 0624 01F0 breq .L79 659 0626 1092 0000 sts SPI_RxDataValid,__zero_reg__ 660 062a 00C0 rjmp .L68 661 .L63: 662 062c 8091 0000 lds r24,rxchksum.2398 663 0630 890F add r24,r25 664 0632 8093 0000 sts rxchksum.2398,r24 665 0636 00C0 rjmp .L56 666 .L78: 667 0638 8091 0000 lds r24,rxchksum.2398 668 063c 8B5A subi r24,lo8(-(85)) 669 063e 8093 0000 sts rxchksum.2398,r24 670 0642 82E0 ldi r24,lo8(2) 671 0644 8093 0000 sts SPI_RXState.2396,r24 672 0648 00C0 rjmp .L56 673 .L77: 674 064a 81E0 ldi r24,lo8(1) 675 064c 8093 0000 sts SPI_RXState.2396,r24 676 0650 00C0 rjmp .L56 677 .L79: 678 0652 A0E0 ldi r26,lo8(FromNaviCtrl) 679 0654 B0E0 ldi r27,hi8(FromNaviCtrl) 680 0656 E0E0 ldi r30,lo8(SPI_Buffer) 681 0658 F0E0 ldi r31,hi8(SPI_Buffer) 682 065a 8AE1 ldi r24,lo8(26) 683 .L67: 684 065c 0190 ld r0,Z+ 685 065e 0D92 st X+,r0 686 0660 8150 subi r24,lo8(-(-1)) 687 0662 01F4 brne .L67 688 0664 81E0 ldi r24,lo8(1) 689 0666 8093 0000 sts SPI_RxDataValid,r24 690 066a 00C0 rjmp .L68 691 /* epilogue: frame size=0 */ 692 /* epilogue: noreturn */ 693 /* epilogue end (size=0) */ 694 /* function SPI_TransmitByte size 164 (164) */ 696 .global SPI_CommandSequence 697 .data 700 SPI_CommandSequence: 701 0000 0A .byte 10 702 0001 0B .byte 11 703 0002 0D .byte 13 704 0003 0B .byte 11 705 0004 0C .byte 12 706 0005 0E .byte 14 707 .global SPI_CommandCounter 708 .global SPI_CommandCounter 709 .section .bss 712 SPI_CommandCounter: 713 0000 00 .skip 1,0 714 .lcomm rxchksum.2398,1 715 .lcomm SPI_RXState.2396,1 716 .comm FromNaviCtrl_Value,3,1 717 .comm ToNaviCtrl,32,1 718 .comm FromNaviCtrl,26,1 719 .comm SPI_VersionInfo,4,1 720 .comm SPI_BufferIndex,1,1 721 .comm SPI_RxBufferIndex,1,1 722 .comm SPI_Buffer,26,1 723 .comm SPI_TX_Buffer,2,1 724 .comm SPITransferCompleted,1,1 725 .comm SPI_ChkSum,1,1 726 .comm SPI_RxDataValid,1,1 727 /* File "spi.c": code 878 = 0x036e ( 868), prologues 4, epilogues 6 */ DEFINED SYMBOLS *ABS*:00000000 spi.c C:\DOKUME~1\David\LOKALE~1\Temp/ccSdEvF6.s:2 *ABS*:0000003f __SREG__ C:\DOKUME~1\David\LOKALE~1\Temp/ccSdEvF6.s:3 *ABS*:0000003e __SP_H__ C:\DOKUME~1\David\LOKALE~1\Temp/ccSdEvF6.s:4 *ABS*:0000003d __SP_L__ C:\DOKUME~1\David\LOKALE~1\Temp/ccSdEvF6.s:5 *ABS*:00000000 __tmp_reg__ C:\DOKUME~1\David\LOKALE~1\Temp/ccSdEvF6.s:6 *ABS*:00000001 __zero_reg__ C:\DOKUME~1\David\LOKALE~1\Temp/ccSdEvF6.s:12 .text:00000000 SPI_MasterInit *COM*:00000001 SPITransferCompleted *COM*:00000020 ToNaviCtrl *COM*:00000001 SPI_RxDataValid *COM*:00000004 SPI_VersionInfo C:\DOKUME~1\David\LOKALE~1\Temp/ccSdEvF6.s:50 .text:00000054 UpdateSPI_Buffer *COM*:0000001a FromNaviCtrl *COM*:00000003 FromNaviCtrl_Value C:\DOKUME~1\David\LOKALE~1\Temp/ccSdEvF6.s:492 .text:000004d6 SPI_StartTransmitPacket *COM*:00000002 SPI_TX_Buffer C:\DOKUME~1\David\LOKALE~1\Temp/ccSdEvF6.s:712 .bss:00000000 SPI_CommandCounter C:\DOKUME~1\David\LOKALE~1\Temp/ccSdEvF6.s:700 .data:00000000 SPI_CommandSequence *COM*:00000001 SPI_BufferIndex C:\DOKUME~1\David\LOKALE~1\Temp/ccSdEvF6.s:559 .text:00000558 SPI_TransmitByte C:\DOKUME~1\David\LOKALE~1\Temp/ccSdEvF6.s:714 .bss:00000002 SPI_RXState.2396 *COM*:00000001 SPI_RxBufferIndex .bss:00000001 rxchksum.2398 *COM*:0000001a SPI_Buffer *COM*:00000001 SPI_ChkSum UNDEFINED SYMBOLS __do_copy_data __do_clear_bss EE_Parameter IntegralNick __divmodsi4 IntegralRoll ErsatzKompass __mulsi3 GIER_GRAD_FAKTOR NaviCntAcc NaviAccNick __divmodhi4 NaviAccRoll KompassValue KompassStartwert KompassRichtung beeptime WinkelOut PPM_in Poti1 Poti2 Poti3 Poti4 SenderOkay GPS_Nick GPS_Roll PlatinenVersion Parameter_UserParam1 Parameter_UserParam2 Parameter_UserParam3 Parameter_UserParam4 Parameter_UserParam5 Parameter_UserParam6 Parameter_UserParam7 Parameter_UserParam8 MikroKopterFlags UBat EEPromArray __eeprom_read_byte_1F2021 HoehenWert SendSPI