Go to most recent revision | 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 __tmp_reg__ = 0
6 __zero_reg__ = 1
7 .global __do_copy_data
8 .global __do_clear_bss
9 .text
10 .global i2c_init
12 i2c_init:
13 /* prologue: frame size=0 */
14 /* prologue end (size=0) */
15 0000 1092 B900 sts 185,__zero_reg__
16 0004 8AE2 ldi r24,lo8(42)
17 0006 8093 B800 sts 184,r24
18 /* epilogue: frame size=0 */
19 000a 0895 ret
20 /* epilogue end (size=1) */
21 /* function i2c_init size 6 (5) */
23 .global i2c_start
25 i2c_start:
26 /* prologue: frame size=0 */
27 /* prologue end (size=0) */
28 000c 85EA ldi r24,lo8(-91)
29 000e 8093 BC00 sts 188,r24
30 0012 80E0 ldi r24,lo8(0)
31 0014 90E0 ldi r25,hi8(0)
32 /* epilogue: frame size=0 */
33 0016 0895 ret
34 /* epilogue end (size=1) */
35 /* function i2c_start size 6 (5) */
37 .global i2c_stop
39 i2c_stop:
40 /* prologue: frame size=0 */
41 /* prologue end (size=0) */
42 0018 84E9 ldi r24,lo8(-108)
43 001a 8093 BC00 sts 188,r24
44 /* epilogue: frame size=0 */
45 001e 0895 ret
46 /* epilogue end (size=1) */
47 /* function i2c_stop size 4 (3) */
49 .global i2c_write_byte
51 i2c_write_byte:
52 /* prologue: frame size=0 */
53 /* prologue end (size=0) */
54 0020 1092 B900 sts 185,__zero_reg__
55 0024 8093 BB00 sts 187,r24
56 0028 85E8 ldi r24,lo8(-123)
57 002a 8093 BC00 sts 188,r24
58 002e 80E0 ldi r24,lo8(0)
59 0030 90E0 ldi r25,hi8(0)
60 /* epilogue: frame size=0 */
61 0032 0895 ret
62 /* epilogue end (size=1) */
63 /* function i2c_write_byte size 10 (9) */
65 .global i2c_reset
67 i2c_reset:
68 /* prologue: frame size=0 */
69 /* prologue end (size=0) */
70 0034 0E94 0000 call i2c_stop
71 0038 1092 0000 sts twi_state,__zero_reg__
72 003c EBEB ldi r30,lo8(187)
73 003e F0E0 ldi r31,hi8(187)
74 0040 8081 ld r24,Z
75 0042 1092 0000 sts motor,__zero_reg__
76 0046 80E8 ldi r24,lo8(-128)
77 0048 8093 BC00 sts 188,r24
78 004c 1092 BD00 sts 189,__zero_reg__
79 0050 1092 BA00 sts 186,__zero_reg__
80 0054 1082 st Z,__zero_reg__
81 0056 1092 B900 sts 185,__zero_reg__
82 005a 1092 B800 sts 184,__zero_reg__
83 005e 0E94 0000 call i2c_init
84 0062 0E94 0000 call i2c_start
85 0066 80E0 ldi r24,lo8(0)
86 0068 0E94 0000 call i2c_write_byte
87 /* epilogue: frame size=0 */
88 006c 0895 ret
89 /* epilogue end (size=1) */
90 /* function i2c_reset size 29 (28) */
92 .global __vector_26
94 __vector_26:
95 /* prologue: frame size=0 */
96 006e 1F92 push __zero_reg__
97 0070 0F92 push __tmp_reg__
98 0072 0FB6 in __tmp_reg__,__SREG__
99 0074 0F92 push __tmp_reg__
100 0076 1124 clr __zero_reg__
101 0078 2F93 push r18
102 007a 3F93 push r19
103 007c 4F93 push r20
104 007e 5F93 push r21
105 0080 6F93 push r22
106 0082 7F93 push r23
107 0084 8F93 push r24
108 0086 9F93 push r25
109 0088 AF93 push r26
110 008a BF93 push r27
111 008c EF93 push r30
112 008e FF93 push r31
113 /* prologue end (size=17) */
114 0090 8091 0000 lds r24,twi_state
115 0094 8F5F subi r24,lo8(-(1))
116 0096 8093 0000 sts twi_state,r24
117 009a 8150 subi r24,lo8(-(-1))
118 009c E82F mov r30,r24
119 009e F0E0 ldi r31,lo8(0)
120 00a0 E731 cpi r30,23
121 00a2 F105 cpc r31,__zero_reg__
122 00a4 00F0 brlo .+2
123 00a6 00C0 rjmp .L12
124 00a8 E050 subi r30,lo8(-(gs(.L36)))
**** Warning:expression dangerous with linker stubs
125 00aa F040 sbci r31,hi8(-(gs(.L36)))
**** Warning:expression dangerous with linker stubs
126 00ac EE0F lsl r30
127 00ae FF1F rol r31
128 00b0 0590 lpm __tmp_reg__,Z+
129 00b2 F491 lpm r31,Z
130 00b4 E02D mov r30,__tmp_reg__
131 00b6 0994 ijmp
132 .data
133 .section .progmem.gcc_sw_table, "a", @progbits
134 .p2align 1
135 .L36:
136 .data
137 .section .progmem.gcc_sw_table, "a", @progbits
138 .p2align 1
139 0000 0000 .word gs(.L13)
140 0002 0000 .word gs(.L14)
141 0004 0000 .word gs(.L15)
142 0006 0000 .word gs(.L16)
143 0008 0000 .word gs(.L17)
144 000a 0000 .word gs(.L18)
145 000c 0000 .word gs(.L55)
146 000e 0000 .word gs(.L20)
147 0010 0000 .word gs(.L31)
148 0012 0000 .word gs(.L22)
149 0014 0000 .word gs(.L23)
150 0016 0000 .word gs(.L34)
151 0018 0000 .word gs(.L30)
152 001a 0000 .word gs(.L31)
153 001c 0000 .word gs(.L27)
154 001e 0000 .word gs(.L28)
155 0020 0000 .word gs(.L34)
156 0022 0000 .word gs(.L30)
157 0024 0000 .word gs(.L31)
158 0026 0000 .word gs(.L32)
159 0028 0000 .word gs(.L33)
160 002a 0000 .word gs(.L34)
161 002c 0000 .word gs(.L35)
162 .text
163 .L18:
164 00b8 8091 BB00 lds r24,187
165 00bc 9091 0000 lds r25,motorread
166 00c0 E92F mov r30,r25
167 00c2 F0E0 ldi r31,lo8(0)
168 00c4 E050 subi r30,lo8(-(motor_rx))
169 00c6 F040 sbci r31,hi8(-(motor_rx))
170 00c8 8083 st Z,r24
171 .L19:
172 00ca 9130 cpi r25,lo8(1)
173 00cc 01F4 brne .+2
174 00ce 00C0 rjmp .L49
175 00d0 9130 cpi r25,lo8(1)
176 00d2 00F4 brsh .+2
177 00d4 00C0 rjmp .L48
178 00d6 9230 cpi r25,lo8(2)
179 00d8 01F4 brne .+2
180 00da 00C0 rjmp .L50
181 00dc 9330 cpi r25,lo8(3)
182 00de 01F0 breq .+2
183 00e0 00C0 rjmp .L12
184 .L51:
185 00e2 8091 0000 lds r24,Motor_Links
186 00e6 0E94 0000 call i2c_write_byte
187 00ea 00C0 rjmp .L12
188 .L31:
189 00ec 88E9 ldi r24,lo8(-104)
190 00ee 0E94 0000 call i2c_write_byte
191 00f2 00C0 rjmp .L12
192 .L34:
193 00f4 80E8 ldi r24,lo8(-128)
194 00f6 0E94 0000 call i2c_write_byte
195 00fa 00C0 rjmp .L12
196 .L30:
197 00fc 0E94 0000 call i2c_stop
198 0100 8AE0 ldi r24,lo8(10)
199 0102 90E0 ldi r25,hi8(10)
200 0104 9093 0000 sts (I2CTimeout)+1,r25
201 0108 8093 0000 sts I2CTimeout,r24
202 .L62:
203 010c 0E94 0000 call i2c_start
204 0110 00C0 rjmp .L12
205 .L20:
206 0112 9091 0000 lds r25,motorread
207 0116 8091 BB00 lds r24,187
208 011a E92F mov r30,r25
209 011c F0E0 ldi r31,lo8(0)
210 011e E050 subi r30,lo8(-(motor_rx))
211 0120 F040 sbci r31,hi8(-(motor_rx))
212 0122 8483 std Z+4,r24
213 0124 9F5F subi r25,lo8(-(1))
214 0126 9093 0000 sts motorread,r25
215 012a 9430 cpi r25,lo8(4)
216 012c 00F0 brlo .L35
217 012e 1092 0000 sts motorread,__zero_reg__
218 .L35:
219 0132 0E94 0000 call i2c_stop
220 0136 8AE0 ldi r24,lo8(10)
221 0138 90E0 ldi r25,hi8(10)
222 013a 9093 0000 sts (I2CTimeout)+1,r25
223 013e 8093 0000 sts I2CTimeout,r24
224 0142 1092 0000 sts twi_state,__zero_reg__
225 0146 00C0 rjmp .L12
226 .L15:
227 0148 0E94 0000 call i2c_stop
228 014c 8091 0000 lds r24,motor
229 0150 8430 cpi r24,lo8(4)
230 0152 00F0 brlo .+2
231 0154 00C0 rjmp .L41
232 0156 1092 0000 sts twi_state,__zero_reg__
233 015a 00C0 rjmp .L62
234 .L33:
235 015c 8091 0000 lds r24,AnalogOffsetGier
236 0160 0E94 0000 call i2c_write_byte
237 0164 00C0 rjmp .L12
238 .L23:
239 0166 8091 0000 lds r24,AnalogOffsetNick
240 016a 0E94 0000 call i2c_write_byte
241 016e 00C0 rjmp .L12
242 .L13:
243 0170 8091 0000 lds r24,motor
244 0174 880F lsl r24
245 0176 8E5A subi r24,lo8(-(82))
246 0178 0E94 0000 call i2c_write_byte
247 017c 00C0 rjmp .L12
248 .L22:
249 017e 80E1 ldi r24,lo8(16)
250 0180 0E94 0000 call i2c_write_byte
251 0184 00C0 rjmp .L12
252 .L17:
253 0186 8091 0000 lds r24,motorread
254 018a 8130 cpi r24,lo8(1)
255 018c 01F0 breq .L49
256 .L61:
257 018e 8130 cpi r24,lo8(1)
258 0190 00F0 brlo .L48
259 0192 8230 cpi r24,lo8(2)
260 0194 01F0 breq .L50
261 0196 8330 cpi r24,lo8(3)
262 0198 01F4 brne .L12
263 019a 00C0 rjmp .L51
264 .L14:
265 019c 8091 0000 lds r24,motor
266 01a0 8F5F subi r24,lo8(-(1))
267 01a2 8093 0000 sts motor,r24
268 01a6 8150 subi r24,lo8(-(-1))
269 01a8 8130 cpi r24,lo8(1)
270 01aa 01F4 brne .L61
271 .L49:
272 01ac 8091 0000 lds r24,Motor_Hinten
273 01b0 0E94 0000 call i2c_write_byte
274 01b4 00C0 rjmp .L12
275 .L32:
276 01b6 84E1 ldi r24,lo8(20)
277 01b8 0E94 0000 call i2c_write_byte
278 01bc 00C0 rjmp .L12
279 .L28:
280 01be 8091 0000 lds r24,AnalogOffsetRoll
281 01c2 0E94 0000 call i2c_write_byte
282 01c6 00C0 rjmp .L12
283 .L27:
284 01c8 82E1 ldi r24,lo8(18)
285 01ca 0E94 0000 call i2c_write_byte
286 01ce 00C0 rjmp .L12
287 .L16:
288 01d0 8091 0000 lds r24,motorread
289 01d4 880F lsl r24
290 01d6 8D5A subi r24,lo8(-(83))
291 01d8 0E94 0000 call i2c_write_byte
292 01dc 00C0 rjmp .L12
293 .L55:
294 01de 9091 0000 lds r25,motorread
295 01e2 00C0 rjmp .L19
296 .L48:
297 01e4 8091 0000 lds r24,Motor_Vorne
298 01e8 0E94 0000 call i2c_write_byte
299 01ec 00C0 rjmp .L12
300 .L50:
301 01ee 8091 0000 lds r24,Motor_Rechts
302 01f2 0E94 0000 call i2c_write_byte
303 01f6 00C0 rjmp .L12
304 .L41:
305 01f8 1092 0000 sts motor,__zero_reg__
306 01fc 00C0 rjmp .L62
307 .L12:
308 01fe 8091 BC00 lds r24,188
309 0202 8068 ori r24,lo8(-128)
310 0204 8093 BC00 sts 188,r24
311 /* epilogue: frame size=0 */
312 0208 FF91 pop r31
313 020a EF91 pop r30
314 020c BF91 pop r27
315 020e AF91 pop r26
316 0210 9F91 pop r25
317 0212 8F91 pop r24
318 0214 7F91 pop r23
319 0216 6F91 pop r22
320 0218 5F91 pop r21
321 021a 4F91 pop r20
322 021c 3F91 pop r19
323 021e 2F91 pop r18
324 0220 0F90 pop __tmp_reg__
325 0222 0FBE out __SREG__,__tmp_reg__
326 0224 0F90 pop __tmp_reg__
327 0226 1F90 pop __zero_reg__
328 0228 1895 reti
329 /* epilogue end (size=17) */
330 /* function __vector_26 size 245 (211) */
332 .global twi_state
333 .global twi_state
334 .section .bss
337 twi_state:
338 0000 00 .skip 1,0
339 .global motor
340 .global motor
343 motor:
344 0001 00 .skip 1,0
345 .global motorread
346 .global motorread
349 motorread:
350 0002 00 .skip 1,0
351 .comm motor_rx,16,1
352 /* File "twimaster.c": code 300 = 0x012c ( 261), prologues 17, epilogues 22 */
DEFINED SYMBOLS
*ABS*:00000000 twimaster.c
C:\DOKUME~1\DPeters\LOKALE~1\Temp/ccactjaa.s:2 *ABS*:0000003f __SREG__
C:\DOKUME~1\DPeters\LOKALE~1\Temp/ccactjaa.s:3 *ABS*:0000003e __SP_H__
C:\DOKUME~1\DPeters\LOKALE~1\Temp/ccactjaa.s:4 *ABS*:0000003d __SP_L__
C:\DOKUME~1\DPeters\LOKALE~1\Temp/ccactjaa.s:5 *ABS*:00000000 __tmp_reg__
C:\DOKUME~1\DPeters\LOKALE~1\Temp/ccactjaa.s:6 *ABS*:00000001 __zero_reg__
C:\DOKUME~1\DPeters\LOKALE~1\Temp/ccactjaa.s:12 .text:00000000 i2c_init
C:\DOKUME~1\DPeters\LOKALE~1\Temp/ccactjaa.s:25 .text:0000000c i2c_start
C:\DOKUME~1\DPeters\LOKALE~1\Temp/ccactjaa.s:39 .text:00000018 i2c_stop
C:\DOKUME~1\DPeters\LOKALE~1\Temp/ccactjaa.s:51 .text:00000020 i2c_write_byte
C:\DOKUME~1\DPeters\LOKALE~1\Temp/ccactjaa.s:67 .text:00000034 i2c_reset
C:\DOKUME~1\DPeters\LOKALE~1\Temp/ccactjaa.s:337 .bss:00000000 twi_state
C:\DOKUME~1\DPeters\LOKALE~1\Temp/ccactjaa.s:343 .bss:00000001 motor
C:\DOKUME~1\DPeters\LOKALE~1\Temp/ccactjaa.s:94 .text:0000006e __vector_26
C:\DOKUME~1\DPeters\LOKALE~1\Temp/ccactjaa.s:349 .bss:00000002 motorread
*COM*:00000010 motor_rx
UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss
Motor_Links
I2CTimeout
AnalogOffsetGier
AnalogOffsetNick
Motor_Hinten
AnalogOffsetRoll
Motor_Vorne
Motor_Rechts