Subversion Repositories FlightCtrl

Rev

Blame | Last modification | View Log | RSS feed

   1                            .file   "timer2.c"
   2                    __SREG__ = 0x3f
   3                    __SP_H__ = 0x3e
   4                    __SP_L__ = 0x3d
   5                    __CCP__  = 0x34
   6                    __tmp_reg__ = 0
   7                    __zero_reg__ = 1
   8                            .text
   9                    .global TIMER2_Init
  11                    TIMER2_Init:
  12                    /* prologue: function */
  13                    /* frame size = 0 */
  14 0000 9FB7                  in r25,__SREG__
  15                    /* #APP */
  16                     ;  78 "timer2.c" 1
  17 0002 F894                  cli
  18                     ;  0 "" 2
  19                    /* #NOAPP */
  20 0004 5798                  cbi 42-32,7
  21 0006 5F98                  cbi 43-32,7
  22 0008 3E9A                  sbi 39-32,6
  23 000a 469A                  sbi 40-32,6
  24 000c A0EB                  ldi r26,lo8(176)
  25 000e B0E0                  ldi r27,hi8(176)
  26 0010 8C91                  ld r24,X
  27 0012 8F70                  andi r24,lo8(15)
  28 0014 8C93                  st X,r24
  29 0016 8C91                  ld r24,X
  30 0018 8360                  ori r24,lo8(3)
  31 001a 8C93                  st X,r24
  32 001c E1EB                  ldi r30,lo8(177)
  33 001e F0E0                  ldi r31,hi8(177)
  34 0020 8081                  ld r24,Z
  35 0022 8B73                  andi r24,lo8(59)
  36 0024 8083                  st Z,r24
  37 0026 8081                  ld r24,Z
  38 0028 8B60                  ori r24,lo8(11)
  39 002a 8083                  st Z,r24
  40 002c 1092 B200             sts 178,__zero_reg__
  41 0030 8FEF                  ldi r24,lo8(-1)
  42 0032 8093 B300             sts 179,r24
  43 0036 8C91                  ld r24,X
  44 0038 8068                  ori r24,lo8(-128)
  45 003a 8C93                  st X,r24
  46 003c E0E7                  ldi r30,lo8(112)
  47 003e F0E0                  ldi r31,hi8(112)
  48 0040 8081                  ld r24,Z
  49 0042 8A7F                  andi r24,lo8(-6)
  50 0044 8083                  st Z,r24
  51 0046 8081                  ld r24,Z
  52 0048 8260                  ori r24,lo8(2)
  53 004a 8083                  st Z,r24
  54 004c 9FBF                  out __SREG__,r25
  55                    /* epilogue start */
  56 004e 0895                  ret
  58                    .global Servo_On
  60                    Servo_On:
  61                    /* prologue: function */
  62                    /* frame size = 0 */
  63 0050 81E0                  ldi r24,lo8(1)
  64 0052 8093 0000             sts ServoActive,r24
  65 0056 579A                  sbi 42-32,7
  66                    /* epilogue start */
  67 0058 0895                  ret
  69                    .global Servo_Off
  71                    Servo_Off:
  72                    /* prologue: function */
  73                    /* frame size = 0 */
  74 005a 1092 0000             sts ServoActive,__zero_reg__
  75 005e 5798                  cbi 42-32,7
  76 0060 469A                  sbi 40-32,6
  77                    /* epilogue start */
  78 0062 0895                  ret
  80                    .global __vector_9
  82                    __vector_9:
  83 0064 1F92                  push __zero_reg__
  84 0066 0F92                  push r0
  85 0068 0FB6                  in r0,__SREG__
  86 006a 0F92                  push r0
  87 006c 1124                  clr __zero_reg__
  88 006e CF92                  push r12
  89 0070 DF92                  push r13
  90 0072 EF92                  push r14
  91 0074 FF92                  push r15
  92 0076 0F93                  push r16
  93 0078 1F93                  push r17
  94 007a 2F93                  push r18
  95 007c 3F93                  push r19
  96 007e 4F93                  push r20
  97 0080 5F93                  push r21
  98 0082 6F93                  push r22
  99 0084 7F93                  push r23
 100 0086 8F93                  push r24
 101 0088 9F93                  push r25
 102 008a AF93                  push r26
 103 008c BF93                  push r27
 104 008e EF93                  push r30
 105 0090 FF93                  push r31
 106                    /* prologue: Signal */
 107                    /* frame size = 0 */
 108 0092 8091 0000             lds r24,BoardRelease
 109 0096 8431                  cpi r24,lo8(20)
 110 0098 00F4                  brsh .L8
 111 009a 8091 0000             lds r24,PulseOutput.1543
 112 009e 8823                  tst r24
 113 00a0 01F4                  brne .+2
 114 00a2 00C0                  rjmp .L51
 115                    .L59:
 116 00a4 4091 0000             lds r20,RemainingPulse.1544
 117 00a8 5091 0000             lds r21,(RemainingPulse.1544)+1
 118 00ac 81E0                  ldi r24,hi8(383)
 119 00ae 4F37                  cpi r20,lo8(383)
 120 00b0 5807                  cpc r21,r24
 121 00b2 00F0                  brlo .+2
 122 00b4 00C0                  rjmp .L61
 123                    .L43:
 124 00b6 4F3F                  cpi r20,255
 125 00b8 5105                  cpc r21,__zero_reg__
 126 00ba 01F0                  breq .+4
 127 00bc 00F0                  brlo .+2
 128 00be 00C0                  rjmp .L62
 129 00c0 4093 B300             sts 179,r20
 130 00c4 1092 0000             sts (RemainingPulse.1544)+1,__zero_reg__
 131 00c8 1092 0000             sts RemainingPulse.1544,__zero_reg__
 132 00cc 1092 0000             sts PulseOutput.1543,__zero_reg__
 133                    .L47:
 134                    /* epilogue start */
 135 00d0 FF91                  pop r31
 136 00d2 EF91                  pop r30
 137 00d4 BF91                  pop r27
 138 00d6 AF91                  pop r26
 139 00d8 9F91                  pop r25
 140 00da 8F91                  pop r24
 141 00dc 7F91                  pop r23
 142 00de 6F91                  pop r22
 143 00e0 5F91                  pop r21
 144 00e2 4F91                  pop r20
 145 00e4 3F91                  pop r19
 146 00e6 2F91                  pop r18
 147 00e8 1F91                  pop r17
 148 00ea 0F91                  pop r16
 149 00ec FF90                  pop r15
 150 00ee EF90                  pop r14
 151 00f0 DF90                  pop r13
 152 00f2 CF90                  pop r12
 153 00f4 0F90                  pop r0
 154 00f6 0FBE                  out __SREG__,r0
 155 00f8 0F90                  pop r0
 156 00fa 1F90                  pop __zero_reg__
 157 00fc 1895                  reti
 158                    .L8:
 159 00fe 8091 0000             lds r24,PulseOutput.1543
 160 0102 8823                  tst r24
 161 0104 01F4                  brne .L59
 162 0106 8091 B000             lds r24,176
 163 010a 86FF                  sbrs r24,6
 164 010c 00C0                  rjmp .L20
 165 010e 8091 B000             lds r24,176
 166 0112 8F7B                  andi r24,lo8(-65)
 167 0114 8093 B000             sts 176,r24
 168 0118 E091 0000             lds r30,ServoIndex.1546
 169 011c EE23                  tst r30
 170 011e 01F0                  breq .+2
 171 0120 00C0                  rjmp .L21
 172 0122 8091 0000             lds r24,ParamSet+47
 173 0126 90E0                  ldi r25,lo8(0)
 174 0128 2DED                  ldi r18,lo8(1757)
 175 012a 36E0                  ldi r19,hi8(1757)
 176 012c A901                  movw r20,r18
 177 012e 849F                  mul r24,r20
 178 0130 9001                  movw r18,r0
 179 0132 859F                  mul r24,r21
 180 0134 300D                  add r19,r0
 181 0136 949F                  mul r25,r20
 182 0138 300D                  add r19,r0
 183 013a 1124                  clr r1
 184 013c 8091 0000             lds r24,ServoFrameTime.1545
 185 0140 9091 0000             lds r25,(ServoFrameTime.1545)+1
 186 0144 281B                  sub r18,r24
 187 0146 390B                  sbc r19,r25
 188 0148 3093 0000             sts (RemainingPulse.1544)+1,r19
 189 014c 2093 0000             sts RemainingPulse.1544,r18
 190 0150 1092 0000             sts (ServoFrameTime.1545)+1,__zero_reg__
 191 0154 1092 0000             sts ServoFrameTime.1545,__zero_reg__
 192 0158 469A                  sbi 40-32,6
 193 015a A901                  movw r20,r18
 194                    .L22:
 195 015c 81E0                  ldi r24,lo8(1)
 196 015e 8093 0000             sts PulseOutput.1543,r24
 197 0162 81E0                  ldi r24,hi8(383)
 198 0164 4F37                  cpi r20,lo8(383)
 199 0166 5807                  cpc r21,r24
 200 0168 00F4                  brsh .+2
 201 016a 00C0                  rjmp .L43
 202                    .L61:
 203 016c 8FEF                  ldi r24,lo8(-1)
 204 016e 8093 B300             sts 179,r24
 205 0172 4F5F                  subi r20,lo8(-(-255))
 206 0174 5040                  sbci r21,hi8(-(-255))
 207 0176 5093 0000             sts (RemainingPulse.1544)+1,r21
 208 017a 4093 0000             sts RemainingPulse.1544,r20
 209 017e 00C0                  rjmp .L47
 210                    .L62:
 211 0180 9A01                  movw r18,r20
 212 0182 2F5F                  subi r18,lo8(-(-255))
 213 0184 3040                  sbci r19,hi8(-(-255))
 214 0186 2F37                  cpi r18,127
 215 0188 3105                  cpc r19,__zero_reg__
 216 018a 00F0                  brlo .+2
 217 018c 00C0                  rjmp .L46
 218 018e 80E8                  ldi r24,lo8(-128)
 219 0190 8093 B300             sts 179,r24
 220 0194 4058                  subi r20,lo8(-(-128))
 221 0196 5040                  sbci r21,hi8(-(-128))
 222 0198 5093 0000             sts (RemainingPulse.1544)+1,r21
 223 019c 4093 0000             sts RemainingPulse.1544,r20
 224 01a0 00C0                  rjmp .L47
 225                    .L51:
 226 01a2 8091 B000             lds r24,176
 227 01a6 86FF                  sbrs r24,6
 228 01a8 00C0                  rjmp .L10
 229 01aa 8091 B000             lds r24,176
 230 01ae 8F7B                  andi r24,lo8(-65)
 231 01b0 8093 B000             sts 176,r24
 232 01b4 8091 0000             lds r24,FCParam+21
 233 01b8 482F                  mov r20,r24
 234 01ba 50E0                  ldi r21,lo8(0)
 235 01bc 440F                  lsl r20
 236 01be 551F                  rol r21
 237 01c0 440F                  lsl r20
 238 01c2 551F                  rol r21
 239 01c4 2091 0000             lds r18,ServoNickOffset.1547
 240 01c8 3091 0000             lds r19,(ServoNickOffset.1547)+1
 241 01cc C901                  movw r24,r18
 242 01ce 880F                  lsl r24
 243 01d0 991F                  rol r25
 244 01d2 820F                  add r24,r18
 245 01d4 931F                  adc r25,r19
 246 01d6 480F                  add r20,r24
 247 01d8 591F                  adc r21,r25
 248 01da 57FD                  sbrc r21,7
 249 01dc 00C0                  rjmp .L63
 250                    .L11:
 251 01de CA01                  movw r24,r20
 252 01e0 9595                  asr r25
 253 01e2 8795                  ror r24
 254 01e4 9595                  asr r25
 255 01e6 8795                  ror r24
 256 01e8 9093 0000             sts (ServoNickOffset.1547)+1,r25
 257 01ec 8093 0000             sts ServoNickOffset.1547,r24
 258 01f0 9093 0000             sts (ServoNickValue)+1,r25
 259 01f4 8093 0000             sts ServoNickValue,r24
 260 01f8 8091 0000             lds r24,ParamSet+87
 261 01fc 80FF                  sbrs r24,0
 262 01fe 00C0                  rjmp .L12
 263 0200 C090 0000             lds r12,ServoNickValue
 264 0204 D090 0000             lds r13,(ServoNickValue)+1
 265 0208 E090 0000             lds r14,ParamSet+40
 266 020c FF24                  clr r15
 267 020e 00E0                  ldi r16,lo8(0)
 268 0210 10E0                  ldi r17,hi8(0)
 269 0212 6091 0000             lds r22,IntegralGyroNick
 270 0216 7091 0000             lds r23,(IntegralGyroNick)+1
 271 021a 8091 0000             lds r24,(IntegralGyroNick)+2
 272 021e 9091 0000             lds r25,(IntegralGyroNick)+3
 273 0222 20E8                  ldi r18,lo8(128)
 274 0224 30E0                  ldi r19,hi8(128)
 275 0226 40E0                  ldi r20,hlo8(128)
 276 0228 50E0                  ldi r21,hhi8(128)
 277 022a 0E94 0000             call __divmodsi4
 278 022e C801                  movw r24,r16
 279 0230 B701                  movw r22,r14
 280 0232 0E94 0000             call __mulsi3
 281 0236 660F                  lsl r22
 282 0238 771F                  rol r23
 283 023a 881F                  rol r24
 284 023c 991F                  rol r25
 285 023e 660F                  lsl r22
 286 0240 771F                  rol r23
 287 0242 881F                  rol r24
 288 0244 991F                  rol r25
 289 0246 20E0                  ldi r18,lo8(256)
 290 0248 31E0                  ldi r19,hi8(256)
 291 024a 40E0                  ldi r20,hlo8(256)
 292 024c 50E0                  ldi r21,hhi8(256)
 293 024e 0E94 0000             call __divmodsi4
 294 0252 C20E                  add r12,r18
 295 0254 D31E                  adc r13,r19
 296 0256 D092 0000             sts (ServoNickValue)+1,r13
 297 025a C092 0000             sts ServoNickValue,r12
 298                    .L13:
 299 025e 8091 0000             lds r24,ParamSet+41
 300 0262 282F                  mov r18,r24
 301 0264 30E0                  ldi r19,lo8(0)
 302 0266 220F                  lsl r18
 303 0268 331F                  rol r19
 304 026a 220F                  lsl r18
 305 026c 331F                  rol r19
 306 026e 8091 0000             lds r24,ServoNickValue
 307 0272 9091 0000             lds r25,(ServoNickValue)+1
 308 0276 8217                  cp r24,r18
 309 0278 9307                  cpc r25,r19
 310 027a 04F4                  brge .+2
 311 027c 00C0                  rjmp .L55
 312 027e 8091 0000             lds r24,ParamSet+42
 313 0282 282F                  mov r18,r24
 314 0284 30E0                  ldi r19,lo8(0)
 315 0286 220F                  lsl r18
 316 0288 331F                  rol r19
 317 028a 220F                  lsl r18
 318 028c 331F                  rol r19
 319 028e 8091 0000             lds r24,ServoNickValue
 320 0292 9091 0000             lds r25,(ServoNickValue)+1
 321 0296 2817                  cp r18,r24
 322 0298 3907                  cpc r19,r25
 323 029a 04F4                  brge .+2
 324 029c 00C0                  rjmp .L55
 325                    .L15:
 326 029e 2091 0000             lds r18,ServoNickValue
 327 02a2 3091 0000             lds r19,(ServoNickValue)+1
 328 02a6 2755                  subi r18,lo8(-(425))
 329 02a8 3E4F                  sbci r19,hi8(-(425))
 330 02aa 3093 0000             sts (RemainingPulse.1544)+1,r19
 331 02ae 2093 0000             sts RemainingPulse.1544,r18
 332 02b2 8091 0000             lds r24,ServoNickValue
 333 02b6 9091 0000             lds r25,(ServoNickValue)+1
 334 02ba 97FD                  sbrc r25,7
 335 02bc 00C0                  rjmp .L64
 336                    .L16:
 337 02be 9595                  asr r25
 338 02c0 8795                  ror r24
 339 02c2 9595                  asr r25
 340 02c4 8795                  ror r24
 341 02c6 9093 0000             sts (ServoNickValue)+1,r25
 342 02ca 8093 0000             sts ServoNickValue,r24
 343 02ce 45E0                  ldi r20,hi8(1501)
 344 02d0 2D3D                  cpi r18,lo8(1501)
 345 02d2 3407                  cpc r19,r20
 346 02d4 00F4                  brsh .+2
 347 02d6 00C0                  rjmp .L17
 348 02d8 8CED                  ldi r24,lo8(1500)
 349 02da 95E0                  ldi r25,hi8(1500)
 350 02dc 9093 0000             sts (RemainingPulse.1544)+1,r25
 351 02e0 8093 0000             sts RemainingPulse.1544,r24
 352                    .L18:
 353 02e4 4091 0000             lds r20,RemainingPulse.1544
 354 02e8 5091 0000             lds r21,(RemainingPulse.1544)+1
 355 02ec 5093 0000             sts (ServoFrameTime.1545)+1,r21
 356 02f0 4093 0000             sts ServoFrameTime.1545,r20
 357 02f4 00C0                  rjmp .L22
 358                    .L46:
 359 02f6 8FEF                  ldi r24,lo8(-1)
 360 02f8 8093 B300             sts 179,r24
 361 02fc 3093 0000             sts (RemainingPulse.1544)+1,r19
 362 0300 2093 0000             sts RemainingPulse.1544,r18
 363 0304 00C0                  rjmp .L47
 364                    .L20:
 365 0306 8091 B000             lds r24,176
 366 030a 8064                  ori r24,lo8(64)
 367 030c 8093 B000             sts 176,r24
 368 0310 8CEB                  ldi r24,lo8(188)
 369 0312 90E0                  ldi r25,hi8(188)
 370 0314 9093 0000             sts (RemainingPulse.1544)+1,r25
 371 0318 8093 0000             sts RemainingPulse.1544,r24
 372 031c 8091 0000             lds r24,ServoFrameTime.1545
 373 0320 9091 0000             lds r25,(ServoFrameTime.1545)+1
 374 0324 8454                  subi r24,lo8(-(188))
 375 0326 9F4F                  sbci r25,hi8(-(188))
 376 0328 9093 0000             sts (ServoFrameTime.1545)+1,r25
 377 032c 8093 0000             sts ServoFrameTime.1545,r24
 378 0330 8091 0000             lds r24,ServoActive
 379 0334 8823                  tst r24
 380 0336 01F0                  breq .L41
 381 0338 8091 0000             lds r24,RC_Quality
 382 033c 853B                  cpi r24,lo8(-75)
 383 033e 00F0                  brlo .+2
 384 0340 00C0                  rjmp .L65
 385                    .L41:
 386 0342 469A                  sbi 40-32,6
 387                    .L42:
 388 0344 8091 0000             lds r24,ServoIndex.1546
 389 0348 8F5F                  subi r24,lo8(-(1))
 390 034a 8093 0000             sts ServoIndex.1546,r24
 391 034e 9091 0000             lds r25,ParamSet+47
 392 0352 9817                  cp r25,r24
 393 0354 00F4                  brsh .L58
 394 0356 1092 0000             sts ServoIndex.1546,__zero_reg__
 395                    .L58:
 396 035a 4091 0000             lds r20,RemainingPulse.1544
 397 035e 5091 0000             lds r21,(RemainingPulse.1544)+1
 398 0362 00C0                  rjmp .L22
 399                    .L10:
 400 0364 8091 B000             lds r24,176
 401 0368 8064                  ori r24,lo8(64)
 402 036a 8093 B000             sts 176,r24
 403 036e 8091 0000             lds r24,ParamSet+47
 404 0372 90E0                  ldi r25,lo8(0)
 405 0374 2DED                  ldi r18,lo8(1757)
 406 0376 36E0                  ldi r19,hi8(1757)
 407 0378 829F                  mul r24,r18
 408 037a A001                  movw r20,r0
 409 037c 839F                  mul r24,r19
 410 037e 500D                  add r21,r0
 411 0380 929F                  mul r25,r18
 412 0382 500D                  add r21,r0
 413 0384 1124                  clr r1
 414 0386 8091 0000             lds r24,ServoFrameTime.1545
 415 038a 9091 0000             lds r25,(ServoFrameTime.1545)+1
 416 038e 481B                  sub r20,r24
 417 0390 590B                  sbc r21,r25
 418 0392 00C0                  rjmp .L22
 419                    .L55:
 420 0394 3093 0000             sts (ServoNickValue)+1,r19
 421 0398 2093 0000             sts ServoNickValue,r18
 422 039c 00C0                  rjmp .L15
 423                    .L21:
 424 039e 89EA                  ldi r24,lo8(937)
 425 03a0 93E0                  ldi r25,hi8(937)
 426 03a2 9093 0000             sts (RemainingPulse.1544)+1,r25
 427 03a6 8093 0000             sts RemainingPulse.1544,r24
 428 03aa E130                  cpi r30,lo8(1)
 429 03ac 01F4                  brne .+2
 430 03ae 00C0                  rjmp .L24
 431 03b0 E230                  cpi r30,lo8(2)
 432 03b2 01F4                  brne .+2
 433 03b4 00C0                  rjmp .L66
 434 03b6 F0E0                  ldi r31,lo8(0)
 435 03b8 EE0F                  lsl r30
 436 03ba FF1F                  rol r31
 437 03bc E050                  subi r30,lo8(-(PPM_in))
 438 03be F040                  sbci r31,hi8(-(PPM_in))
 439 03c0 8081                  ld r24,Z
 440 03c2 9181                  ldd r25,Z+1
 441 03c4 880F                  lsl r24
 442 03c6 991F                  rol r25
 443 03c8 8755                  subi r24,lo8(-(937))
 444 03ca 9C4F                  sbci r25,hi8(-(937))
 445 03cc 9093 0000             sts (RemainingPulse.1544)+1,r25
 446 03d0 8093 0000             sts RemainingPulse.1544,r24
 447                    .L32:
 448 03d4 4091 0000             lds r20,RemainingPulse.1544
 449 03d8 5091 0000             lds r21,(RemainingPulse.1544)+1
 450 03dc 85E0                  ldi r24,hi8(1501)
 451 03de 4D3D                  cpi r20,lo8(1501)
 452 03e0 5807                  cpc r21,r24
 453 03e2 00F4                  brsh .+2
 454 03e4 00C0                  rjmp .L39
 455 03e6 4CED                  ldi r20,lo8(1500)
 456 03e8 55E0                  ldi r21,hi8(1500)
 457                    .L40:
 458 03ea 4C5B                  subi r20,lo8(-(-188))
 459 03ec 5040                  sbci r21,hi8(-(-188))
 460 03ee 8091 0000             lds r24,ServoFrameTime.1545
 461 03f2 9091 0000             lds r25,(ServoFrameTime.1545)+1
 462 03f6 840F                  add r24,r20
 463 03f8 951F                  adc r25,r21
 464 03fa 9093 0000             sts (ServoFrameTime.1545)+1,r25
 465 03fe 8093 0000             sts ServoFrameTime.1545,r24
 466 0402 00C0                  rjmp .L22
 467                    .L12:
 468 0404 C090 0000             lds r12,ServoNickValue
 469 0408 D090 0000             lds r13,(ServoNickValue)+1
 470 040c E090 0000             lds r14,ParamSet+40
 471 0410 FF24                  clr r15
 472 0412 00E0                  ldi r16,lo8(0)
 473 0414 10E0                  ldi r17,hi8(0)
 474 0416 6091 0000             lds r22,IntegralGyroNick
 475 041a 7091 0000             lds r23,(IntegralGyroNick)+1
 476 041e 8091 0000             lds r24,(IntegralGyroNick)+2
 477 0422 9091 0000             lds r25,(IntegralGyroNick)+3
 478 0426 20E8                  ldi r18,lo8(128)
 479 0428 30E0                  ldi r19,hi8(128)
 480 042a 40E0                  ldi r20,hlo8(128)
 481 042c 50E0                  ldi r21,hhi8(128)
 482 042e 0E94 0000             call __divmodsi4
 483 0432 C801                  movw r24,r16
 484 0434 B701                  movw r22,r14
 485 0436 0E94 0000             call __mulsi3
 486 043a 660F                  lsl r22
 487 043c 771F                  rol r23
 488 043e 881F                  rol r24
 489 0440 991F                  rol r25
 490 0442 660F                  lsl r22
 491 0444 771F                  rol r23
 492 0446 881F                  rol r24
 493 0448 991F                  rol r25
 494 044a 20E0                  ldi r18,lo8(256)
 495 044c 31E0                  ldi r19,hi8(256)
 496 044e 40E0                  ldi r20,hlo8(256)
 497 0450 50E0                  ldi r21,hhi8(256)
 498 0452 0E94 0000             call __divmodsi4
 499 0456 C21A                  sub r12,r18
 500 0458 D30A                  sbc r13,r19
 501 045a D092 0000             sts (ServoNickValue)+1,r13
 502 045e C092 0000             sts ServoNickValue,r12
 503 0462 00C0                  rjmp .L13
 504                    .L17:
 505 0464 2757                  subi r18,lo8(375)
 506 0466 3140                  sbci r19,hi8(375)
 507 0468 00F0                  brlo .+2
 508 046a 00C0                  rjmp .L18
 509 046c 87E7                  ldi r24,lo8(375)
 510 046e 91E0                  ldi r25,hi8(375)
 511 0470 9093 0000             sts (RemainingPulse.1544)+1,r25
 512 0474 8093 0000             sts RemainingPulse.1544,r24
 513 0478 00C0                  rjmp .L18
 514                    .L65:
 515 047a 4698                  cbi 40-32,6
 516 047c 00C0                  rjmp .L42
 517                    .L24:
 518 047e 8091 0000             lds r24,FCParam+21
 519 0482 482F                  mov r20,r24
 520 0484 50E0                  ldi r21,lo8(0)
 521 0486 440F                  lsl r20
 522 0488 551F                  rol r21
 523 048a 440F                  lsl r20
 524 048c 551F                  rol r21
 525 048e 2091 0000             lds r18,ServoNickOffset.1547
 526 0492 3091 0000             lds r19,(ServoNickOffset.1547)+1
 527 0496 C901                  movw r24,r18
 528 0498 880F                  lsl r24
 529 049a 991F                  rol r25
 530 049c 820F                  add r24,r18
 531 049e 931F                  adc r25,r19
 532 04a0 480F                  add r20,r24
 533 04a2 591F                  adc r21,r25
 534 04a4 57FD                  sbrc r21,7
 535 04a6 00C0                  rjmp .L67
 536                    .L26:
 537 04a8 CA01                  movw r24,r20
 538 04aa 9595                  asr r25
 539 04ac 8795                  ror r24
 540 04ae 9595                  asr r25
 541 04b0 8795                  ror r24
 542 04b2 9093 0000             sts (ServoNickOffset.1547)+1,r25
 543 04b6 8093 0000             sts ServoNickOffset.1547,r24
 544 04ba 9093 0000             sts (ServoNickValue)+1,r25
 545 04be 8093 0000             sts ServoNickValue,r24
 546 04c2 8091 0000             lds r24,ParamSet+87
 547 04c6 80FF                  sbrs r24,0
 548 04c8 00C0                  rjmp .L27
 549 04ca C090 0000             lds r12,ServoNickValue
 550 04ce D090 0000             lds r13,(ServoNickValue)+1
 551 04d2 E090 0000             lds r14,ParamSet+40
 552 04d6 FF24                  clr r15
 553 04d8 00E0                  ldi r16,lo8(0)
 554 04da 10E0                  ldi r17,hi8(0)
 555 04dc 6091 0000             lds r22,IntegralGyroNick
 556 04e0 7091 0000             lds r23,(IntegralGyroNick)+1
 557 04e4 8091 0000             lds r24,(IntegralGyroNick)+2
 558 04e8 9091 0000             lds r25,(IntegralGyroNick)+3
 559 04ec 20E8                  ldi r18,lo8(128)
 560 04ee 30E0                  ldi r19,hi8(128)
 561 04f0 40E0                  ldi r20,hlo8(128)
 562 04f2 50E0                  ldi r21,hhi8(128)
 563 04f4 0E94 0000             call __divmodsi4
 564 04f8 C801                  movw r24,r16
 565 04fa B701                  movw r22,r14
 566 04fc 0E94 0000             call __mulsi3
 567 0500 660F                  lsl r22
 568 0502 771F                  rol r23
 569 0504 881F                  rol r24
 570 0506 991F                  rol r25
 571 0508 660F                  lsl r22
 572 050a 771F                  rol r23
 573 050c 881F                  rol r24
 574 050e 991F                  rol r25
 575 0510 20E0                  ldi r18,lo8(256)
 576 0512 31E0                  ldi r19,hi8(256)
 577 0514 40E0                  ldi r20,hlo8(256)
 578 0516 50E0                  ldi r21,hhi8(256)
 579 0518 0E94 0000             call __divmodsi4
 580 051c C20E                  add r12,r18
 581 051e D31E                  adc r13,r19
 582 0520 D092 0000             sts (ServoNickValue)+1,r13
 583 0524 C092 0000             sts ServoNickValue,r12
 584                    .L28:
 585 0528 8091 0000             lds r24,ParamSet+41
 586 052c 282F                  mov r18,r24
 587 052e 30E0                  ldi r19,lo8(0)
 588 0530 220F                  lsl r18
 589 0532 331F                  rol r19
 590 0534 220F                  lsl r18
 591 0536 331F                  rol r19
 592 0538 8091 0000             lds r24,ServoNickValue
 593 053c 9091 0000             lds r25,(ServoNickValue)+1
 594 0540 8217                  cp r24,r18
 595 0542 9307                  cpc r25,r19
 596 0544 04F0                  brlt .L56
 597 0546 8091 0000             lds r24,ParamSet+42
 598 054a 282F                  mov r18,r24
 599 054c 30E0                  ldi r19,lo8(0)
 600 054e 220F                  lsl r18
 601 0550 331F                  rol r19
 602 0552 220F                  lsl r18
 603 0554 331F                  rol r19
 604 0556 8091 0000             lds r24,ServoNickValue
 605 055a 9091 0000             lds r25,(ServoNickValue)+1
 606 055e 2817                  cp r18,r24
 607 0560 3907                  cpc r19,r25
 608 0562 04F4                  brge .L30
 609                    .L56:
 610 0564 3093 0000             sts (ServoNickValue)+1,r19
 611 0568 2093 0000             sts ServoNickValue,r18
 612                    .L30:
 613 056c 8091 0000             lds r24,ServoNickValue
 614 0570 9091 0000             lds r25,(ServoNickValue)+1
 615 0574 8755                  subi r24,lo8(-(425))
 616 0576 9E4F                  sbci r25,hi8(-(425))
 617 0578 9093 0000             sts (RemainingPulse.1544)+1,r25
 618 057c 8093 0000             sts RemainingPulse.1544,r24
 619 0580 8091 0000             lds r24,ServoNickValue
 620 0584 9091 0000             lds r25,(ServoNickValue)+1
 621 0588 97FD                  sbrc r25,7
 622 058a 00C0                  rjmp .L68
 623                    .L31:
 624 058c 9595                  asr r25
 625 058e 8795                  ror r24
 626 0590 9595                  asr r25
 627 0592 8795                  ror r24
 628 0594 9093 0000             sts (ServoNickValue)+1,r25
 629 0598 8093 0000             sts ServoNickValue,r24
 630 059c 00C0                  rjmp .L32
 631                    .L39:
 632 059e 81E0                  ldi r24,hi8(375)
 633 05a0 4737                  cpi r20,lo8(375)
 634 05a2 5807                  cpc r21,r24
 635 05a4 00F0                  brlo .+2
 636 05a6 00C0                  rjmp .L40
 637 05a8 47E7                  ldi r20,lo8(375)
 638 05aa 51E0                  ldi r21,hi8(375)
 639 05ac 00C0                  rjmp .L40
 640                    .L64:
 641 05ae 0396                  adiw r24,3
 642 05b0 00C0                  rjmp .L16
 643                    .L63:
 644 05b2 4D5F                  subi r20,lo8(-(3))
 645 05b4 5F4F                  sbci r21,hi8(-(3))
 646 05b6 00C0                  rjmp .L11
 647                    .L66:
 648 05b8 8091 0000             lds r24,FCParam+22
 649 05bc 482F                  mov r20,r24
 650 05be 50E0                  ldi r21,lo8(0)
 651 05c0 440F                  lsl r20
 652 05c2 551F                  rol r21
 653 05c4 440F                  lsl r20
 654 05c6 551F                  rol r21
 655 05c8 2091 0000             lds r18,ServoRollOffset.1548
 656 05cc 3091 0000             lds r19,(ServoRollOffset.1548)+1
 657 05d0 C901                  movw r24,r18
 658 05d2 880F                  lsl r24
 659 05d4 991F                  rol r25
 660 05d6 820F                  add r24,r18
 661 05d8 931F                  adc r25,r19
 662 05da 480F                  add r20,r24
 663 05dc 591F                  adc r21,r25
 664 05de 57FD                  sbrc r21,7
 665 05e0 00C0                  rjmp .L69
 666                    .L33:
 667 05e2 CA01                  movw r24,r20
 668 05e4 9595                  asr r25
 669 05e6 8795                  ror r24
 670 05e8 9595                  asr r25
 671 05ea 8795                  ror r24
 672 05ec 9093 0000             sts (ServoRollOffset.1548)+1,r25
 673 05f0 8093 0000             sts ServoRollOffset.1548,r24
 674 05f4 9093 0000             sts (ServoRollValue)+1,r25
 675 05f8 8093 0000             sts ServoRollValue,r24
 676 05fc 8091 0000             lds r24,ParamSet+87
 677 0600 81FF                  sbrs r24,1
 678 0602 00C0                  rjmp .L34
 679 0604 C090 0000             lds r12,ServoRollValue
 680 0608 D090 0000             lds r13,(ServoRollValue)+1
 681 060c E090 0000             lds r14,ParamSet+44
 682 0610 FF24                  clr r15
 683 0612 00E0                  ldi r16,lo8(0)
 684 0614 10E0                  ldi r17,hi8(0)
 685 0616 6091 0000             lds r22,IntegralGyroRoll
 686 061a 7091 0000             lds r23,(IntegralGyroRoll)+1
 687 061e 8091 0000             lds r24,(IntegralGyroRoll)+2
 688 0622 9091 0000             lds r25,(IntegralGyroRoll)+3
 689 0626 20E8                  ldi r18,lo8(128)
 690 0628 30E0                  ldi r19,hi8(128)
 691 062a 40E0                  ldi r20,hlo8(128)
 692 062c 50E0                  ldi r21,hhi8(128)
 693 062e 0E94 0000             call __divmodsi4
 694 0632 C801                  movw r24,r16
 695 0634 B701                  movw r22,r14
 696 0636 0E94 0000             call __mulsi3
 697 063a 660F                  lsl r22
 698 063c 771F                  rol r23
 699 063e 881F                  rol r24
 700 0640 991F                  rol r25
 701 0642 660F                  lsl r22
 702 0644 771F                  rol r23
 703 0646 881F                  rol r24
 704 0648 991F                  rol r25
 705 064a 20E0                  ldi r18,lo8(256)
 706 064c 31E0                  ldi r19,hi8(256)
 707 064e 40E0                  ldi r20,hlo8(256)
 708 0650 50E0                  ldi r21,hhi8(256)
 709 0652 0E94 0000             call __divmodsi4
 710 0656 C20E                  add r12,r18
 711 0658 D31E                  adc r13,r19
 712 065a D092 0000             sts (ServoRollValue)+1,r13
 713 065e C092 0000             sts ServoRollValue,r12
 714                    .L35:
 715 0662 8091 0000             lds r24,ParamSet+45
 716 0666 282F                  mov r18,r24
 717 0668 30E0                  ldi r19,lo8(0)
 718 066a 220F                  lsl r18
 719 066c 331F                  rol r19
 720 066e 220F                  lsl r18
 721 0670 331F                  rol r19
 722 0672 8091 0000             lds r24,ServoRollValue
 723 0676 9091 0000             lds r25,(ServoRollValue)+1
 724 067a 8217                  cp r24,r18
 725 067c 9307                  cpc r25,r19
 726 067e 04F0                  brlt .L57
 727 0680 8091 0000             lds r24,ParamSet+46
 728 0684 282F                  mov r18,r24
 729 0686 30E0                  ldi r19,lo8(0)
 730 0688 220F                  lsl r18
 731 068a 331F                  rol r19
 732 068c 220F                  lsl r18
 733 068e 331F                  rol r19
 734 0690 8091 0000             lds r24,ServoRollValue
 735 0694 9091 0000             lds r25,(ServoRollValue)+1
 736 0698 2817                  cp r18,r24
 737 069a 3907                  cpc r19,r25
 738 069c 04F4                  brge .L37
 739                    .L57:
 740 069e 3093 0000             sts (ServoRollValue)+1,r19
 741 06a2 2093 0000             sts ServoRollValue,r18
 742                    .L37:
 743 06a6 8091 0000             lds r24,ServoRollValue
 744 06aa 9091 0000             lds r25,(ServoRollValue)+1
 745 06ae 8755                  subi r24,lo8(-(425))
 746 06b0 9E4F                  sbci r25,hi8(-(425))
 747 06b2 9093 0000             sts (RemainingPulse.1544)+1,r25
 748 06b6 8093 0000             sts RemainingPulse.1544,r24
 749 06ba 8091 0000             lds r24,ServoRollValue
 750 06be 9091 0000             lds r25,(ServoRollValue)+1
 751 06c2 97FD                  sbrc r25,7
 752 06c4 00C0                  rjmp .L70
 753                    .L38:
 754 06c6 9595                  asr r25
 755 06c8 8795                  ror r24
 756 06ca 9595                  asr r25
 757 06cc 8795                  ror r24
 758 06ce 9093 0000             sts (ServoRollValue)+1,r25
 759 06d2 8093 0000             sts ServoRollValue,r24
 760 06d6 00C0                  rjmp .L32
 761                    .L34:
 762 06d8 C090 0000             lds r12,ServoRollValue
 763 06dc D090 0000             lds r13,(ServoRollValue)+1
 764 06e0 E090 0000             lds r14,ParamSet+44
 765 06e4 FF24                  clr r15
 766 06e6 00E0                  ldi r16,lo8(0)
 767 06e8 10E0                  ldi r17,hi8(0)
 768 06ea 6091 0000             lds r22,IntegralGyroRoll
 769 06ee 7091 0000             lds r23,(IntegralGyroRoll)+1
 770 06f2 8091 0000             lds r24,(IntegralGyroRoll)+2
 771 06f6 9091 0000             lds r25,(IntegralGyroRoll)+3
 772 06fa 20E8                  ldi r18,lo8(128)
 773 06fc 30E0                  ldi r19,hi8(128)
 774 06fe 40E0                  ldi r20,hlo8(128)
 775 0700 50E0                  ldi r21,hhi8(128)
 776 0702 0E94 0000             call __divmodsi4
 777 0706 C801                  movw r24,r16
 778 0708 B701                  movw r22,r14
 779 070a 0E94 0000             call __mulsi3
 780 070e 660F                  lsl r22
 781 0710 771F                  rol r23
 782 0712 881F                  rol r24
 783 0714 991F                  rol r25
 784 0716 660F                  lsl r22
 785 0718 771F                  rol r23
 786 071a 881F                  rol r24
 787 071c 991F                  rol r25
 788 071e 20E0                  ldi r18,lo8(256)
 789 0720 31E0                  ldi r19,hi8(256)
 790 0722 40E0                  ldi r20,hlo8(256)
 791 0724 50E0                  ldi r21,hhi8(256)
 792 0726 0E94 0000             call __divmodsi4
 793 072a C21A                  sub r12,r18
 794 072c D30A                  sbc r13,r19
 795 072e D092 0000             sts (ServoRollValue)+1,r13
 796 0732 C092 0000             sts ServoRollValue,r12
 797 0736 00C0                  rjmp .L35
 798                    .L27:
 799 0738 C090 0000             lds r12,ServoNickValue
 800 073c D090 0000             lds r13,(ServoNickValue)+1
 801 0740 E090 0000             lds r14,ParamSet+40
 802 0744 FF24                  clr r15
 803 0746 00E0                  ldi r16,lo8(0)
 804 0748 10E0                  ldi r17,hi8(0)
 805 074a 6091 0000             lds r22,IntegralGyroNick
 806 074e 7091 0000             lds r23,(IntegralGyroNick)+1
 807 0752 8091 0000             lds r24,(IntegralGyroNick)+2
 808 0756 9091 0000             lds r25,(IntegralGyroNick)+3
 809 075a 20E8                  ldi r18,lo8(128)
 810 075c 30E0                  ldi r19,hi8(128)
 811 075e 40E0                  ldi r20,hlo8(128)
 812 0760 50E0                  ldi r21,hhi8(128)
 813 0762 0E94 0000             call __divmodsi4
 814 0766 C801                  movw r24,r16
 815 0768 B701                  movw r22,r14
 816 076a 0E94 0000             call __mulsi3
 817 076e 660F                  lsl r22
 818 0770 771F                  rol r23
 819 0772 881F                  rol r24
 820 0774 991F                  rol r25
 821 0776 660F                  lsl r22
 822 0778 771F                  rol r23
 823 077a 881F                  rol r24
 824 077c 991F                  rol r25
 825 077e 20E0                  ldi r18,lo8(256)
 826 0780 31E0                  ldi r19,hi8(256)
 827 0782 40E0                  ldi r20,hlo8(256)
 828 0784 50E0                  ldi r21,hhi8(256)
 829 0786 0E94 0000             call __divmodsi4
 830 078a C21A                  sub r12,r18
 831 078c D30A                  sbc r13,r19
 832 078e D092 0000             sts (ServoNickValue)+1,r13
 833 0792 C092 0000             sts ServoNickValue,r12
 834 0796 00C0                  rjmp .L28
 835                    .L68:
 836 0798 0396                  adiw r24,3
 837 079a 00C0                  rjmp .L31
 838                    .L67:
 839 079c 4D5F                  subi r20,lo8(-(3))
 840 079e 5F4F                  sbci r21,hi8(-(3))
 841 07a0 00C0                  rjmp .L26
 842                    .L69:
 843 07a2 4D5F                  subi r20,lo8(-(3))
 844 07a4 5F4F                  sbci r21,hi8(-(3))
 845 07a6 00C0                  rjmp .L33
 846                    .L70:
 847 07a8 0396                  adiw r24,3
 848 07aa 00C0                  rjmp .L38
 850                    .global ServoNickValue
 851                    .global ServoNickValue
 852                            .section .bss
 855                    ServoNickValue:
 856 0000 0000                  .skip 2,0
 857                    .global ServoRollValue
 858                    .global ServoRollValue
 861                    ServoRollValue:
 862 0002 0000                  .skip 2,0
 863                    .global ServoActive
 864                    .global ServoActive
 867                    ServoActive:
 868 0004 00                    .skip 1,0
 869                            .data
 872                    ServoRollOffset.1548:
 873 0000 FC01                  .word   508
 876                    ServoNickOffset.1547:
 877 0002 FC01                  .word   508
 878                            .lcomm ServoIndex.1546,1
 879                            .lcomm ServoFrameTime.1545,2
 880                            .lcomm RemainingPulse.1544,2
 881                            .lcomm PulseOutput.1543,1
 882                    .global __do_copy_data
 883                    .global __do_clear_bss
DEFINED SYMBOLS
                            *ABS*:00000000 timer2.c
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccgdfsVT.s:2      *ABS*:0000003f __SREG__
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccgdfsVT.s:3      *ABS*:0000003e __SP_H__
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccgdfsVT.s:4      *ABS*:0000003d __SP_L__
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccgdfsVT.s:5      *ABS*:00000034 __CCP__
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccgdfsVT.s:6      *ABS*:00000000 __tmp_reg__
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccgdfsVT.s:7      *ABS*:00000001 __zero_reg__
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccgdfsVT.s:11     .text:00000000 TIMER2_Init
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccgdfsVT.s:60     .text:00000050 Servo_On
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccgdfsVT.s:867    .bss:00000004 ServoActive
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccgdfsVT.s:71     .text:0000005a Servo_Off
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccgdfsVT.s:82     .text:00000064 __vector_9
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccgdfsVT.s:880    .bss:0000000a PulseOutput.1543
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccgdfsVT.s:879    .bss:00000008 RemainingPulse.1544
                             .bss:00000005 ServoIndex.1546
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccgdfsVT.s:878    .bss:00000006 ServoFrameTime.1545
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccgdfsVT.s:876    .data:00000002 ServoNickOffset.1547
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccgdfsVT.s:855    .bss:00000000 ServoNickValue
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccgdfsVT.s:872    .data:00000000 ServoRollOffset.1548
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccgdfsVT.s:861    .bss:00000002 ServoRollValue

UNDEFINED SYMBOLS
BoardRelease
ParamSet
FCParam
IntegralGyroNick
__divmodsi4
__mulsi3
RC_Quality
PPM_in
IntegralGyroRoll
__do_copy_data
__do_clear_bss