Subversion Repositories FlightCtrl

Rev

Blame | Last modification | View Log | RSS feed

   1                            .file   "Spektrum.c"
   2                            .arch atmega644p
   3                    __SREG__ = 0x3f
   4                    __SP_H__ = 0x3e
   5                    __SP_L__ = 0x3d
   6                    __tmp_reg__ = 0
   7                    __zero_reg__ = 1
   8                            .global __do_copy_data
   9                            .global __do_clear_bss
  10                    .global SpektrumTimer
  11                    .global SpektrumTimer
  12                            .section .bss
  15                    SpektrumTimer:
  16 0000 00                    .skip 1,0
  17                            .text
  18                    .global SpektrumUartInit
  20                    SpektrumUartInit:
  21                    /* prologue: frame size=0 */
  22                    /* prologue end (size=0) */
  23 0000 4FB7                  in r20,95-0x20
  24 0002 24E1                  ldi r18,lo8(20)
  25 0004 30E0                  ldi r19,hi8(20)
  26                    /* #APP */
  27 0006 F894                  cli
  28                    /* #NOAPP */
  29 0008 8091 C900             lds r24,201
  30 000c 8F77                  andi r24,lo8(127)
  31 000e 8093 C900             sts 201,r24
  32 0012 8091 C900             lds r24,201
  33 0016 8F7B                  andi r24,lo8(-65)
  34 0018 8093 C900             sts 201,r24
  35 001c 8091 C900             lds r24,201
  36 0020 8F7D                  andi r24,lo8(-33)
  37 0022 8093 C900             sts 201,r24
  38 0026 5A9A                  sbi 43-0x20,2
  39 0028 5298                  cbi 42-0x20,2
  40 002a 5B9A                  sbi 43-0x20,3
  41 002c 539A                  sbi 42-0x20,3
  42 002e 832F                  mov r24,r19
  43 0030 9927                  clr r25
  44 0032 8093 CD00             sts 205,r24
  45 0036 2093 CC00             sts 204,r18
  46 003a 8091 C800             lds r24,200
  47 003e 8260                  ori r24,lo8(2)
  48 0040 8093 C800             sts 200,r24
  49 0044 80E1                  ldi r24,lo8(16)
  50 0046 8093 C900             sts 201,r24
  51 004a 8091 CA00             lds r24,202
  52 004e 8F77                  andi r24,lo8(127)
  53 0050 8093 CA00             sts 202,r24
  54 0054 8091 CA00             lds r24,202
  55 0058 8F7B                  andi r24,lo8(-65)
  56 005a 8093 CA00             sts 202,r24
  57 005e 8091 CA00             lds r24,202
  58 0062 8F7D                  andi r24,lo8(-33)
  59 0064 8093 CA00             sts 202,r24
  60 0068 8091 CA00             lds r24,202
  61 006c 8F7E                  andi r24,lo8(-17)
  62 006e 8093 CA00             sts 202,r24
  63 0072 8091 CA00             lds r24,202
  64 0076 877F                  andi r24,lo8(-9)
  65 0078 8093 CA00             sts 202,r24
  66 007c 8091 C900             lds r24,201
  67 0080 8B7F                  andi r24,lo8(-5)
  68 0082 8093 C900             sts 201,r24
  69 0086 8091 CA00             lds r24,202
  70 008a 8460                  ori r24,lo8(4)
  71 008c 8093 CA00             sts 202,r24
  72 0090 8091 CA00             lds r24,202
  73 0094 8260                  ori r24,lo8(2)
  74 0096 8093 CA00             sts 202,r24
  75                    .L7:
  76 009a 8091 C800             lds r24,200
  77 009e 87FF                  sbrs r24,7
  78 00a0 03C0                  rjmp .L6
  79 00a2 8091 CE00             lds r24,206
  80 00a6 F9CF                  rjmp .L7
  81                    .L6:
  82 00a8 8091 C900             lds r24,201
  83 00ac 8068                  ori r24,lo8(-128)
  84 00ae 8093 C900             sts 201,r24
  85 00b2 4FBF                  out 95-0x20,r20
  86                    /* epilogue: frame size=0 */
  87 00b4 0895                  ret
  88                    /* epilogue end (size=1) */
  89                    /* function SpektrumUartInit size 92 (91) */
  91                            .section        .progmem.data,"a",@progbits
  94                    __c.5:
  95 0000 0A0D 506C             .string "\n\rPlease connect Spektrum receiver for binding NOW..."
  95      6561 7365 
  95      2063 6F6E 
  95      6E65 6374 
  95      2053 7065 
  98                    __c.6:
  99 0036 6F6B 2E0A             .string "ok.\n\r"
  99      0D00 
 102                    __c.7:
 103 003c 5469 6D65             .string "Timeout.\n\r"
 103      6F75 742E 
 103      0A0D 00
 104                            .text
 105                    .global SpektrumBinding
 107                    SpektrumBinding:
 108                    /* prologue: frame size=0 */
 109 00b6 FF92                  push r15
 110 00b8 0F93                  push r16
 111 00ba 1F93                  push r17
 112 00bc CF93                  push r28
 113 00be DF93                  push r29
 114                    /* prologue end (size=5) */
 115 00c0 80E1                  ldi r24,lo8(10000)
 116 00c2 97E2                  ldi r25,hi8(10000)
 117 00c4 0E94 0000             call SetDelay
 118 00c8 EC01                  movw r28,r24
 119 00ca FF24                  clr r15
 120 00cc 8091 C900             lds r24,201
 121 00d0 8F77                  andi r24,lo8(127)
 122 00d2 8093 C900             sts 201,r24
 123 00d6 8091 C900             lds r24,201
 124 00da 8F7E                  andi r24,lo8(-17)
 125 00dc 8093 C900             sts 201,r24
 126 00e0 5A98                  cbi 43-0x20,2
 127 00e2 80E0                  ldi r24,lo8(__c.5)
 128 00e4 90E0                  ldi r25,hi8(__c.5)
 129 00e6 9F93                  push r25
 130 00e8 8F93                  push r24
 131 00ea 00E0                  ldi r16,lo8(pm(uart_putchar))
 132 00ec 10E0                  ldi r17,hi8(pm(uart_putchar))
 133 00ee 1F93                  push r17
 134 00f0 0F93                  push r16
 135 00f2 E091 0000             lds r30,_printf_P
 136 00f6 F091 0000             lds r31,(_printf_P)+1
 137 00fa 0995                  icall
 138 00fc 0F90                  pop __tmp_reg__
 139 00fe 0F90                  pop __tmp_reg__
 140 0100 0F90                  pop __tmp_reg__
 141 0102 0F90                  pop __tmp_reg__
 142 0104 02C0                  rjmp .L9
 143                    .L12:
 144 0106 4A99                  sbic 41-0x20,2
 145 0108 6CC0                  rjmp .L96
 146                    .L9:
 147 010a CE01                  movw r24,r28
 148 010c 0E94 0000             call CheckDelay
 149 0110 8823                  tst r24
 150 0112 C9F3                  breq .L12
 151                    .L10:
 152 0114 E091 0000             lds r30,_printf_P
 153 0118 F091 0000             lds r31,(_printf_P)+1
 154 011c FF20                  tst r15
 155 011e 09F4                  brne .+2
 156 0120 68C0                  rjmp .L13
 157 0122 80E0                  ldi r24,lo8(__c.6)
 158 0124 90E0                  ldi r25,hi8(__c.6)
 159 0126 9F93                  push r25
 160 0128 8F93                  push r24
 161 012a 1F93                  push r17
 162 012c 0F93                  push r16
 163 012e 0995                  icall
 164 0130 529A                  sbi 42-0x20,2
 165 0132 0F90                  pop __tmp_reg__
 166 0134 0F90                  pop __tmp_reg__
 167 0136 0F90                  pop __tmp_reg__
 168 0138 0F90                  pop __tmp_reg__
 169                    .L14:
 170 013a CE01                  movw r24,r28
 171 013c 0E94 0000             call CheckDelay
 172 0140 8823                  tst r24
 173 0142 D9F3                  breq .L14
 174 0144 83E6                  ldi r24,lo8(99)
 175 0146 90E0                  ldi r25,hi8(99)
 176                    .L20:
 177 0148 5A9A                  sbi 43-0x20,2
 178 014a 0197                  sbiw r24,1
 179 014c 97FF                  sbrs r25,7
 180 014e FCCF                  rjmp .L20
 181 0150 8FE8                  ldi r24,lo8(399)
 182 0152 91E0                  ldi r25,hi8(399)
 183                    .L24:
 184 0154 5A98                  cbi 43-0x20,2
 185 0156 0197                  sbiw r24,1
 186 0158 97FF                  sbrs r25,7
 187 015a FCCF                  rjmp .L24
 188 015c 89E0                  ldi r24,lo8(9)
 189 015e 90E0                  ldi r25,hi8(9)
 190                    .L28:
 191 0160 5A9A                  sbi 43-0x20,2
 192 0162 0197                  sbiw r24,1
 193 0164 97FF                  sbrs r25,7
 194 0166 FCCF                  rjmp .L28
 195 0168 89E0                  ldi r24,lo8(9)
 196 016a 90E0                  ldi r25,hi8(9)
 197                    .L32:
 198 016c 5A98                  cbi 43-0x20,2
 199 016e 0197                  sbiw r24,1
 200 0170 97FF                  sbrs r25,7
 201 0172 FCCF                  rjmp .L32
 202 0174 8FE8                  ldi r24,lo8(399)
 203 0176 91E0                  ldi r25,hi8(399)
 204                    .L36:
 205 0178 5A9A                  sbi 43-0x20,2
 206 017a 0197                  sbiw r24,1
 207 017c 97FF                  sbrs r25,7
 208 017e FCCF                  rjmp .L36
 209 0180 8FE8                  ldi r24,lo8(399)
 210 0182 91E0                  ldi r25,hi8(399)
 211                    .L40:
 212 0184 5A98                  cbi 43-0x20,2
 213 0186 0197                  sbiw r24,1
 214 0188 97FF                  sbrs r25,7
 215 018a FCCF                  rjmp .L40
 216 018c 89E0                  ldi r24,lo8(9)
 217 018e 90E0                  ldi r25,hi8(9)
 218                    .L44:
 219 0190 5A9A                  sbi 43-0x20,2
 220 0192 0197                  sbiw r24,1
 221 0194 97FF                  sbrs r25,7
 222 0196 FCCF                  rjmp .L44
 223 0198 89E0                  ldi r24,lo8(9)
 224 019a 90E0                  ldi r25,hi8(9)
 225                    .L48:
 226 019c 5A98                  cbi 43-0x20,2
 227 019e 0197                  sbiw r24,1
 228 01a0 97FF                  sbrs r25,7
 229 01a2 FCCF                  rjmp .L48
 230 01a4 8FE8                  ldi r24,lo8(399)
 231 01a6 91E0                  ldi r25,hi8(399)
 232                    .L52:
 233 01a8 5A9A                  sbi 43-0x20,2
 234 01aa 0197                  sbiw r24,1
 235 01ac 97FF                  sbrs r25,7
 236 01ae FCCF                  rjmp .L52
 237 01b0 8FE8                  ldi r24,lo8(399)
 238 01b2 91E0                  ldi r25,hi8(399)
 239                    .L56:
 240 01b4 5A98                  cbi 43-0x20,2
 241 01b6 0197                  sbiw r24,1
 242 01b8 97FF                  sbrs r25,7
 243 01ba FCCF                  rjmp .L56
 244 01bc 89E0                  ldi r24,lo8(9)
 245 01be 90E0                  ldi r25,hi8(9)
 246                    .L60:
 247 01c0 5A9A                  sbi 43-0x20,2
 248 01c2 0197                  sbiw r24,1
 249 01c4 97FF                  sbrs r25,7
 250 01c6 FCCF                  rjmp .L60
 251 01c8 89E0                  ldi r24,lo8(9)
 252 01ca 90E0                  ldi r25,hi8(9)
 253                    .L64:
 254 01cc 5A98                  cbi 43-0x20,2
 255 01ce 0197                  sbiw r24,1
 256 01d0 97FF                  sbrs r25,7
 257 01d2 FCCF                  rjmp .L64
 258 01d4 8FE8                  ldi r24,lo8(399)
 259 01d6 91E0                  ldi r25,hi8(399)
 260                    .L68:
 261 01d8 5A9A                  sbi 43-0x20,2
 262 01da 0197                  sbiw r24,1
 263 01dc 97FF                  sbrs r25,7
 264 01de FCCF                  rjmp .L68
 265 01e0 13C0                  rjmp .L69
 266                    .L96:
 267 01e2 8AE5                  ldi r24,lo8(90)
 268 01e4 90E0                  ldi r25,hi8(90)
 269 01e6 0E94 0000             call SetDelay
 270 01ea EC01                  movw r28,r24
 271 01ec 91E0                  ldi r25,lo8(1)
 272 01ee F92E                  mov r15,r25
 273 01f0 91CF                  rjmp .L10
 274                    .L13:
 275 01f2 80E0                  ldi r24,lo8(__c.7)
 276 01f4 90E0                  ldi r25,hi8(__c.7)
 277 01f6 9F93                  push r25
 278 01f8 8F93                  push r24
 279 01fa 1F93                  push r17
 280 01fc 0F93                  push r16
 281 01fe 0995                  icall
 282 0200 0F90                  pop __tmp_reg__
 283 0202 0F90                  pop __tmp_reg__
 284 0204 0F90                  pop __tmp_reg__
 285 0206 0F90                  pop __tmp_reg__
 286                    .L69:
 287 0208 5298                  cbi 42-0x20,2
 288 020a 5A98                  cbi 43-0x20,2
 289 020c 0E94 0000             call SpektrumUartInit
 290                    /* epilogue: frame size=0 */
 291 0210 E5E0                  ldi r30,5
 292 0212 CDB7                  in r28,__SP_L__
 293 0214 DEB7                  in r29,__SP_H__
 294 0216 0C94 0000             jmp __epilogue_restores__+26
 295                    /* epilogue end (size=5) */
 296                    /* function SpektrumBinding size 178 (168) */
 298                            .lcomm Sync.0,1
 299                            .lcomm FrameCnt.1,1
 300                            .lcomm ByteHigh.2,1
 301                            .data
 304                    ReSync.3:
 305 0000 01                    .byte   1
 306                            .lcomm Frame2.4,1
 307                            .text
 308                    .global SpektrumParser
 310                    SpektrumParser:
 311                    /* prologue: frame size=0 */
 312 021a EF92                  push r14
 313 021c FF92                  push r15
 314 021e 0F93                  push r16
 315 0220 1F93                  push r17
 316 0222 CF93                  push r28
 317 0224 DF93                  push r29
 318                    /* prologue end (size=6) */
 319 0226 482F                  mov r20,r24
 320 0228 00E0                  ldi r16,lo8(0)
 321 022a 10E0                  ldi r17,hi8(0)
 322 022c 8091 0000             lds r24,ReSync.3
 323 0230 8130                  cpi r24,lo8(1)
 324 0232 61F4                  brne .L98
 325 0234 1092 0000             sts ReSync.3,__zero_reg__
 326 0238 84E4                  ldi r24,lo8(68)
 327 023a 8093 0000             sts SpektrumTimer,r24
 328 023e 1092 0000             sts FrameCnt.1,__zero_reg__
 329 0242 1092 0000             sts Sync.0,__zero_reg__
 330 0246 1092 0000             sts ByteHigh.2,__zero_reg__
 331 024a 2BC1                  rjmp .L97
 332                    .L98:
 333 024c 8091 0000             lds r24,SpektrumTimer
 334 0250 8823                  tst r24
 335 0252 19F4                  brne .L100
 336 0254 21E0                  ldi r18,lo8(1)
 337 0256 30E0                  ldi r19,hi8(1)
 338 0258 01C0                  rjmp .L101
 339                    .L100:
 340 025a 9801                  movw r18,r16
 341                    .L101:
 342 025c 9091 0000             lds r25,Sync.0
 343 0260 9923                  tst r25
 344 0262 71F4                  brne .L102
 345 0264 232B                  or r18,r19
 346 0266 11F0                  breq .L103
 347 0268 81E0                  ldi r24,lo8(1)
 348 026a 10C0                  rjmp .L138
 349                    .L103:
 350 026c 84E4                  ldi r24,lo8(68)
 351 026e 8093 0000             sts SpektrumTimer,r24
 352 0272 9093 0000             sts FrameCnt.1,r25
 353 0276 9093 0000             sts Sync.0,r25
 354 027a 9093 0000             sts ByteHigh.2,r25
 355 027e FAC0                  rjmp .L105
 356                    .L102:
 357 0280 9130                  cpi r25,lo8(1)
 358 0282 69F4                  brne .L106
 359 0284 232B                  or r18,r19
 360 0286 09F0                  breq .+2
 361 0288 EBC0                  rjmp .L112
 362 028a 82E0                  ldi r24,lo8(2)
 363                    .L138:
 364 028c 8093 0000             sts Sync.0,r24
 365 0290 8091 0000             lds r24,FrameCnt.1
 366 0294 8F5F                  subi r24,lo8(-(1))
 367 0296 8093 0000             sts FrameCnt.1,r24
 368 029a 83E0                  ldi r24,lo8(3)
 369 029c E9C0                  rjmp .L136
 370                    .L106:
 371 029e 9230                  cpi r25,lo8(2)
 372 02a0 D1F4                  brne .L108
 373 02a2 232B                  or r18,r19
 374 02a4 09F0                  breq .+2
 375 02a6 DCC0                  rjmp .L112
 376 02a8 83E0                  ldi r24,lo8(3)
 377 02aa 8093 0000             sts SpektrumTimer,r24
 378 02ae 4093 0000             sts ByteHigh.2,r20
 379 02b2 9091 0000             lds r25,FrameCnt.1
 380 02b6 9230                  cpi r25,lo8(2)
 381 02b8 39F4                  brne .L109
 382 02ba 1092 0000             sts Frame2.4,__zero_reg__
 383 02be 47FF                  sbrs r20,7
 384 02c0 03C0                  rjmp .L109
 385 02c2 81E0                  ldi r24,lo8(1)
 386 02c4 8093 0000             sts Frame2.4,r24
 387                    .L109:
 388 02c8 83E0                  ldi r24,lo8(3)
 389 02ca 8093 0000             sts Sync.0,r24
 390 02ce 9F5F                  subi r25,lo8(-(1))
 391 02d0 9093 0000             sts FrameCnt.1,r25
 392 02d4 CFC0                  rjmp .L105
 393                    .L108:
 394 02d6 9330                  cpi r25,lo8(3)
 395 02d8 09F0                  breq .+2
 396 02da C2C0                  rjmp .L112
 397 02dc 232B                  or r18,r19
 398 02de 09F0                  breq .+2
 399 02e0 BFC0                  rjmp .L112
 400 02e2 9093 0000             sts SpektrumTimer,r25
 401 02e6 82E0                  ldi r24,lo8(2)
 402 02e8 8093 0000             sts Sync.0,r24
 403 02ec 8091 0000             lds r24,FrameCnt.1
 404 02f0 8F5F                  subi r24,lo8(-(1))
 405 02f2 8093 0000             sts FrameCnt.1,r24
 406 02f6 2091 0000             lds r18,ByteHigh.2
 407 02fa 822F                  mov r24,r18
 408 02fc 9927                  clr r25
 409 02fe 782F                  mov r23,r24
 410 0300 6627                  clr r22
 411 0302 842F                  mov r24,r20
 412 0304 9927                  clr r25
 413 0306 682B                  or r22,r24
 414 0308 792B                  or r23,r25
 415 030a 8091 0000             lds r24,EE_Parameter+39
 416 030e 8130                  cpi r24,lo8(1)
 417 0310 49F4                  brne .L113
 418 0312 7370                  andi r23,hi8(1023)
 419 0314 CB01                  movw r24,r22
 420 0316 8050                  subi r24,lo8(-(-512))
 421 0318 9240                  sbci r25,hi8(-(-512))
 422 031a 63E0                  ldi r22,lo8(3)
 423 031c 70E0                  ldi r23,hi8(3)
 424 031e 0E94 0000             call __divmodhi4
 425 0322 17C0                  rjmp .L137
 426                    .L113:
 427 0324 8230                  cpi r24,lo8(2)
 428 0326 61F4                  brne .L115
 429 0328 7770                  andi r23,hi8(2047)
 430 032a CB01                  movw r24,r22
 431 032c 8050                  subi r24,lo8(-(-1024))
 432 032e 9440                  sbci r25,hi8(-(-1024))
 433 0330 66E0                  ldi r22,lo8(6)
 434 0332 70E0                  ldi r23,hi8(6)
 435 0334 0E94 0000             call __divmodhi4
 436 0338 2695                  lsr r18
 437 033a 2695                  lsr r18
 438 033c 2695                  lsr r18
 439 033e 0BC0                  rjmp .L135
 440                    .L115:
 441 0340 7370                  andi r23,hi8(1023)
 442 0342 6856                  subi r22,lo8(-(-360))
 443 0344 7140                  sbci r23,hi8(-(-360))
 444 0346 CB01                  movw r24,r22
 445 0348 77FD                  sbrc r23,7
 446 034a 0196                  adiw r24,1
 447                    .L117:
 448 034c BC01                  movw r22,r24
 449 034e 7595                  asr r23
 450 0350 6795                  ror r22
 451                    .L137:
 452 0352 2695                  lsr r18
 453 0354 2695                  lsr r18
 454                    .L135:
 455 0356 022F                  mov r16,r18
 456 0358 1127                  clr r17
 457 035a 0F70                  andi r16,lo8(15)
 458 035c 1070                  andi r17,hi8(15)
 459 035e 0F5F                  subi r16,lo8(-(1))
 460 0360 1F4F                  sbci r17,hi8(-(1))
 461 0362 0D30                  cpi r16,13
 462 0364 1105                  cpc r17,__zero_reg__
 463 0366 08F0                  brlo .+2
 464 0368 74C0                  rjmp .L118
 465 036a 7801                  movw r14,r16
 466 036c E00E                  add r14,r16
 467 036e F11E                  adc r15,r17
 468 0370 F701                  movw r30,r14
 469 0372 E050                  subi r30,lo8(-(PPM_in))
 470 0374 F040                  sbci r31,hi8(-(PPM_in))
 471 0376 8081                  ld r24,Z
 472 0378 9181                  ldd r25,Z+1
 473 037a 9B01                  movw r18,r22
 474 037c 281B                  sub r18,r24
 475 037e 390B                  sbc r19,r25
 476 0380 C901                  movw r24,r18
 477 0382 37FF                  sbrs r19,7
 478 0384 03C0                  rjmp .L120
 479 0386 9095                  com r25
 480 0388 8195                  neg r24
 481 038a 9F4F                  sbci r25,lo8(-1)
 482                    .L120:
 483 038c 0697                  sbiw r24,6
 484 038e 94F4                  brge .L119
 485 0390 8091 0000             lds r24,SenderOkay
 486 0394 883C                  cpi r24,lo8(-56)
 487 0396 30F4                  brsh .L121
 488 0398 8091 0000             lds r24,SenderOkay
 489 039c 865F                  subi r24,lo8(-(10))
 490 039e 8093 0000             sts SenderOkay,r24
 491 03a2 08C0                  rjmp .L119
 492                    .L121:
 493 03a4 88EC                  ldi r24,lo8(-56)
 494 03a6 8093 0000             sts SenderOkay,r24
 495 03aa 8091 6F00             lds r24,111
 496 03ae 8F7D                  andi r24,lo8(-33)
 497 03b0 8093 6F00             sts 111,r24
 498                    .L119:
 499 03b4 F701                  movw r30,r14
 500 03b6 E050                  subi r30,lo8(-(PPM_in))
 501 03b8 F040                  sbci r31,hi8(-(PPM_in))
 502 03ba 8081                  ld r24,Z
 503 03bc 9181                  ldd r25,Z+1
 504 03be 9C01                  movw r18,r24
 505 03c0 220F                  lsl r18
 506 03c2 331F                  rol r19
 507 03c4 280F                  add r18,r24
 508 03c6 391F                  adc r19,r25
 509 03c8 260F                  add r18,r22
 510 03ca 371F                  adc r19,r23
 511 03cc 37FF                  sbrs r19,7
 512 03ce 02C0                  rjmp .L123
 513 03d0 2D5F                  subi r18,lo8(-(3))
 514 03d2 3F4F                  sbci r19,hi8(-(3))
 515                    .L123:
 516 03d4 E901                  movw r28,r18
 517 03d6 D595                  asr r29
 518 03d8 C795                  ror r28
 519 03da D595                  asr r29
 520 03dc C795                  ror r28
 521 03de CB01                  movw r24,r22
 522 03e0 0196                  adiw r24,1
 523 03e2 8C17                  cp r24,r28
 524 03e4 9D07                  cpc r25,r29
 525 03e6 14F4                  brge .L124
 526 03e8 2197                  sbiw r28,1
 527 03ea 06C0                  rjmp .L125
 528                    .L124:
 529 03ec 6150                  subi r22,lo8(-(-1))
 530 03ee 7040                  sbci r23,hi8(-(-1))
 531 03f0 C617                  cp r28,r22
 532 03f2 D707                  cpc r29,r23
 533 03f4 0CF4                  brge .L125
 534 03f6 2196                  adiw r28,1
 535                    .L125:
 536 03f8 8091 0000             lds r24,SenderOkay
 537 03fc 843B                  cpi r24,lo8(-76)
 538 03fe D0F0                  brlo .L127
 539 0400 F701                  movw r30,r14
 540 0402 E050                  subi r30,lo8(-(PPM_in))
 541 0404 F040                  sbci r31,hi8(-(PPM_in))
 542 0406 8081                  ld r24,Z
 543 0408 9181                  ldd r25,Z+1
 544 040a FE01                  movw r30,r28
 545 040c E81B                  sub r30,r24
 546 040e F90B                  sbc r31,r25
 547 0410 CF01                  movw r24,r30
 548 0412 63E0                  ldi r22,lo8(3)
 549 0414 70E0                  ldi r23,hi8(3)
 550 0416 0E94 0000             call __divmodhi4
 551 041a CB01                  movw r24,r22
 552 041c 880F                  lsl r24
 553 041e 991F                  rol r25
 554 0420 860F                  add r24,r22
 555 0422 971F                  adc r25,r23
 556 0424 20E0                  ldi r18,lo8(PPM_diff)
 557 0426 30E0                  ldi r19,hi8(PPM_diff)
 558 0428 E20E                  add r14,r18
 559 042a F31E                  adc r15,r19
 560 042c F701                  movw r30,r14
 561 042e 9183                  std Z+1,r25
 562 0430 8083                  st Z,r24
 563 0432 07C0                  rjmp .L128
 564                    .L127:
 565 0434 20E0                  ldi r18,lo8(PPM_diff)
 566 0436 30E0                  ldi r19,hi8(PPM_diff)
 567 0438 E20E                  add r14,r18
 568 043a F31E                  adc r15,r19
 569 043c F701                  movw r30,r14
 570 043e 1182                  std Z+1,__zero_reg__
 571 0440 1082                  st Z,__zero_reg__
 572                    .L128:
 573 0442 000F                  add r16,r16
 574 0444 111F                  adc r17,r17
 575 0446 0050                  subi r16,lo8(-(PPM_in))
 576 0448 1040                  sbci r17,hi8(-(PPM_in))
 577 044a F801                  movw r30,r16
 578 044c D183                  std Z+1,r29
 579 044e C083                  st Z,r28
 580 0450 11C0                  rjmp .L105
 581                    .L118:
 582 0452 0231                  cpi r16,18
 583 0454 1105                  cpc r17,__zero_reg__
 584 0456 70F0                  brlo .L105
 585 0458 81E0                  ldi r24,lo8(1)
 586 045a 8093 0000             sts ReSync.3,r24
 587 045e 0AC0                  rjmp .L105
 588                    .L112:
 589 0460 81E0                  ldi r24,lo8(1)
 590 0462 8093 0000             sts ReSync.3,r24
 591 0466 1092 0000             sts FrameCnt.1,__zero_reg__
 592 046a 1092 0000             sts Frame2.4,__zero_reg__
 593 046e 84E4                  ldi r24,lo8(68)
 594                    .L136:
 595 0470 8093 0000             sts SpektrumTimer,r24
 596                    .L105:
 597 0474 8091 0000             lds r24,FrameCnt.1
 598 0478 8031                  cpi r24,lo8(16)
 599 047a 98F0                  brlo .L97
 600 047c 8091 0000             lds r24,Frame2.4
 601 0480 8823                  tst r24
 602 0482 31F4                  brne .L133
 603 0484 8091 0000             lds r24,ReSync.3
 604 0488 8823                  tst r24
 605 048a 11F4                  brne .L133
 606 048c 8093 0000             sts NewPpmData,r24
 607                    .L133:
 608 0490 1092 0000             sts FrameCnt.1,__zero_reg__
 609 0494 1092 0000             sts Frame2.4,__zero_reg__
 610 0498 1092 0000             sts Sync.0,__zero_reg__
 611 049c 84E4                  ldi r24,lo8(68)
 612 049e 8093 0000             sts SpektrumTimer,r24
 613                    .L97:
 614                    /* epilogue: frame size=0 */
 615 04a2 E6E0                  ldi r30,6
 616 04a4 CDB7                  in r28,__SP_L__
 617 04a6 DEB7                  in r29,__SP_H__
 618 04a8 0C94 0000             jmp __epilogue_restores__+24
 619                    /* epilogue end (size=5) */
 620                    /* function SpektrumParser size 334 (323) */
 622                    /* File "Spektrum.c": code  604 = 0x025c ( 582), prologues  11, epilogues  11 */
DEFINED SYMBOLS
                            *ABS*:00000000 Spektrum.c
C:\Users\Arthur-P\AppData\Local\Temp/ccYtaaaa.s:3      *ABS*:0000003f __SREG__
C:\Users\Arthur-P\AppData\Local\Temp/ccYtaaaa.s:4      *ABS*:0000003e __SP_H__
C:\Users\Arthur-P\AppData\Local\Temp/ccYtaaaa.s:5      *ABS*:0000003d __SP_L__
C:\Users\Arthur-P\AppData\Local\Temp/ccYtaaaa.s:6      *ABS*:00000000 __tmp_reg__
C:\Users\Arthur-P\AppData\Local\Temp/ccYtaaaa.s:7      *ABS*:00000001 __zero_reg__
C:\Users\Arthur-P\AppData\Local\Temp/ccYtaaaa.s:15     .bss:00000000 SpektrumTimer
C:\Users\Arthur-P\AppData\Local\Temp/ccYtaaaa.s:20     .text:00000000 SpektrumUartInit
C:\Users\Arthur-P\AppData\Local\Temp/ccYtaaaa.s:94     .progmem.data:00000000 __c.5
C:\Users\Arthur-P\AppData\Local\Temp/ccYtaaaa.s:98     .progmem.data:00000036 __c.6
C:\Users\Arthur-P\AppData\Local\Temp/ccYtaaaa.s:102    .progmem.data:0000003c __c.7
C:\Users\Arthur-P\AppData\Local\Temp/ccYtaaaa.s:107    .text:000000b6 SpektrumBinding
                             .bss:00000001 Sync.0
C:\Users\Arthur-P\AppData\Local\Temp/ccYtaaaa.s:298    .bss:00000002 FrameCnt.1
C:\Users\Arthur-P\AppData\Local\Temp/ccYtaaaa.s:299    .bss:00000003 ByteHigh.2
C:\Users\Arthur-P\AppData\Local\Temp/ccYtaaaa.s:304    .data:00000000 ReSync.3
C:\Users\Arthur-P\AppData\Local\Temp/ccYtaaaa.s:300    .bss:00000004 Frame2.4
C:\Users\Arthur-P\AppData\Local\Temp/ccYtaaaa.s:310    .text:0000021a SpektrumParser

UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss
SetDelay
uart_putchar
_printf_P
CheckDelay
__epilogue_restores__
EE_Parameter
__divmodhi4
PPM_in
SenderOkay
PPM_diff
NewPpmData