Subversion Repositories FlightCtrl

Rev

Blame | Last modification | View Log | RSS feed

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

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