Subversion Repositories FlightCtrl

Rev

Rev 1189 | Details | Compare with Previous | Last modification | View Log | RSS feed

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