Subversion Repositories FlightCtrl

Rev

Rev 1755 | Blame | Compare with Previous | Last modification | View Log | RSS feed

   1                            .file   "twimaster.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 I2C_Init
  11                    I2C_Init:
  12                    /* prologue: function */
  13                    /* frame size = 0 */
  14 0000 9FB7                  in r25,__SREG__
  15                    /* #APP */
  16                     ;  100 "twimaster.c" 1
  17 0002 F894                  cli
  18                     ;  0 "" 2
  19                    /* #NOAPP */
  20 0004 3998                  cbi 39-32,1
  21 0006 389A                  sbi 39-32,0
  22 0008 88B1                  in r24,40-32
  23 000a 8360                  ori r24,lo8(3)
  24 000c 88B9                  out 40-32,r24
  25 000e 8091 B900             lds r24,185
  26 0012 8C7F                  andi r24,lo8(-4)
  27 0014 8093 B900             sts 185,r24
  28 0018 8AE2                  ldi r24,lo8(42)
  29 001a 8093 B800             sts 184,r24
  30 001e 1092 0000             sts twi_state,__zero_reg__
  31 0022 1092 0000             sts motor_write,__zero_reg__
  32 0026 1092 0000             sts motor_read,__zero_reg__
  33 002a E0E0                  ldi r30,lo8(Motor)
  34 002c F0E0                  ldi r31,hi8(Motor)
  35                    .L2:
  36 002e 1082                  st Z,__zero_reg__
  37 0030 1182                  std Z+1,__zero_reg__
  38 0032 1282                  std Z+2,__zero_reg__
  39 0034 1382                  std Z+3,__zero_reg__
  40 0036 1482                  std Z+4,__zero_reg__
  41 0038 1582                  std Z+5,__zero_reg__
  42 003a 1682                  std Z+6,__zero_reg__
  43 003c 1782                  std Z+7,__zero_reg__
  44 003e 3896                  adiw r30,8
  45 0040 80E0                  ldi r24,hi8(Motor+96)
  46 0042 E030                  cpi r30,lo8(Motor+96)
  47 0044 F807                  cpc r31,r24
  48 0046 01F4                  brne .L2
  49 0048 9FBF                  out __SREG__,r25
  50                    /* epilogue start */
  51 004a 0895                  ret
  53                    .global I2C_Reset
  55                    I2C_Reset:
  56 004c EF92                  push r14
  57 004e FF92                  push r15
  58 0050 0F93                  push r16
  59 0052 1F93                  push r17
  60                    /* prologue: function */
  61                    /* frame size = 0 */
  62 0054 1092 0000             sts twi_state,__zero_reg__
  63 0058 8CEB                  ldi r24,lo8(188)
  64 005a E82E                  mov r14,r24
  65 005c F12C                  mov r15,__zero_reg__
  66 005e 84E9                  ldi r24,lo8(-108)
  67 0060 F701                  movw r30,r14
  68 0062 8083                  st Z,r24
  69 0064 1092 0000             sts motor_write,__zero_reg__
  70 0068 1092 0000             sts motor_read,__zero_reg__
  71 006c 80E8                  ldi r24,lo8(-128)
  72 006e 8083                  st Z,r24
  73 0070 1092 BD00             sts 189,__zero_reg__
  74 0074 1092 BA00             sts 186,__zero_reg__
  75 0078 0BEB                  ldi r16,lo8(187)
  76 007a 10E0                  ldi r17,hi8(187)
  77 007c F801                  movw r30,r16
  78 007e 1082                  st Z,__zero_reg__
  79 0080 1092 B900             sts 185,__zero_reg__
  80 0084 1092 B800             sts 184,__zero_reg__
  81 0088 0E94 0000             call I2C_Init
  82 008c F801                  movw r30,r16
  83 008e 1082                  st Z,__zero_reg__
  84 0090 85E8                  ldi r24,lo8(-123)
  85 0092 F701                  movw r30,r14
  86 0094 8083                  st Z,r24
  87 0096 8091 0000             lds r24,BLFlags
  88 009a 8260                  ori r24,lo8(2)
  89 009c 8093 0000             sts BLFlags,r24
  90                    /* epilogue start */
  91 00a0 1F91                  pop r17
  92 00a2 0F91                  pop r16
  93 00a4 FF90                  pop r15
  94 00a6 EF90                  pop r14
  95 00a8 0895                  ret
  97                    .global __vector_26
  99                    __vector_26:
 100 00aa 1F92                  push __zero_reg__
 101 00ac 0F92                  push r0
 102 00ae 0FB6                  in r0,__SREG__
 103 00b0 0F92                  push r0
 104 00b2 1124                  clr __zero_reg__
 105 00b4 2F93                  push r18
 106 00b6 3F93                  push r19
 107 00b8 4F93                  push r20
 108 00ba 8F93                  push r24
 109 00bc 9F93                  push r25
 110 00be AF93                  push r26
 111 00c0 BF93                  push r27
 112 00c2 EF93                  push r30
 113 00c4 FF93                  push r31
 114                    /* prologue: Signal */
 115                    /* frame size = 0 */
 116 00c6 8091 0000             lds r24,twi_state
 117 00ca 8F5F                  subi r24,lo8(-(1))
 118 00cc 8093 0000             sts twi_state,r24
 119 00d0 8150                  subi r24,lo8(-(-1))
 120 00d2 E82F                  mov r30,r24
 121 00d4 F0E0                  ldi r31,lo8(0)
 122 00d6 E731                  cpi r30,23
 123 00d8 F105                  cpc r31,__zero_reg__
 124 00da 00F0                  brlo .+2
 125 00dc 00C0                  rjmp .L8
 126 00de E050                  subi r30,lo8(-(gs(.L21)))
 127 00e0 F040                  sbci r31,hi8(-(gs(.L21)))
 128 00e2 0C94 0000             jmp __tablejump2__
 129                            .data
 130                            .section .progmem.gcc_sw_table, "a", @progbits
 131                            .p2align 1
 132                    .L21:
 133                            .data
 134                            .section .progmem.gcc_sw_table, "a", @progbits
 135                            .p2align 1
 136 0000 0000                  .word gs(.L55)
 137 0002 0000                  .word gs(.L10)
 138 0004 0000                  .word gs(.L11)
 139 0006 0000                  .word gs(.L12)
 140 0008 0000                  .word gs(.L13)
 141 000a 0000                  .word gs(.L14)
 142 000c 0000                  .word gs(.L15)
 143 000e 0000                  .word gs(.L8)
 144 0010 0000                  .word gs(.L8)
 145 0012 0000                  .word gs(.L8)
 146 0014 0000                  .word gs(.L8)
 147 0016 0000                  .word gs(.L8)
 148 0018 0000                  .word gs(.L8)
 149 001a 0000                  .word gs(.L8)
 150 001c 0000                  .word gs(.L8)
 151 001e 0000                  .word gs(.L8)
 152 0020 0000                  .word gs(.L8)
 153 0022 0000                  .word gs(.L8)
 154 0024 0000                  .word gs(.L16)
 155 0026 0000                  .word gs(.L17)
 156 0028 0000                  .word gs(.L18)
 157 002a 0000                  .word gs(.L19)
 158 002c 0000                  .word gs(.L20)
 159                            .text
 160                    .L23:
 161 00e6 8091 0000             lds r24,motor_write
 162 00ea 8F5F                  subi r24,lo8(-(1))
 163 00ec 8093 0000             sts motor_write,r24
 164                    .L55:
 165 00f0 E091 0000             lds r30,motor_write
 166 00f4 F0E0                  ldi r31,lo8(0)
 167 00f6 EE0F                  lsl r30
 168 00f8 FF1F                  rol r31
 169 00fa EE0F                  lsl r30
 170 00fc FF1F                  rol r31
 171 00fe E050                  subi r30,lo8(-(Mixer))
 172 0100 F040                  sbci r31,hi8(-(Mixer))
 173 0102 8585                  ldd r24,Z+13
 174 0104 1816                  cp __zero_reg__,r24
 175 0106 04F0                  brlt .L22
 176 0108 8091 0000             lds r24,motor_write
 177 010c 8C30                  cpi r24,lo8(12)
 178 010e 00F0                  brlo .L23
 179                    .L22:
 180 0110 8091 0000             lds r24,motor_write
 181 0114 8C30                  cpi r24,lo8(12)
 182 0116 00F0                  brlo .L24
 183 0118 1092 0000             sts (BLConfig_WriteMask)+1,__zero_reg__
 184 011c 1092 0000             sts BLConfig_WriteMask,__zero_reg__
 185 0120 1092 0000             sts motor_write,__zero_reg__
 186 0124 85E0                  ldi r24,lo8(5)
 187 0126 8093 0000             sts twi_state,r24
 188 012a 8091 0000             lds r24,motor_read
 189 012e 880F                  lsl r24
 190 0130 8D5A                  subi r24,lo8(-(83))
 191 0132 00C0                  rjmp .L63
 192                    .L24:
 193 0134 8091 0000             lds r24,motor_write
 194 0138 880F                  lsl r24
 195 013a 8E5A                  subi r24,lo8(-(82))
 196                    .L63:
 197 013c 8093 BB00             sts 187,r24
 198 0140 85E8                  ldi r24,lo8(-123)
 199 0142 00C0                  rjmp .L59
 200                    .L10:
 201 0144 E091 0000             lds r30,motor_write
 202 0148 F0E0                  ldi r31,lo8(0)
 203 014a 93E0                  ldi r25,3
 204 014c EE0F          1:      lsl r30
 205 014e FF1F                  rol r31
 206 0150 9A95                  dec r25
 207 0152 01F4                  brne 1b
 208 0154 E050                  subi r30,lo8(-(Motor))
 209 0156 F040                  sbci r31,hi8(-(Motor))
 210 0158 8181                  ldd r24,Z+1
 211 015a 8093 BB00             sts 187,r24
 212 015e 85E8                  ldi r24,lo8(-123)
 213 0160 8093 BC00             sts 188,r24
 214 0164 E091 0000             lds r30,motor_write
 215 0168 F0E0                  ldi r31,lo8(0)
 216 016a 83E0                  ldi r24,3
 217 016c EE0F          1:      lsl r30
 218 016e FF1F                  rol r31
 219 0170 8A95                  dec r24
 220 0172 01F4                  brne 1b
 221 0174 E050                  subi r30,lo8(-(Motor))
 222 0176 F040                  sbci r31,hi8(-(Motor))
 223 0178 8081                  ld r24,Z
 224 017a 80FF                  sbrs r24,0
 225 017c 00C0                  rjmp .L30
 226                    .L26:
 227 017e E091 0000             lds r30,motor_write
 228 0182 F0E0                  ldi r31,lo8(0)
 229 0184 B3E0                  ldi r27,3
 230 0186 EE0F          1:      lsl r30
 231 0188 FF1F                  rol r31
 232 018a BA95                  dec r27
 233 018c 01F4                  brne 1b
 234 018e E050                  subi r30,lo8(-(Motor))
 235 0190 F040                  sbci r31,hi8(-(Motor))
 236 0192 8281                  ldd r24,Z+2
 237 0194 8823                  tst r24
 238 0196 01F0                  breq .L27
 239 0198 8091 0000             lds r24,RequiredMotors
 240 019c 8730                  cpi r24,lo8(7)
 241 019e 00F4                  brsh .+2
 242 01a0 00C0                  rjmp .L54
 243                    .L27:
 244 01a2 8091 0000             lds r24,BLConfig_WriteMask
 245 01a6 9091 0000             lds r25,(BLConfig_WriteMask)+1
 246 01aa 892B                  or r24,r25
 247 01ac 01F0                  breq .+2
 248 01ae 00C0                  rjmp .L54
 249 01b0 8091 0000             lds r24,BLConfig_ReadMask
 250 01b4 9091 0000             lds r25,(BLConfig_ReadMask)+1
 251 01b8 892B                  or r24,r25
 252 01ba 01F0                  breq .+2
 253 01bc 00C0                  rjmp .L54
 254 01be 00C0                  rjmp .L30
 255                    .L11:
 256 01c0 4091 0000             lds r20,motor_write
 257 01c4 2091 0000             lds r18,BLConfig_ReadMask
 258 01c8 3091 0000             lds r19,(BLConfig_ReadMask)+1
 259 01cc 81E0                  ldi r24,lo8(1)
 260 01ce 90E0                  ldi r25,hi8(1)
 261 01d0 00C0                  rjmp 2f
 262 01d2 880F          1:      lsl r24
 263 01d4 991F                  rol r25
 264 01d6 4A95          2:      dec r20
 265 01d8 02F4                  brpl 1b
 266 01da 8223                  and r24,r18
 267 01dc 9323                  and r25,r19
 268 01de 892B                  or r24,r25
 269 01e0 01F0                  breq .L28
 270 01e2 E091 0000             lds r30,motor_write
 271 01e6 F0E0                  ldi r31,lo8(0)
 272 01e8 A3E0                  ldi r26,3
 273 01ea EE0F          1:      lsl r30
 274 01ec FF1F                  rol r31
 275 01ee AA95                  dec r26
 276 01f0 01F4                  brne 1b
 277 01f2 E050                  subi r30,lo8(-(Motor))
 278 01f4 F040                  sbci r31,hi8(-(Motor))
 279 01f6 80E1                  ldi r24,lo8(16)
 280 01f8 8483                  std Z+4,r24
 281 01fa 00C0                  rjmp .L29
 282                    .L28:
 283 01fc E091 0000             lds r30,motor_write
 284 0200 F0E0                  ldi r31,lo8(0)
 285 0202 43E0                  ldi r20,3
 286 0204 EE0F          1:      lsl r30
 287 0206 FF1F                  rol r31
 288 0208 4A95                  dec r20
 289 020a 01F4                  brne 1b
 290 020c E050                  subi r30,lo8(-(Motor))
 291 020e F040                  sbci r31,hi8(-(Motor))
 292 0210 1482                  std Z+4,__zero_reg__
 293                    .L29:
 294 0212 E091 0000             lds r30,motor_write
 295 0216 A091 0000             lds r26,motor_write
 296 021a F0E0                  ldi r31,lo8(0)
 297 021c 33E0                  ldi r19,3
 298 021e EE0F          1:      lsl r30
 299 0220 FF1F                  rol r31
 300 0222 3A95                  dec r19
 301 0224 01F4                  brne 1b
 302 0226 E050                  subi r30,lo8(-(Motor))
 303 0228 F040                  sbci r31,hi8(-(Motor))
 304 022a 9481                  ldd r25,Z+4
 305 022c 990F                  lsl r25
 306 022e 990F                  lsl r25
 307 0230 990F                  lsl r25
 308 0232 B0E0                  ldi r27,lo8(0)
 309 0234 23E0                  ldi r18,3
 310 0236 AA0F          1:      lsl r26
 311 0238 BB1F                  rol r27
 312 023a 2A95                  dec r18
 313 023c 01F4                  brne 1b
 314 023e A050                  subi r26,lo8(-(Motor))
 315 0240 B040                  sbci r27,hi8(-(Motor))
 316 0242 1296                  adiw r26,2
 317 0244 8C91                  ld r24,X
 318 0246 8770                  andi r24,lo8(7)
 319 0248 982B                  or r25,r24
 320 024a 9093 BB00             sts 187,r25
 321 024e 85E8                  ldi r24,lo8(-123)
 322 0250 8093 BC00             sts 188,r24
 323 0254 4091 0000             lds r20,motor_write
 324 0258 2091 0000             lds r18,BLConfig_WriteMask
 325 025c 3091 0000             lds r19,(BLConfig_WriteMask)+1
 326 0260 81E0                  ldi r24,lo8(1)
 327 0262 90E0                  ldi r25,hi8(1)
 328 0264 00C0                  rjmp 2f
 329 0266 880F          1:      lsl r24
 330 0268 991F                  rol r25
 331 026a 4A95          2:      dec r20
 332 026c 02F4                  brpl 1b
 333 026e 8223                  and r24,r18
 334 0270 9323                  and r25,r19
 335 0272 892B                  or r24,r25
 336 0274 01F0                  breq .L30
 337 0276 80E0                  ldi r24,lo8(BLConfig)
 338 0278 90E0                  ldi r25,hi8(BLConfig)
 339 027a 9093 0000             sts (pBuff.1659)+1,r25
 340 027e 8093 0000             sts pBuff.1659,r24
 341 0282 88E0                  ldi r24,lo8(8)
 342 0284 8093 0000             sts BuffLen.1660,r24
 343 0288 00C0                  rjmp .L54
 344                    .L30:
 345 028a 84E0                  ldi r24,lo8(4)
 346 028c 00C0                  rjmp .L61
 347                    .L12:
 348 028e E091 0000             lds r30,pBuff.1659
 349 0292 F091 0000             lds r31,(pBuff.1659)+1
 350 0296 8191                  ld r24,Z+
 351 0298 8093 BB00             sts 187,r24
 352 029c 85E8                  ldi r24,lo8(-123)
 353 029e 8093 BC00             sts 188,r24
 354 02a2 F093 0000             sts (pBuff.1659)+1,r31
 355 02a6 E093 0000             sts pBuff.1659,r30
 356 02aa 8091 0000             lds r24,BuffLen.1660
 357 02ae 8150                  subi r24,lo8(-(-1))
 358 02b0 8093 0000             sts BuffLen.1660,r24
 359 02b4 8823                  tst r24
 360 02b6 01F4                  brne .+2
 361 02b8 00C0                  rjmp .L54
 362 02ba 83E0                  ldi r24,lo8(3)
 363 02bc 00C0                  rjmp .L61
 364                    .L13:
 365 02be 8091 B900             lds r24,185
 366 02c2 8033                  cpi r24,lo8(48)
 367 02c4 01F4                  brne .L31
 368 02c6 8091 0000             lds r24,missing_motor.1657
 369 02ca 8823                  tst r24
 370 02cc 01F4                  brne .L32
 371 02ce 8091 0000             lds r24,motor_write
 372 02d2 8F5F                  subi r24,lo8(-(1))
 373 02d4 8093 0000             sts missing_motor.1657,r24
 374                    .L32:
 375 02d8 E091 0000             lds r30,motor_write
 376 02dc F0E0                  ldi r31,lo8(0)
 377 02de 93E0                  ldi r25,3
 378 02e0 EE0F          1:      lsl r30
 379 02e2 FF1F                  rol r31
 380 02e4 9A95                  dec r25
 381 02e6 01F4                  brne 1b
 382 02e8 E050                  subi r30,lo8(-(Motor))
 383 02ea F040                  sbci r31,hi8(-(Motor))
 384 02ec 8381                  ldd r24,Z+3
 385 02ee 8F77                  andi r24,lo8(127)
 386 02f0 8F37                  cpi r24,lo8(127)
 387 02f2 01F0                  breq .L31
 388 02f4 E091 0000             lds r30,motor_write
 389 02f8 F0E0                  ldi r31,lo8(0)
 390 02fa 83E0                  ldi r24,3
 391 02fc EE0F          1:      lsl r30
 392 02fe FF1F                  rol r31
 393 0300 8A95                  dec r24
 394 0302 01F4                  brne 1b
 395 0304 E050                  subi r30,lo8(-(Motor))
 396 0306 F040                  sbci r31,hi8(-(Motor))
 397 0308 8381                  ldd r24,Z+3
 398 030a 8F5F                  subi r24,lo8(-(1))
 399 030c 8383                  std Z+3,r24
 400                    .L31:
 401 030e 1092 0000             sts twi_state,__zero_reg__
 402 0312 84E9                  ldi r24,lo8(-108)
 403 0314 8093 BC00             sts 188,r24
 404 0318 8AE0                  ldi r24,lo8(10)
 405 031a 90E0                  ldi r25,hi8(10)
 406 031c 9093 0000             sts (I2CTimeout)+1,r25
 407 0320 8093 0000             sts I2CTimeout,r24
 408 0324 8091 0000             lds r24,motor_write
 409 0328 8F5F                  subi r24,lo8(-(1))
 410 032a 8093 0000             sts motor_write,r24
 411 032e 1092 0000             sts twi_state,__zero_reg__
 412 0332 00C0                  rjmp .L64
 413                    .L14:
 414 0334 8091 B900             lds r24,185
 415 0338 8034                  cpi r24,lo8(64)
 416 033a 01F0                  breq .L33
 417 033c E091 0000             lds r30,motor_read
 418 0340 F0E0                  ldi r31,lo8(0)
 419 0342 B3E0                  ldi r27,3
 420 0344 EE0F          1:      lsl r30
 421 0346 FF1F                  rol r31
 422 0348 BA95                  dec r27
 423 034a 01F4                  brne 1b
 424 034c E050                  subi r30,lo8(-(Motor))
 425 034e F040                  sbci r31,hi8(-(Motor))
 426 0350 8381                  ldd r24,Z+3
 427 0352 8F77                  andi r24,lo8(127)
 428 0354 8383                  std Z+3,r24
 429 0356 8091 0000             lds r24,motor_read
 430 035a 8F5F                  subi r24,lo8(-(1))
 431 035c 8093 0000             sts motor_read,r24
 432 0360 8091 0000             lds r24,motor_read
 433 0364 8C30                  cpi r24,lo8(12)
 434 0366 00F0                  brlo .L34
 435 0368 1092 0000             sts motor_read,__zero_reg__
 436 036c 1092 0000             sts (BLConfig_ReadMask)+1,__zero_reg__
 437 0370 1092 0000             sts BLConfig_ReadMask,__zero_reg__
 438 0374 8091 0000             lds r24,motor_read_temperature.1658
 439 0378 8F5F                  subi r24,lo8(-(1))
 440 037a 8093 0000             sts motor_read_temperature.1658,r24
 441 037e 8C30                  cpi r24,lo8(12)
 442 0380 00F0                  brlo .L34
 443 0382 1092 0000             sts motor_read_temperature.1658,__zero_reg__
 444 0386 8091 0000             lds r24,BLFlags
 445 038a 8D7F                  andi r24,lo8(-3)
 446 038c 8093 0000             sts BLFlags,r24
 447                    .L34:
 448 0390 8091 0000             lds r24,BLFlags
 449 0394 8160                  ori r24,lo8(1)
 450 0396 8093 0000             sts BLFlags,r24
 451 039a 1092 0000             sts twi_state,__zero_reg__
 452 039e 84E9                  ldi r24,lo8(-108)
 453 03a0 00C0                  rjmp .L57
 454                    .L33:
 455 03a2 E091 0000             lds r30,motor_read
 456 03a6 F0E0                  ldi r31,lo8(0)
 457 03a8 A3E0                  ldi r26,3
 458 03aa EE0F          1:      lsl r30
 459 03ac FF1F                  rol r31
 460 03ae AA95                  dec r26
 461 03b0 01F4                  brne 1b
 462 03b2 E050                  subi r30,lo8(-(Motor))
 463 03b4 F040                  sbci r31,hi8(-(Motor))
 464 03b6 8381                  ldd r24,Z+3
 465 03b8 8068                  ori r24,lo8(-128)
 466 03ba 8383                  std Z+3,r24
 467 03bc E091 0000             lds r30,motor_read
 468 03c0 F0E0                  ldi r31,lo8(0)
 469 03c2 43E0                  ldi r20,3
 470 03c4 EE0F          1:      lsl r30
 471 03c6 FF1F                  rol r31
 472 03c8 4A95                  dec r20
 473 03ca 01F4                  brne 1b
 474 03cc E050                  subi r30,lo8(-(Motor))
 475 03ce F040                  sbci r31,hi8(-(Motor))
 476 03d0 8081                  ld r24,Z
 477 03d2 80FF                  sbrs r24,0
 478 03d4 00C0                  rjmp .L36
 479 03d6 E091 0000             lds r30,motor_read
 480 03da F0E0                  ldi r31,lo8(0)
 481 03dc 33E0                  ldi r19,3
 482 03de EE0F          1:      lsl r30
 483 03e0 FF1F                  rol r31
 484 03e2 3A95                  dec r19
 485 03e4 01F4                  brne 1b
 486 03e6 E050                  subi r30,lo8(-(Motor))
 487 03e8 F040                  sbci r31,hi8(-(Motor))
 488 03ea 8481                  ldd r24,Z+4
 489 03ec 8823                  tst r24
 490 03ee 01F0                  breq .L38
 491 03f0 8031                  cpi r24,lo8(16)
 492 03f2 01F4                  brne .L37
 493 03f4 80E0                  ldi r24,lo8(BLConfig)
 494 03f6 90E0                  ldi r25,hi8(BLConfig)
 495 03f8 9093 0000             sts (pBuff.1659)+1,r25
 496 03fc 8093 0000             sts pBuff.1659,r24
 497 0400 88E0                  ldi r24,lo8(8)
 498 0402 00C0                  rjmp .L56
 499                    .L38:
 500 0404 8091 0000             lds r24,motor_read
 501 0408 90E0                  ldi r25,lo8(0)
 502 040a 23E0                  ldi r18,3
 503 040c 880F          1:      lsl r24
 504 040e 991F                  rol r25
 505 0410 2A95                  dec r18
 506 0412 01F4                  brne 1b
 507 0414 8050                  subi r24,lo8(-(Motor+5))
 508 0416 9040                  sbci r25,hi8(-(Motor+5))
 509 0418 9093 0000             sts (pBuff.1659)+1,r25
 510 041c 8093 0000             sts pBuff.1659,r24
 511 0420 9091 0000             lds r25,motor_read
 512 0424 8091 0000             lds r24,motor_read_temperature.1658
 513 0428 9817                  cp r25,r24
 514 042a 01F4                  brne .L42
 515 042c 83E0                  ldi r24,lo8(3)
 516 042e 00C0                  rjmp .L56
 517                    .L36:
 518 0430 8091 0000             lds r24,motor_read
 519 0434 90E0                  ldi r25,lo8(0)
 520 0436 B3E0                  ldi r27,3
 521 0438 880F          1:      lsl r24
 522 043a 991F                  rol r25
 523 043c BA95                  dec r27
 524 043e 01F4                  brne 1b
 525 0440 8050                  subi r24,lo8(-(Motor+5))
 526 0442 9040                  sbci r25,hi8(-(Motor+5))
 527 0444 9093 0000             sts (pBuff.1659)+1,r25
 528 0448 8093 0000             sts pBuff.1659,r24
 529 044c 8091 0000             lds r24,BLFlags
 530 0450 81FD                  sbrc r24,1
 531 0452 00C0                  rjmp .L41
 532 0454 9091 0000             lds r25,motor_read
 533 0458 8091 0000             lds r24,motor_read_temperature.1658
 534 045c 9817                  cp r25,r24
 535 045e 01F4                  brne .L42
 536                    .L41:
 537 0460 82E0                  ldi r24,lo8(2)
 538 0462 00C0                  rjmp .L56
 539                    .L42:
 540 0464 81E0                  ldi r24,lo8(1)
 541                    .L56:
 542 0466 8093 0000             sts BuffLen.1660,r24
 543                    .L37:
 544 046a 8091 0000             lds r24,BuffLen.1660
 545 046e 8130                  cpi r24,lo8(1)
 546 0470 01F4                  brne .L43
 547 0472 85E8                  ldi r24,lo8(-123)
 548 0474 00C0                  rjmp .L57
 549                    .L43:
 550 0476 85EC                  ldi r24,lo8(-59)
 551                    .L57:
 552 0478 8093 BC00             sts 188,r24
 553 047c 8091 0000             lds r24,missing_motor.1657
 554 0480 8093 0000             sts MissingMotor,r24
 555 0484 1092 0000             sts missing_motor.1657,__zero_reg__
 556 0488 00C0                  rjmp .L54
 557                    .L15:
 558 048a 8091 BB00             lds r24,187
 559 048e E091 0000             lds r30,pBuff.1659
 560 0492 F091 0000             lds r31,(pBuff.1659)+1
 561 0496 8193                  st Z+,r24
 562 0498 F093 0000             sts (pBuff.1659)+1,r31
 563 049c E093 0000             sts pBuff.1659,r30
 564 04a0 8091 0000             lds r24,BuffLen.1660
 565 04a4 8150                  subi r24,lo8(-(-1))
 566 04a6 8093 0000             sts BuffLen.1660,r24
 567 04aa 8230                  cpi r24,lo8(2)
 568 04ac 00F0                  brlo .L44
 569 04ae 85EC                  ldi r24,lo8(-59)
 570 04b0 00C0                  rjmp .L58
 571                    .L44:
 572 04b2 8130                  cpi r24,lo8(1)
 573 04b4 01F4                  brne .L46
 574 04b6 85E8                  ldi r24,lo8(-123)
 575                    .L58:
 576 04b8 8093 BC00             sts 188,r24
 577 04bc 86E0                  ldi r24,lo8(6)
 578 04be 00C0                  rjmp .L61
 579                    .L46:
 580 04c0 8091 0000             lds r24,BLFlags
 581 04c4 81FF                  sbrs r24,1
 582 04c6 00C0                  rjmp .L47
 583 04c8 8091 0000             lds r24,FCFlags
 584 04cc 80FD                  sbrc r24,0
 585 04ce 00C0                  rjmp .L48
 586 04d0 E091 0000             lds r30,motor_read
 587 04d4 F0E0                  ldi r31,lo8(0)
 588 04d6 A3E0                  ldi r26,3
 589 04d8 EE0F          1:      lsl r30
 590 04da FF1F                  rol r31
 591 04dc AA95                  dec r26
 592 04de 01F4                  brne 1b
 593 04e0 E050                  subi r30,lo8(-(Motor))
 594 04e2 F040                  sbci r31,hi8(-(Motor))
 595 04e4 8681                  ldd r24,Z+6
 596 04e6 8A3F                  cpi r24,lo8(-6)
 597 04e8 01F4                  brne .L48
 598 04ea E091 0000             lds r30,motor_read
 599 04ee F0E0                  ldi r31,lo8(0)
 600 04f0 43E0                  ldi r20,3
 601 04f2 EE0F          1:      lsl r30
 602 04f4 FF1F                  rol r31
 603 04f6 4A95                  dec r20
 604 04f8 01F4                  brne 1b
 605 04fa E050                  subi r30,lo8(-(Motor))
 606 04fc F040                  sbci r31,hi8(-(Motor))
 607 04fe 8081                  ld r24,Z
 608 0500 8160                  ori r24,lo8(1)
 609 0502 8083                  st Z,r24
 610 0504 00C0                  rjmp .L47
 611                    .L48:
 612 0506 E091 0000             lds r30,motor_read
 613 050a F0E0                  ldi r31,lo8(0)
 614 050c 33E0                  ldi r19,3
 615 050e EE0F          1:      lsl r30
 616 0510 FF1F                  rol r31
 617 0512 3A95                  dec r19
 618 0514 01F4                  brne 1b
 619 0516 E050                  subi r30,lo8(-(Motor))
 620 0518 F040                  sbci r31,hi8(-(Motor))
 621 051a 1082                  st Z,__zero_reg__
 622                    .L47:
 623 051c 8091 0000             lds r24,motor_read
 624 0520 8F5F                  subi r24,lo8(-(1))
 625 0522 8093 0000             sts motor_read,r24
 626 0526 8091 0000             lds r24,motor_read
 627 052a 8C30                  cpi r24,lo8(12)
 628 052c 00F0                  brlo .L49
 629 052e 1092 0000             sts motor_read,__zero_reg__
 630 0532 1092 0000             sts (BLConfig_ReadMask)+1,__zero_reg__
 631 0536 1092 0000             sts BLConfig_ReadMask,__zero_reg__
 632 053a 8091 0000             lds r24,motor_read_temperature.1658
 633 053e 8F5F                  subi r24,lo8(-(1))
 634 0540 8093 0000             sts motor_read_temperature.1658,r24
 635 0544 8C30                  cpi r24,lo8(12)
 636 0546 00F0                  brlo .L49
 637 0548 1092 0000             sts motor_read_temperature.1658,__zero_reg__
 638 054c 8091 0000             lds r24,BLFlags
 639 0550 8D7F                  andi r24,lo8(-3)
 640 0552 8093 0000             sts BLFlags,r24
 641                    .L49:
 642 0556 1092 0000             sts twi_state,__zero_reg__
 643 055a 84E9                  ldi r24,lo8(-108)
 644 055c 8093 BC00             sts 188,r24
 645 0560 00C0                  rjmp .L62
 646                    .L61:
 647 0562 8093 0000             sts twi_state,r24
 648 0566 00C0                  rjmp .L54
 649                    .L16:
 650 0568 88E9                  ldi r24,lo8(-104)
 651 056a 00C0                  rjmp .L63
 652                    .L17:
 653 056c 8091 0000             lds r24,dac_channel
 654 0570 90E0                  ldi r25,lo8(0)
 655 0572 0896                  adiw r24,8
 656 0574 880F                  lsl r24
 657 0576 991F                  rol r25
 658 0578 00C0                  rjmp .L63
 659                    .L18:
 660 057a 8091 0000             lds r24,dac_channel
 661 057e 8130                  cpi r24,lo8(1)
 662 0580 01F0                  breq .L51
 663 0582 8130                  cpi r24,lo8(1)
 664 0584 00F0                  brlo .L50
 665 0586 8230                  cpi r24,lo8(2)
 666 0588 01F0                  breq .+2
 667 058a 00C0                  rjmp .L54
 668 058c 00C0                  rjmp .L65
 669                    .L50:
 670 058e 8091 0000             lds r24,AnalogOffsetNick
 671 0592 00C0                  rjmp .L63
 672                    .L51:
 673 0594 8091 0000             lds r24,AnalogOffsetRoll
 674 0598 00C0                  rjmp .L63
 675                    .L65:
 676 059a 8091 0000             lds r24,AnalogOffsetGier
 677 059e 00C0                  rjmp .L63
 678                    .L19:
 679 05a0 80E8                  ldi r24,lo8(-128)
 680 05a2 00C0                  rjmp .L63
 681                    .L20:
 682 05a4 1092 0000             sts twi_state,__zero_reg__
 683 05a8 84E9                  ldi r24,lo8(-108)
 684 05aa 8093 BC00             sts 188,r24
 685 05ae 8AE0                  ldi r24,lo8(10)
 686 05b0 90E0                  ldi r25,hi8(10)
 687 05b2 9093 0000             sts (I2CTimeout)+1,r25
 688 05b6 8093 0000             sts I2CTimeout,r24
 689 05ba 8091 0000             lds r24,dac_channel
 690 05be 8230                  cpi r24,lo8(2)
 691 05c0 00F4                  brsh .L53
 692 05c2 8091 0000             lds r24,dac_channel
 693 05c6 8F5F                  subi r24,lo8(-(1))
 694 05c8 8093 0000             sts dac_channel,r24
 695 05cc 82E1                  ldi r24,lo8(18)
 696 05ce 8093 0000             sts twi_state,r24
 697                    .L64:
 698 05d2 8091 0000             lds r24,BLFlags
 699 05d6 8E7F                  andi r24,lo8(-2)
 700 05d8 8093 0000             sts BLFlags,r24
 701 05dc 85EA                  ldi r24,lo8(-91)
 702                    .L59:
 703 05de 8093 BC00             sts 188,r24
 704 05e2 00C0                  rjmp .L54
 705                    .L53:
 706 05e4 1092 0000             sts dac_channel,__zero_reg__
 707                    .L62:
 708 05e8 8091 0000             lds r24,BLFlags
 709 05ec 8160                  ori r24,lo8(1)
 710 05ee 8093 0000             sts BLFlags,r24
 711 05f2 00C0                  rjmp .L54
 712                    .L8:
 713 05f4 1092 0000             sts twi_state,__zero_reg__
 714 05f8 84E9                  ldi r24,lo8(-108)
 715 05fa 8093 BC00             sts 188,r24
 716 05fe 8091 0000             lds r24,BLFlags
 717 0602 8160                  ori r24,lo8(1)
 718 0604 8093 0000             sts BLFlags,r24
 719 0608 8AE0                  ldi r24,lo8(10)
 720 060a 90E0                  ldi r25,hi8(10)
 721 060c 9093 0000             sts (I2CTimeout)+1,r25
 722 0610 8093 0000             sts I2CTimeout,r24
 723 0614 1092 0000             sts motor_write,__zero_reg__
 724 0618 1092 0000             sts motor_read,__zero_reg__
 725                    .L54:
 726                    /* epilogue start */
 727 061c FF91                  pop r31
 728 061e EF91                  pop r30
 729 0620 BF91                  pop r27
 730 0622 AF91                  pop r26
 731 0624 9F91                  pop r25
 732 0626 8F91                  pop r24
 733 0628 4F91                  pop r20
 734 062a 3F91                  pop r19
 735 062c 2F91                  pop r18
 736 062e 0F90                  pop r0
 737 0630 0FBE                  out __SREG__,r0
 738 0632 0F90                  pop r0
 739 0634 1F90                  pop __zero_reg__
 740 0636 1895                  reti
 742                    .global I2C_ReadBLConfig
 744                    I2C_ReadBLConfig:
 745 0638 FF92                  push r15
 746 063a 0F93                  push r16
 747 063c 1F93                  push r17
 748 063e CF93                  push r28
 749 0640 DF93                  push r29
 750                    /* prologue: function */
 751                    /* frame size = 0 */
 752 0642 982F                  mov r25,r24
 753 0644 8091 0000             lds r24,MotorenEin
 754 0648 8823                  tst r24
 755 064a 01F0                  breq .+2
 756 064c 00C0                  rjmp .L67
 757 064e 8091 0000             lds r24,PC_MotortestActive
 758 0652 8823                  tst r24
 759 0654 01F0                  breq .+2
 760 0656 00C0                  rjmp .L67
 761 0658 9D30                  cpi r25,lo8(13)
 762 065a 00F0                  brlo .+2
 763 065c 00C0                  rjmp .L68
 764 065e 9923                  tst r25
 765 0660 01F4                  brne .L69
 766 0662 86E0                  ldi r24,lo8(6)
 767 0664 00C0                  rjmp .L70
 768                    .L69:
 769 0666 C92F                  mov r28,r25
 770 0668 D0E0                  ldi r29,lo8(0)
 771 066a 2197                  sbiw r28,1
 772 066c FE01                  movw r30,r28
 773 066e 43E0                  ldi r20,3
 774 0670 EE0F          1:      lsl r30
 775 0672 FF1F                  rol r31
 776 0674 4A95                  dec r20
 777 0676 01F4                  brne 1b
 778 0678 E050                  subi r30,lo8(-(Motor))
 779 067a F040                  sbci r31,hi8(-(Motor))
 780 067c 8381                  ldd r24,Z+3
 781 067e 87FF                  sbrs r24,7
 782 0680 00C0                  rjmp .L68
 783 0682 8081                  ld r24,Z
 784 0684 80FD                  sbrc r24,0
 785 0686 00C0                  rjmp .L71
 786 0688 83E0                  ldi r24,lo8(3)
 787 068a 00C0                  rjmp .L70
 788                    .L71:
 789 068c 80ED                  ldi r24,lo8(2000)
 790 068e 97E0                  ldi r25,hi8(2000)
 791 0690 0E94 0000             call SetDelay
 792 0694 8C01                  movw r16,r24
 793                    .L73:
 794 0696 8091 0000             lds r24,BLFlags
 795 069a 80FD                  sbrc r24,0
 796 069c 00C0                  rjmp .L72
 797 069e C801                  movw r24,r16
 798 06a0 0E94 0000             call CheckDelay
 799 06a4 8823                  tst r24
 800 06a6 01F0                  breq .L73
 801                    .L72:
 802 06a8 81E0                  ldi r24,lo8(1)
 803 06aa 90E0                  ldi r25,hi8(1)
 804 06ac 00C0                  rjmp 2f
 805 06ae 880F          1:      lsl r24
 806 06b0 991F                  rol r25
 807 06b2 CA95          2:      dec r28
 808 06b4 02F4                  brpl 1b
 809 06b6 9093 0000             sts (BLConfig_ReadMask)+1,r25
 810 06ba 8093 0000             sts BLConfig_ReadMask,r24
 811 06be E0E0                  ldi r30,lo8(Motor+1)
 812 06c0 F0E0                  ldi r31,hi8(Motor+1)
 813 06c2 40E0                  ldi r20,lo8(0)
 814 06c4 50E0                  ldi r21,hi8(0)
 815 06c6 61E0                  ldi r22,lo8(1)
 816 06c8 70E0                  ldi r23,hi8(1)
 817                    .L75:
 818 06ca 2091 0000             lds r18,BLConfig_ReadMask
 819 06ce 3091 0000             lds r19,(BLConfig_ReadMask)+1
 820 06d2 CB01                  movw r24,r22
 821 06d4 042E                  mov r0,r20
 822 06d6 00C0                  rjmp 2f
 823 06d8 880F          1:      lsl r24
 824 06da 991F                  rol r25
 825 06dc 0A94          2:      dec r0
 826 06de 02F4                  brpl 1b
 827 06e0 8223                  and r24,r18
 828 06e2 9323                  and r25,r19
 829 06e4 892B                  or r24,r25
 830 06e6 01F0                  breq .L74
 831 06e8 1082                  st Z,__zero_reg__
 832 06ea 1182                  std Z+1,__zero_reg__
 833                    .L74:
 834 06ec 4F5F                  subi r20,lo8(-(1))
 835 06ee 5F4F                  sbci r21,hi8(-(1))
 836 06f0 3896                  adiw r30,8
 837 06f2 4C30                  cpi r20,12
 838 06f4 5105                  cpc r21,__zero_reg__
 839 06f6 01F4                  brne .L75
 840 06f8 1092 0000             sts motor_read,__zero_reg__
 841 06fc 1092 0000             sts BLConfig,__zero_reg__
 842 0700 1092 0000             sts BLConfig+7,__zero_reg__
 843 0704 35EA                  ldi r19,lo8(-91)
 844 0706 F32E                  mov r15,r19
 845                    .L79:
 846 0708 1092 0000             sts twi_state,__zero_reg__
 847 070c 8091 0000             lds r24,BLFlags
 848 0710 8E7F                  andi r24,lo8(-2)
 849 0712 8093 0000             sts BLFlags,r24
 850 0716 F092 BC00             sts 188,r15
 851                    .L77:
 852 071a 8091 0000             lds r24,BLFlags
 853 071e 80FD                  sbrc r24,0
 854 0720 00C0                  rjmp .L76
 855 0722 C801                  movw r24,r16
 856 0724 0E94 0000             call CheckDelay
 857 0728 8823                  tst r24
 858 072a 01F0                  breq .L77
 859                    .L76:
 860 072c 8091 0000             lds r24,BLConfig_ReadMask
 861 0730 9091 0000             lds r25,(BLConfig_ReadMask)+1
 862 0734 892B                  or r24,r25
 863 0736 01F0                  breq .L78
 864 0738 C801                  movw r24,r16
 865 073a 0E94 0000             call CheckDelay
 866 073e 8823                  tst r24
 867 0740 01F0                  breq .L79
 868                    .L78:
 869 0742 8091 0000             lds r24,BLConfig
 870 0746 8230                  cpi r24,lo8(2)
 871 0748 01F0                  breq .L80
 872 074a 84E0                  ldi r24,lo8(4)
 873 074c 00C0                  rjmp .L70
 874                    .L80:
 875 074e 80E0                  ldi r24,lo8(BLConfig)
 876 0750 90E0                  ldi r25,hi8(BLConfig)
 877 0752 67E0                  ldi r22,lo8(7)
 878 0754 70E0                  ldi r23,hi8(7)
 879 0756 0E94 0000             call RAM_Checksum
 880 075a 9091 0000             lds r25,BLConfig+7
 881 075e 8917                  cp r24,r25
 882 0760 01F4                  brne .L81
 883 0762 80E0                  ldi r24,lo8(0)
 884 0764 00C0                  rjmp .L70
 885                    .L81:
 886 0766 85E0                  ldi r24,lo8(5)
 887 0768 00C0                  rjmp .L70
 888                    .L67:
 889 076a 81E0                  ldi r24,lo8(1)
 890 076c 00C0                  rjmp .L70
 891                    .L68:
 892 076e 82E0                  ldi r24,lo8(2)
 893                    .L70:
 894                    /* epilogue start */
 895 0770 CDB7                  in r28,__SP_L__
 896 0772 DEB7                  in r29,__SP_H__
 897 0774 E5E0                  ldi r30, lo8(5)
 898 0776 0C94 0000             jmp __epilogue_restores__ + ((18 - 5) * 2)
 900                    .global I2C_WriteBLConfig
 902                    I2C_WriteBLConfig:
 903 077a 1F93                  push r17
 904 077c CF93                  push r28
 905 077e DF93                  push r29
 906                    /* prologue: function */
 907                    /* frame size = 0 */
 908 0780 182F                  mov r17,r24
 909 0782 8091 0000             lds r24,MotorenEin
 910 0786 8823                  tst r24
 911 0788 01F0                  breq .+2
 912 078a 00C0                  rjmp .L88
 913 078c 8091 0000             lds r24,PC_MotortestActive
 914 0790 8823                  tst r24
 915 0792 01F0                  breq .+2
 916 0794 00C0                  rjmp .L88
 917 0796 1D30                  cpi r17,lo8(13)
 918 0798 00F0                  brlo .+2
 919 079a 00C0                  rjmp .L89
 920 079c 1123                  tst r17
 921 079e 01F0                  breq .L90
 922 07a0 E12F                  mov r30,r17
 923 07a2 F0E0                  ldi r31,lo8(0)
 924 07a4 53E0                  ldi r21,3
 925 07a6 EE0F          1:      lsl r30
 926 07a8 FF1F                  rol r31
 927 07aa 5A95                  dec r21
 928 07ac 01F4                  brne 1b
 929 07ae E050                  subi r30,lo8(-(Motor-8))
 930 07b0 F040                  sbci r31,hi8(-(Motor-8))
 931 07b2 8381                  ldd r24,Z+3
 932 07b4 87FF                  sbrs r24,7
 933 07b6 00C0                  rjmp .L89
 934 07b8 8081                  ld r24,Z
 935 07ba 80FD                  sbrc r24,0
 936 07bc 00C0                  rjmp .L90
 937 07be 83E0                  ldi r24,lo8(3)
 938 07c0 00C0                  rjmp .L91
 939                    .L90:
 940 07c2 8091 0000             lds r24,BLConfig
 941 07c6 8230                  cpi r24,lo8(2)
 942 07c8 01F0                  breq .L92
 943 07ca 84E0                  ldi r24,lo8(4)
 944 07cc 00C0                  rjmp .L91
 945                    .L92:
 946 07ce 80E0                  ldi r24,lo8(BLConfig)
 947 07d0 90E0                  ldi r25,hi8(BLConfig)
 948 07d2 67E0                  ldi r22,lo8(7)
 949 07d4 70E0                  ldi r23,hi8(7)
 950 07d6 0E94 0000             call RAM_Checksum
 951 07da 9091 0000             lds r25,BLConfig+7
 952 07de 8917                  cp r24,r25
 953 07e0 01F0                  breq .L93
 954 07e2 85E0                  ldi r24,lo8(5)
 955 07e4 00C0                  rjmp .L91
 956                    .L93:
 957 07e6 80ED                  ldi r24,lo8(2000)
 958 07e8 97E0                  ldi r25,hi8(2000)
 959 07ea 0E94 0000             call SetDelay
 960 07ee EC01                  movw r28,r24
 961                    .L95:
 962 07f0 8091 0000             lds r24,BLFlags
 963 07f4 80FD                  sbrc r24,0
 964 07f6 00C0                  rjmp .L94
 965 07f8 CE01                  movw r24,r28
 966 07fa 0E94 0000             call CheckDelay
 967 07fe 8823                  tst r24
 968 0800 01F0                  breq .L95
 969                    .L94:
 970 0802 1123                  tst r17
 971 0804 01F4                  brne .L96
 972 0806 8FEF                  ldi r24,lo8(255)
 973 0808 90E0                  ldi r25,hi8(255)
 974                    .L109:
 975 080a 9093 0000             sts (BLConfig_WriteMask)+1,r25
 976 080e 8093 0000             sts BLConfig_WriteMask,r24
 977 0812 E0E0                  ldi r30,lo8(Motor+1)
 978 0814 F0E0                  ldi r31,hi8(Motor+1)
 979 0816 40E0                  ldi r20,lo8(0)
 980 0818 50E0                  ldi r21,hi8(0)
 981 081a 61E0                  ldi r22,lo8(1)
 982 081c 70E0                  ldi r23,hi8(1)
 983 081e 00C0                  rjmp .L97
 984                    .L96:
 985 0820 212F                  mov r18,r17
 986 0822 30E0                  ldi r19,lo8(0)
 987 0824 2150                  subi r18,lo8(-(-1))
 988 0826 3040                  sbci r19,hi8(-(-1))
 989 0828 81E0                  ldi r24,lo8(1)
 990 082a 90E0                  ldi r25,hi8(1)
 991 082c 00C0                  rjmp 2f
 992 082e 880F          1:      lsl r24
 993 0830 991F                  rol r25
 994 0832 2A95          2:      dec r18
 995 0834 02F4                  brpl 1b
 996 0836 00C0                  rjmp .L109
 997                    .L97:
 998 0838 2091 0000             lds r18,BLConfig_WriteMask
 999 083c 3091 0000             lds r19,(BLConfig_WriteMask)+1
 1000 0840 CB01                 movw r24,r22
 1001 0842 042E                 mov r0,r20
 1002 0844 00C0                 rjmp 2f
 1003 0846 880F         1:      lsl r24
 1004 0848 991F                 rol r25
 1005 084a 0A94         2:      dec r0
 1006 084c 02F4                 brpl 1b
 1007 084e 8223                 and r24,r18
 1008 0850 9323                 and r25,r19
 1009 0852 892B                 or r24,r25
 1010 0854 01F0                 breq .L99
 1011 0856 1082                 st Z,__zero_reg__
 1012 0858 1182                 std Z+1,__zero_reg__
 1013                   .L99:
 1014 085a 4F5F                 subi r20,lo8(-(1))
 1015 085c 5F4F                 sbci r21,hi8(-(1))
 1016 085e 3896                 adiw r30,8
 1017 0860 4C30                 cpi r20,12
 1018 0862 5105                 cpc r21,__zero_reg__
 1019 0864 01F4                 brne .L97
 1020 0866 1092 0000            sts motor_write,__zero_reg__
 1021 086a 15EA                 ldi r17,lo8(-91)
 1022                   .L103:
 1023 086c 1092 0000            sts twi_state,__zero_reg__
 1024 0870 8091 0000            lds r24,BLFlags
 1025 0874 8E7F                 andi r24,lo8(-2)
 1026 0876 8093 0000            sts BLFlags,r24
 1027 087a 1093 BC00            sts 188,r17
 1028                   .L101:
 1029 087e 8091 0000            lds r24,BLFlags
 1030 0882 80FD                 sbrc r24,0
 1031 0884 00C0                 rjmp .L100
 1032 0886 CE01                 movw r24,r28
 1033 0888 0E94 0000            call CheckDelay
 1034 088c 8823                 tst r24
 1035 088e 01F0                 breq .L101
 1036                   .L100:
 1037 0890 8091 0000            lds r24,BLConfig_WriteMask
 1038 0894 9091 0000            lds r25,(BLConfig_WriteMask)+1
 1039 0898 892B                 or r24,r25
 1040 089a 01F0                 breq .L102
 1041 089c CE01                 movw r24,r28
 1042 089e 0E94 0000            call CheckDelay
 1043 08a2 8823                 tst r24
 1044 08a4 01F0                 breq .L103
 1045                   .L102:
 1046 08a6 8091 0000            lds r24,BLConfig_WriteMask
 1047 08aa 9091 0000            lds r25,(BLConfig_WriteMask)+1
 1048 08ae 892B                 or r24,r25
 1049 08b0 01F4                 brne .L89
 1050 08b2 80E0                 ldi r24,lo8(0)
 1051 08b4 00C0                 rjmp .L91
 1052                   .L88:
 1053 08b6 81E0                 ldi r24,lo8(1)
 1054 08b8 00C0                 rjmp .L91
 1055                   .L89:
 1056 08ba 82E0                 ldi r24,lo8(2)
 1057                   .L91:
 1058                   /* epilogue start */
 1059 08bc DF91                 pop r29
 1060 08be CF91                 pop r28
 1061 08c0 1F91                 pop r17
 1062 08c2 0895                 ret
 1064                   .global twi_state
 1065                   .global twi_state
 1066                           .section .bss
 1069                   twi_state:
 1070 0000 00                   .skip 1,0
 1071                   .global dac_channel
 1072                   .global dac_channel
 1075                   dac_channel:
 1076 0001 00                   .skip 1,0
 1077                   .global motor_write
 1078                   .global motor_write
 1081                   motor_write:
 1082 0002 00                   .skip 1,0
 1083                   .global motor_read
 1084                   .global motor_read
 1087                   motor_read:
 1088 0003 00                   .skip 1,0
 1089                   .global I2CTimeout
 1090                           .data
 1093                   I2CTimeout:
 1094 0000 6400                 .word   100
 1095                   .global MissingMotor
 1096                   .global MissingMotor
 1097                           .section .bss
 1100                   MissingMotor:
 1101 0004 00                   .skip 1,0
 1102                   .global BLFlags
 1103                   .global BLFlags
 1106                   BLFlags:
 1107 0005 00                   .skip 1,0
 1108                   .global BLConfig_WriteMask
 1109                   .global BLConfig_WriteMask
 1112                   BLConfig_WriteMask:
 1113 0006 0000                 .skip 2,0
 1114                   .global BLConfig_ReadMask
 1115                   .global BLConfig_ReadMask
 1118                   BLConfig_ReadMask:
 1119 0008 0000                 .skip 2,0
 1120                           .lcomm BuffLen.1660,1
 1121                           .lcomm pBuff.1659,2
 1122                           .lcomm motor_read_temperature.1658,1
 1123                           .lcomm missing_motor.1657,1
 1124                           .comm Motor,96,1
 1125                           .comm BLConfig,8,1
 1126                   .global __do_copy_data
 1127                   .global __do_clear_bss
DEFINED SYMBOLS
                            *ABS*:00000000 twimaster.c
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:2      *ABS*:0000003f __SREG__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:3      *ABS*:0000003e __SP_H__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:4      *ABS*:0000003d __SP_L__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:5      *ABS*:00000034 __CCP__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:6      *ABS*:00000000 __tmp_reg__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:7      *ABS*:00000001 __zero_reg__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:11     .text:00000000 I2C_Init
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:1069   .bss:00000000 twi_state
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:1081   .bss:00000002 motor_write
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:1087   .bss:00000003 motor_read
                            *COM*:00000060 Motor
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:55     .text:0000004c I2C_Reset
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:1106   .bss:00000005 BLFlags
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:99     .text:000000aa __vector_26
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:1112   .bss:00000006 BLConfig_WriteMask
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:1118   .bss:00000008 BLConfig_ReadMask
                            *COM*:00000008 BLConfig
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:1120   .bss:0000000b pBuff.1659
                             .bss:0000000a BuffLen.1660
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:1122   .bss:0000000e missing_motor.1657
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:1093   .data:00000000 I2CTimeout
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:1121   .bss:0000000d motor_read_temperature.1658
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:1100   .bss:00000004 MissingMotor
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:1075   .bss:00000001 dac_channel
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:744    .text:00000638 I2C_ReadBLConfig
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccHkTAFJ.s:902    .text:0000077a I2C_WriteBLConfig

UNDEFINED SYMBOLS
__tablejump2__
Mixer
RequiredMotors
FCFlags
AnalogOffsetNick
AnalogOffsetRoll
AnalogOffsetGier
MotorenEin
PC_MotortestActive
SetDelay
CheckDelay
RAM_Checksum
__epilogue_restores__
__do_copy_data
__do_clear_bss