Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
66 | jan-hendri | 1 | 1 .file "timer0.c" |
2 | 2 __SREG__ = 0x3f |
||
3 | 3 __SP_H__ = 0x3e |
||
4 | 4 __SP_L__ = 0x3d |
||
5 | 5 __tmp_reg__ = 0 |
||
6 | 6 __zero_reg__ = 1 |
||
7 | 7 .global __do_copy_data |
||
8 | 8 .global __do_clear_bss |
||
9 | 11 .text |
||
10 | 12 .Ltext0: |
||
11 | 101 .global __vector_9 |
||
12 | 103 __vector_9: |
||
13 | 104 .stabd 46,0,0 |
||
14 | 1:src/timer0.c **** /***************************************************************************** |
||
15 | 2:src/timer0.c **** |
||
16 | 3:src/timer0.c **** *****************************************************************************/ |
||
17 | 4:src/timer0.c **** #include "main.h" |
||
18 | 5:src/timer0.c **** volatile unsigned int CountMilliseconds = 0; |
||
19 | 6:src/timer0.c **** volatile unsigned char Timer0Overflow; |
||
20 | 7:src/timer0.c **** |
||
21 | 8:src/timer0.c **** enum { |
||
22 | 9:src/timer0.c **** STOP = 0, |
||
23 | 10:src/timer0.c **** CK = 1, |
||
24 | 11:src/timer0.c **** CK8 = 2, |
||
25 | 12:src/timer0.c **** CK64 = 3, |
||
26 | 13:src/timer0.c **** CK256 = 4, |
||
27 | 14:src/timer0.c **** CK1024 = 5, |
||
28 | 15:src/timer0.c **** T0_FALLING_EDGE = 6, |
||
29 | 16:src/timer0.c **** T0_RISING_EDGE = 7 |
||
30 | 17:src/timer0.c **** }; |
||
31 | 18:src/timer0.c **** |
||
32 | 19:src/timer0.c **** |
||
33 | 20:src/timer0.c **** SIGNAL(SIG_OVERFLOW0) |
||
34 | 21:src/timer0.c **** { |
||
35 | 106 .LM0: |
||
36 | 107 .LFBB1: |
||
37 | 108 /* prologue: frame size=0 */ |
||
38 | 109 0000 1F92 push __zero_reg__ |
||
39 | 110 0002 0F92 push __tmp_reg__ |
||
40 | 111 0004 0FB6 in __tmp_reg__,__SREG__ |
||
41 | 112 0006 0F92 push __tmp_reg__ |
||
42 | 113 0008 1124 clr __zero_reg__ |
||
43 | 114 000a 8F93 push r24 |
||
44 | 115 000c 9F93 push r25 |
||
45 | 116 /* prologue end (size=7) */ |
||
46 | 22:src/timer0.c **** static unsigned char cnt; |
||
47 | 23:src/timer0.c **** Timer0Overflow++; |
||
48 | 118 .LM1: |
||
49 | 119 000e 8091 0000 lds r24,Timer0Overflow |
||
50 | 120 0012 8F5F subi r24,lo8(-(1)) |
||
51 | 121 0014 8093 0000 sts Timer0Overflow,r24 |
||
52 | 24:src/timer0.c **** if(!cnt--) |
||
53 | 123 .LM2: |
||
54 | 124 0018 8091 0000 lds r24,cnt.2066 |
||
55 | 125 001c 8150 subi r24,lo8(-(-1)) |
||
56 | 126 001e 8093 0000 sts cnt.2066,r24 |
||
57 | 127 0022 8F3F cpi r24,lo8(-1) |
||
58 | 128 0024 01F4 brne .L10 |
||
59 | 25:src/timer0.c **** { |
||
60 | 26:src/timer0.c **** cnt = 3; |
||
61 | 130 .LM3: |
||
62 | 131 0026 83E0 ldi r24,lo8(3) |
||
63 | 132 0028 8093 0000 sts cnt.2066,r24 |
||
64 | 27:src/timer0.c **** CountMilliseconds += 1; |
||
65 | 134 .LM4: |
||
66 | 135 002c 8091 0000 lds r24,CountMilliseconds |
||
67 | 136 0030 9091 0000 lds r25,(CountMilliseconds)+1 |
||
68 | 137 0034 0196 adiw r24,1 |
||
69 | 138 0036 9093 0000 sts (CountMilliseconds)+1,r25 |
||
70 | 139 003a 8093 0000 sts CountMilliseconds,r24 |
||
71 | 28:src/timer0.c **** if(I2C_Timeout) I2C_Timeout--; |
||
72 | 141 .LM5: |
||
73 | 142 003e 8091 0000 lds r24,I2C_Timeout |
||
74 | 143 0042 9091 0000 lds r25,(I2C_Timeout)+1 |
||
75 | 144 0046 0097 sbiw r24,0 |
||
76 | 145 0048 01F0 breq .L4 |
||
77 | 146 004a 0197 sbiw r24,1 |
||
78 | 147 004c 9093 0000 sts (I2C_Timeout)+1,r25 |
||
79 | 148 0050 8093 0000 sts I2C_Timeout,r24 |
||
80 | 149 .L4: |
||
81 | 29:src/timer0.c **** if(PPM_Timeout) PPM_Timeout--; else anz_ppm_werte = 0; |
||
82 | 151 .LM6: |
||
83 | 152 0054 8091 0000 lds r24,PPM_Timeout |
||
84 | 153 0058 8823 tst r24 |
||
85 | 154 005a 01F0 breq .L6 |
||
86 | 155 005c 8091 0000 lds r24,PPM_Timeout |
||
87 | 156 0060 8150 subi r24,lo8(-(-1)) |
||
88 | 157 0062 8093 0000 sts PPM_Timeout,r24 |
||
89 | 158 0066 00C0 rjmp .L8 |
||
90 | 159 .L6: |
||
91 | 160 0068 1092 0000 sts anz_ppm_werte,__zero_reg__ |
||
92 | 161 .L8: |
||
93 | 30:src/timer0.c **** if(SIO_Timeout) SIO_Timeout--; |
||
94 | 163 .LM7: |
||
95 | 164 006c 8091 0000 lds r24,SIO_Timeout |
||
96 | 165 0070 9091 0000 lds r25,(SIO_Timeout)+1 |
||
97 | 166 0074 0097 sbiw r24,0 |
||
98 | 167 0076 01F0 breq .L10 |
||
99 | 168 0078 0197 sbiw r24,1 |
||
100 | 169 007a 9093 0000 sts (SIO_Timeout)+1,r25 |
||
101 | 170 007e 8093 0000 sts SIO_Timeout,r24 |
||
102 | 171 .L10: |
||
103 | 172 /* epilogue: frame size=0 */ |
||
104 | 173 0082 9F91 pop r25 |
||
105 | 174 0084 8F91 pop r24 |
||
106 | 175 0086 0F90 pop __tmp_reg__ |
||
107 | 176 0088 0FBE out __SREG__,__tmp_reg__ |
||
108 | 177 008a 0F90 pop __tmp_reg__ |
||
109 | 178 008c 1F90 pop __zero_reg__ |
||
110 | 179 008e 1895 reti |
||
111 | 180 /* epilogue end (size=7) */ |
||
112 | 181 /* function __vector_9 size 72 (58) */ |
||
113 | 186 .Lscope1: |
||
114 | 188 .stabd 78,0,0 |
||
115 | 190 .global Timer0_Init |
||
116 | 192 Timer0_Init: |
||
117 | 193 .stabd 46,0,0 |
||
118 | 31:src/timer0.c **** } |
||
119 | 32:src/timer0.c **** } |
||
120 | 33:src/timer0.c **** |
||
121 | 34:src/timer0.c **** |
||
122 | 35:src/timer0.c **** void Timer0_Init(void) |
||
123 | 36:src/timer0.c **** { |
||
124 | 195 .LM8: |
||
125 | 196 .LFBB2: |
||
126 | 197 /* prologue: frame size=0 */ |
||
127 | 198 /* prologue end (size=0) */ |
||
128 | 37:src/timer0.c **** TCCR0 = TIMER_TEILER; |
||
129 | 200 .LM9: |
||
130 | 201 0090 82E0 ldi r24,lo8(2) |
||
131 | 202 0092 83BF out 83-0x20,r24 |
||
132 | 38:src/timer0.c **** // TCNT0 = -TIMER_RELOAD_VALUE; // reload |
||
133 | 39:src/timer0.c **** TIM0_START; |
||
134 | 204 .LM10: |
||
135 | 205 0094 89B7 in r24,89-0x20 |
||
136 | 206 0096 8160 ori r24,lo8(1) |
||
137 | 207 0098 89BF out 89-0x20,r24 |
||
138 | 40:src/timer0.c **** TIMER2_INT_ENABLE; |
||
139 | 209 .LM11: |
||
140 | 210 009a 89B7 in r24,89-0x20 |
||
141 | 211 009c 8064 ori r24,lo8(64) |
||
142 | 212 009e 89BF out 89-0x20,r24 |
||
143 | 213 /* epilogue: frame size=0 */ |
||
144 | 214 00a0 0895 ret |
||
145 | 215 /* epilogue end (size=1) */ |
||
146 | 216 /* function Timer0_Init size 9 (8) */ |
||
147 | 218 .Lscope2: |
||
148 | 220 .stabd 78,0,0 |
||
149 | 223 .global SetDelay |
||
150 | 225 SetDelay: |
||
151 | 226 .stabd 46,0,0 |
||
152 | 41:src/timer0.c **** } |
||
153 | 42:src/timer0.c **** |
||
154 | 43:src/timer0.c **** |
||
155 | 44:src/timer0.c **** unsigned int SetDelay(unsigned int t) |
||
156 | 45:src/timer0.c **** { |
||
157 | 228 .LM12: |
||
158 | 229 .LFBB3: |
||
159 | 230 /* prologue: frame size=0 */ |
||
160 | 231 /* prologue end (size=0) */ |
||
161 | 46:src/timer0.c **** return(CountMilliseconds + t - 1); |
||
162 | 233 .LM13: |
||
163 | 234 00a2 2091 0000 lds r18,CountMilliseconds |
||
164 | 235 00a6 3091 0000 lds r19,(CountMilliseconds)+1 |
||
165 | 236 00aa 2150 subi r18,lo8(-(-1)) |
||
166 | 237 00ac 3040 sbci r19,hi8(-(-1)) |
||
167 | 47:src/timer0.c **** } |
||
168 | 239 .LM14: |
||
169 | 240 00ae 820F add r24,r18 |
||
170 | 241 00b0 931F adc r25,r19 |
||
171 | 242 /* epilogue: frame size=0 */ |
||
172 | 243 00b2 0895 ret |
||
173 | 244 /* epilogue end (size=1) */ |
||
174 | 245 /* function SetDelay size 9 (8) */ |
||
175 | 247 .Lscope3: |
||
176 | 249 .stabd 78,0,0 |
||
177 | 252 .global CheckDelay |
||
178 | 254 CheckDelay: |
||
179 | 255 .stabd 46,0,0 |
||
180 | 48:src/timer0.c **** |
||
181 | 49:src/timer0.c **** char CheckDelay (unsigned int t) |
||
182 | 50:src/timer0.c **** { |
||
183 | 257 .LM15: |
||
184 | 258 .LFBB4: |
||
185 | 259 /* prologue: frame size=0 */ |
||
186 | 260 /* prologue end (size=0) */ |
||
187 | 51:src/timer0.c **** return(((t - CountMilliseconds) & 0x8000) >> 8); |
||
188 | 262 .LM16: |
||
189 | 263 00b4 2091 0000 lds r18,CountMilliseconds |
||
190 | 264 00b8 3091 0000 lds r19,(CountMilliseconds)+1 |
||
191 | 265 00bc 821B sub r24,r18 |
||
192 | 266 00be 930B sbc r25,r19 |
||
193 | 267 00c0 892F mov r24,r25 |
||
194 | 268 00c2 9927 clr r25 |
||
195 | 269 00c4 8078 andi r24,lo8(-128) |
||
196 | 52:src/timer0.c **** } |
||
197 | 271 .LM17: |
||
198 | 272 00c6 9927 clr r25 |
||
199 | 273 /* epilogue: frame size=0 */ |
||
200 | 274 00c8 0895 ret |
||
201 | 275 /* epilogue end (size=1) */ |
||
202 | 276 /* function CheckDelay size 11 (10) */ |
||
203 | 278 .Lscope4: |
||
204 | 280 .stabd 78,0,0 |
||
205 | 283 .global Delay_ms |
||
206 | 285 Delay_ms: |
||
207 | 286 .stabd 46,0,0 |
||
208 | 53:src/timer0.c **** |
||
209 | 54:src/timer0.c **** void Delay_ms(unsigned int w) |
||
210 | 55:src/timer0.c **** { |
||
211 | 288 .LM18: |
||
212 | 289 .LFBB5: |
||
213 | 290 /* prologue: frame size=0 */ |
||
214 | 291 /* prologue end (size=0) */ |
||
215 | 292 00ca AC01 movw r20,r24 |
||
216 | 293 .LBB6: |
||
217 | 294 .LBB7: |
||
218 | 296 .LM19: |
||
219 | 297 00cc 2091 0000 lds r18,CountMilliseconds |
||
220 | 298 00d0 3091 0000 lds r19,(CountMilliseconds)+1 |
||
221 | 299 .LBE7: |
||
222 | 300 .LBE6: |
||
223 | 56:src/timer0.c **** unsigned int akt; |
||
224 | 57:src/timer0.c **** akt = SetDelay(w); |
||
225 | 58:src/timer0.c **** while (!CheckDelay(akt)); |
||
226 | 302 .LM20: |
||
227 | 303 00d4 2150 subi r18,lo8(-(-1)) |
||
228 | 304 00d6 3040 sbci r19,hi8(-(-1)) |
||
229 | 305 .L18: |
||
230 | 306 .LBB8: |
||
231 | 307 .LBB9: |
||
232 | 309 .LM21: |
||
233 | 310 00d8 8091 0000 lds r24,CountMilliseconds |
||
234 | 311 00dc 9091 0000 lds r25,(CountMilliseconds)+1 |
||
235 | 312 .LBE9: |
||
236 | 313 .LBE8: |
||
237 | 315 .LM22: |
||
238 | 316 00e0 B901 movw r22,r18 |
||
239 | 317 00e2 681B sub r22,r24 |
||
240 | 318 00e4 790B sbc r23,r25 |
||
241 | 319 00e6 CB01 movw r24,r22 |
||
242 | 320 00e8 840F add r24,r20 |
||
243 | 321 00ea 951F adc r25,r21 |
||
244 | 322 00ec 8070 andi r24,lo8(-32768) |
||
245 | 323 00ee 9078 andi r25,hi8(-32768) |
||
246 | 324 00f0 892F mov r24,r25 |
||
247 | 325 00f2 9927 clr r25 |
||
248 | 326 00f4 8823 tst r24 |
||
249 | 327 00f6 01F0 breq .L18 |
||
250 | 328 /* epilogue: frame size=0 */ |
||
251 | 329 00f8 0895 ret |
||
252 | 330 /* epilogue end (size=1) */ |
||
253 | 331 /* function Delay_ms size 24 (23) */ |
||
254 | 333 .Lscope5: |
||
255 | 335 .stabd 78,0,0 |
||
256 | 336 .global CountMilliseconds |
||
257 | 337 .global CountMilliseconds |
||
258 | 338 .section .bss |
||
259 | 341 CountMilliseconds: |
||
260 | 342 0000 0000 .skip 2,0 |
||
261 | 343 .lcomm cnt.2066,1 |
||
262 | 344 .comm Timer0Overflow,1,1 |
||
263 | 348 .text |
||
264 | 350 .Letext0: |
||
265 | 351 /* File "src/timer0.c": code 125 = 0x007d ( 107), prologues 7, epilogues 11 */ |
||
266 | DEFINED SYMBOLS |
||
267 | *ABS*:00000000 timer0.c |
||
268 | /tmp/ccieS1Um.s:2 *ABS*:0000003f __SREG__ |
||
269 | /tmp/ccieS1Um.s:3 *ABS*:0000003e __SP_H__ |
||
270 | /tmp/ccieS1Um.s:4 *ABS*:0000003d __SP_L__ |
||
271 | /tmp/ccieS1Um.s:5 *ABS*:00000000 __tmp_reg__ |
||
272 | /tmp/ccieS1Um.s:6 *ABS*:00000001 __zero_reg__ |
||
273 | /tmp/ccieS1Um.s:103 .text:00000000 __vector_9 |
||
274 | *COM*:00000001 Timer0Overflow |
||
275 | .bss:00000002 cnt.2066 |
||
276 | /tmp/ccieS1Um.s:341 .bss:00000000 CountMilliseconds |
||
277 | /tmp/ccieS1Um.s:192 .text:00000090 Timer0_Init |
||
278 | /tmp/ccieS1Um.s:225 .text:000000a2 SetDelay |
||
279 | /tmp/ccieS1Um.s:254 .text:000000b4 CheckDelay |
||
280 | /tmp/ccieS1Um.s:285 .text:000000ca Delay_ms |
||
281 | |||
282 | UNDEFINED SYMBOLS |
||
283 | __do_copy_data |
||
284 | __do_clear_bss |
||
285 | I2C_Timeout |
||
286 | PPM_Timeout |
||
287 | anz_ppm_werte |
||
288 | SIO_Timeout |