Subversion Repositories FlightCtrl

Rev

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

   1                            .file   "capacity.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 Capacity_Update
  11                    Capacity_Update:
  12                    /* prologue: function */
  13                    /* frame size = 0 */
  14 0000 8091 0000             lds r24,update_timer
  15 0004 9091 0000             lds r25,(update_timer)+1
  16 0008 0E94 0000             call CheckDelay
  17 000c 8823                  tst r24
  18 000e 01F4                  brne .+2
  19 0010 00C0                  rjmp .L13
  20 0012 8091 0000             lds r24,update_timer
  21 0016 9091 0000             lds r25,(update_timer)+1
  22 001a 0A96                  adiw r24,10
  23 001c 9093 0000             sts (update_timer)+1,r25
  24 0020 8093 0000             sts update_timer,r24
  25 0024 E0E0                  ldi r30,lo8(Motor+1)
  26 0026 F0E0                  ldi r31,hi8(Motor+1)
  27 0028 60E0                  ldi r22,lo8(0)
  28 002a 70E0                  ldi r23,hi8(0)
  29 002c 40E0                  ldi r20,lo8(0)
  30 002e 50E0                  ldi r21,hi8(0)
  31 0030 90E0                  ldi r25,lo8(0)
  32 0032 AFEF                  ldi r26,lo8(-1)
  33                    .L6:
  34 0034 8281                  ldd r24,Z+2
  35 0036 87FF                  sbrs r24,7
  36 0038 00C0                  rjmp .L3
  37 003a 9F5F                  subi r25,lo8(-(1))
  38 003c 8481                  ldd r24,Z+4
  39 003e 680F                  add r22,r24
  40 0040 711D                  adc r23,__zero_reg__
  41 0042 8081                  ld r24,Z
  42 0044 480F                  add r20,r24
  43 0046 511D                  adc r21,__zero_reg__
  44 0048 8581                  ldd r24,Z+5
  45 004a 8A17                  cp r24,r26
  46 004c 00F0                  brlo .L4
  47                    .L3:
  48 004e 8A2F                  mov r24,r26
  49                    .L4:
  50 0050 3896                  adiw r30,8
  51 0052 20E0                  ldi r18,hi8(Motor+97)
  52 0054 E030                  cpi r30,lo8(Motor+97)
  53 0056 F207                  cpc r31,r18
  54 0058 01F0                  breq .L5
  55 005a A82F                  mov r26,r24
  56 005c 00C0                  rjmp .L6
  57                    .L5:
  58 005e 8093 0000             sts Capacity+6,r24
  59 0062 452B                  or r20,r21
  60 0064 01F4                  brne .L7
  61 0066 8091 0000             lds r24,SumCurrentOffset.2245
  62 006a 9091 0000             lds r25,(SumCurrentOffset.2245)+1
  63 006e A091 0000             lds r26,(SumCurrentOffset.2245)+2
  64 0072 B091 0000             lds r27,(SumCurrentOffset.2245)+3
  65 0076 292F                  mov r18,r25
  66 0078 3A2F                  mov r19,r26
  67 007a 4B2F                  mov r20,r27
  68 007c 5527                  clr r21
  69 007e 3093 0000             sts (CurrentOffset.2244)+1,r19
  70 0082 2093 0000             sts CurrentOffset.2244,r18
  71 0086 40E0                  ldi r20,lo8(0)
  72 0088 50E0                  ldi r21,hi8(0)
  73 008a 821B                  sub r24,r18
  74 008c 930B                  sbc r25,r19
  75 008e A40B                  sbc r26,r20
  76 0090 B50B                  sbc r27,r21
  77 0092 9B01                  movw r18,r22
  78 0094 40E0                  ldi r20,lo8(0)
  79 0096 50E0                  ldi r21,hi8(0)
  80 0098 820F                  add r24,r18
  81 009a 931F                  adc r25,r19
  82 009c A41F                  adc r26,r20
  83 009e B51F                  adc r27,r21
  84 00a0 8093 0000             sts SumCurrentOffset.2245,r24
  85 00a4 9093 0000             sts (SumCurrentOffset.2245)+1,r25
  86 00a8 A093 0000             sts (SumCurrentOffset.2245)+2,r26
  87 00ac B093 0000             sts (SumCurrentOffset.2245)+3,r27
  88 00b0 E5E0                  ldi r30,lo8(5)
  89 00b2 F0E0                  ldi r31,hi8(5)
  90 00b4 00C0                  rjmp .L8
  91                    .L7:
  92 00b6 4091 0000             lds r20,CurrentOffset.2244
  93 00ba 5091 0000             lds r21,(CurrentOffset.2244)+1
  94 00be 4617                  cp r20,r22
  95 00c0 5707                  cpc r21,r23
  96 00c2 00F0                  brlo .L9
  97 00c4 20E0                  ldi r18,lo8(0)
  98 00c6 30E0                  ldi r19,hi8(0)
  99 00c8 00C0                  rjmp .L10
 100                    .L9:
 101 00ca 9B01                  movw r18,r22
 102 00cc 241B                  sub r18,r20
 103 00ce 350B                  sbc r19,r21
 104                    .L10:
 105 00d0 E92F                  mov r30,r25
 106 00d2 F0E0                  ldi r31,lo8(0)
 107 00d4 EE0F                  lsl r30
 108 00d6 FF1F                  rol r31
 109 00d8 3596                  adiw r30,5
 110 00da E20F                  add r30,r18
 111 00dc F31F                  adc r31,r19
 112                    .L8:
 113 00de F093 0000             sts (Capacity)+1,r31
 114 00e2 E093 0000             sts Capacity,r30
 115 00e6 EF3F                  cpi r30,255
 116 00e8 F105                  cpc r31,__zero_reg__
 117 00ea 00F4                  brsh .L11
 118 00ec 8091 0000             lds r24,UBat
 119 00f0 9091 0000             lds r25,(UBat)+1
 120 00f4 AC01                  movw r20,r24
 121 00f6 E49F                  mul r30,r20
 122 00f8 C001                  movw r24,r0
 123 00fa E59F                  mul r30,r21
 124 00fc 900D                  add r25,r0
 125 00fe F49F                  mul r31,r20
 126 0100 900D                  add r25,r0
 127 0102 1124                  clr r1
 128 0104 64E6                  ldi r22,lo8(100)
 129 0106 70E0                  ldi r23,hi8(100)
 130 0108 00C0                  rjmp .L14
 131                    .L11:
 132 010a 8091 0000             lds r24,UBat
 133 010e 9091 0000             lds r25,(UBat)+1
 134 0112 9F01                  movw r18,r30
 135 0114 3695                  lsr r19
 136 0116 2795                  ror r18
 137 0118 3695                  lsr r19
 138 011a 2795                  ror r18
 139 011c AC01                  movw r20,r24
 140 011e 249F                  mul r18,r20
 141 0120 C001                  movw r24,r0
 142 0122 259F                  mul r18,r21
 143 0124 900D                  add r25,r0
 144 0126 349F                  mul r19,r20
 145 0128 900D                  add r25,r0
 146 012a 1124                  clr r1
 147 012c 69E1                  ldi r22,lo8(25)
 148 012e 70E0                  ldi r23,hi8(25)
 149                    .L14:
 150 0130 0E94 0000             call __udivmodhi4
 151 0134 7093 0000             sts (Capacity+2)+1,r23
 152 0138 6093 0000             sts Capacity+2,r22
 153 013c 2091 0000             lds r18,SubCounter.2243
 154 0140 3091 0000             lds r19,(SubCounter.2243)+1
 155 0144 2E0F                  add r18,r30
 156 0146 3F1F                  adc r19,r31
 157 0148 3093 0000             sts (SubCounter.2243)+1,r19
 158 014c 2093 0000             sts SubCounter.2243,r18
 159 0150 5EE0                  ldi r21,hi8(3601)
 160 0152 2131                  cpi r18,lo8(3601)
 161 0154 3507                  cpc r19,r21
 162 0156 00F0                  brlo .L13
 163 0158 8091 0000             lds r24,Capacity+4
 164 015c 9091 0000             lds r25,(Capacity+4)+1
 165 0160 0196                  adiw r24,1
 166 0162 9093 0000             sts (Capacity+4)+1,r25
 167 0166 8093 0000             sts Capacity+4,r24
 168 016a 2051                  subi r18,lo8(-(-3600))
 169 016c 3E40                  sbci r19,hi8(-(-3600))
 170 016e 3093 0000             sts (SubCounter.2243)+1,r19
 171 0172 2093 0000             sts SubCounter.2243,r18
 172                    .L13:
 173 0176 0895                  ret
 175                    .global Capacity_Init
 177                    Capacity_Init:
 178                    /* prologue: function */
 179                    /* frame size = 0 */
 180 0178 1092 0000             sts (Capacity)+1,__zero_reg__
 181 017c 1092 0000             sts Capacity,__zero_reg__
 182 0180 1092 0000             sts (Capacity+4)+1,__zero_reg__
 183 0184 1092 0000             sts Capacity+4,__zero_reg__
 184 0188 1092 0000             sts (Capacity+2)+1,__zero_reg__
 185 018c 1092 0000             sts Capacity+2,__zero_reg__
 186 0190 1092 0000             sts Capacity+6,__zero_reg__
 187 0194 8AE0                  ldi r24,lo8(10)
 188 0196 90E0                  ldi r25,hi8(10)
 189 0198 0E94 0000             call SetDelay
 190 019c 9093 0000             sts (update_timer)+1,r25
 191 01a0 8093 0000             sts update_timer,r24
 192                    /* epilogue start */
 193 01a4 0895                  ret
 195                    .global update_timer
 196                    .global update_timer
 197                            .section .bss
 200                    update_timer:
 201 0000 0000                  .skip 2,0
 202                            .lcomm SumCurrentOffset.2245,4
 203                            .lcomm CurrentOffset.2244,2
 204                            .lcomm SubCounter.2243,2
 205                            .comm Capacity,7,1
 206                    .global __do_clear_bss
DEFINED SYMBOLS
                            *ABS*:00000000 capacity.c
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc3DnvEP.s:2      *ABS*:0000003f __SREG__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc3DnvEP.s:3      *ABS*:0000003e __SP_H__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc3DnvEP.s:4      *ABS*:0000003d __SP_L__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc3DnvEP.s:5      *ABS*:00000034 __CCP__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc3DnvEP.s:6      *ABS*:00000000 __tmp_reg__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc3DnvEP.s:7      *ABS*:00000001 __zero_reg__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc3DnvEP.s:11     .text:00000000 Capacity_Update
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc3DnvEP.s:200    .bss:00000000 update_timer
                            *COM*:00000007 Capacity
                             .bss:00000002 SumCurrentOffset.2245
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc3DnvEP.s:202    .bss:00000006 CurrentOffset.2244
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc3DnvEP.s:203    .bss:00000008 SubCounter.2243
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc3DnvEP.s:177    .text:00000178 Capacity_Init

UNDEFINED SYMBOLS
CheckDelay
Motor
UBat
__udivmodhi4
SetDelay
__do_clear_bss