Subversion Repositories FlightCtrl

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1564 LPDunwell 1
   1               		.file	"twimaster.c"
2
   2               	__SREG__ = 0x3f
3
   3               	__SP_H__ = 0x3e
4
   4               	__SP_L__ = 0x3d
5
   5               	__CCP__  = 0x34
6
   6               	__tmp_reg__ = 0
7
   7               	__zero_reg__ = 1
8
   8               		.text
9
   9               	.global	I2C_Init
10
  11               	I2C_Init:
11
  12               	/* prologue: function */
12
  13               	/* frame size = 0 */
13
  14 0000 9FB7      		in r25,__SREG__
14
  15               	/* #APP */
15
  16               	 ;  84 "twimaster.c" 1
16
  17 0002 F894      		cli
17
  18               	 ;  0 "" 2
18
  19               	/* #NOAPP */
19
  20 0004 3998      		cbi 39-32,1
20
  21 0006 389A      		sbi 39-32,0
21
  22 0008 88B1      		in r24,40-32
22
  23 000a 8360      		ori r24,lo8(3)
23
  24 000c 88B9      		out 40-32,r24
24
  25 000e 8091 B900 		lds r24,185
25
  26 0012 8C7F      		andi r24,lo8(-4)
26
  27 0014 8093 B900 		sts 185,r24
27
  28 0018 8AE2      		ldi r24,lo8(42)
28
  29 001a 8093 B800 		sts 184,r24
29
  30 001e 1092 0000 		sts twi_state,__zero_reg__
30
  31 0022 1092 0000 		sts motor_write,__zero_reg__
31
  32 0026 1092 0000 		sts motor_read,__zero_reg__
32
  33 002a E0E0      		ldi r30,lo8(Motor)
33
  34 002c F0E0      		ldi r31,hi8(Motor)
34
  35               	.L2:
35
  36 002e 1082      		st Z,__zero_reg__
36
  37 0030 1182      		std Z+1,__zero_reg__
37
  38 0032 1282      		std Z+2,__zero_reg__
38
  39 0034 1482      		std Z+4,__zero_reg__
39
  40 0036 3596      		adiw r30,5
40
  41 0038 80E0      		ldi r24,hi8(Motor+60)
41
  42 003a E030      		cpi r30,lo8(Motor+60)
42
  43 003c F807      		cpc r31,r24
43
  44 003e 01F4      		brne .L2
44
  45 0040 9FBF      		out __SREG__,r25
45
  46               	/* epilogue start */
46
  47 0042 0895      		ret
47
  49               	.global	I2C_Start
48
  51               	I2C_Start:
49
  52               	/* prologue: function */
50
  53               	/* frame size = 0 */
51
  54 0044 8093 0000 		sts twi_state,r24
52
  55 0048 85EA      		ldi r24,lo8(-91)
53
  56 004a 8093 BC00 		sts 188,r24
54
  57               	/* epilogue start */
55
  58 004e 0895      		ret
56
  60               	.global	I2C_Stop
57
  62               	I2C_Stop:
58
  63               	/* prologue: function */
59
  64               	/* frame size = 0 */
60
  65 0050 8093 0000 		sts twi_state,r24
61
  66 0054 84E9      		ldi r24,lo8(-108)
62
  67 0056 8093 BC00 		sts 188,r24
63
  68               	/* epilogue start */
64
  69 005a 0895      		ret
65
  71               	.global	I2C_WriteByte
66
  73               	I2C_WriteByte:
67
  74               	/* prologue: function */
68
  75               	/* frame size = 0 */
69
  76 005c 8093 BB00 		sts 187,r24
70
  77 0060 85E8      		ldi r24,lo8(-123)
71
  78 0062 8093 BC00 		sts 188,r24
72
  79               	/* epilogue start */
73
  80 0066 0895      		ret
74
  82               	.global	I2C_ReceiveByte
75
  84               	I2C_ReceiveByte:
76
  85               	/* prologue: function */
77
  86               	/* frame size = 0 */
78
  87 0068 85EC      		ldi r24,lo8(-59)
79
  88 006a 8093 BC00 		sts 188,r24
80
  89               	/* epilogue start */
81
  90 006e 0895      		ret
82
  92               	.global	I2C_ReceiveLastByte
83
  94               	I2C_ReceiveLastByte:
84
  95               	/* prologue: function */
85
  96               	/* frame size = 0 */
86
  97 0070 85E8      		ldi r24,lo8(-123)
87
  98 0072 8093 BC00 		sts 188,r24
88
  99               	/* epilogue start */
89
 100 0076 0895      		ret
90
 102               	.global	I2C_Reset
91
 104               	I2C_Reset:
92
 105 0078 0F93      		push r16
93
 106 007a 1F93      		push r17
94
 107               	/* prologue: function */
95
 108               	/* frame size = 0 */
96
 109 007c 1092 0000 		sts twi_state,__zero_reg__
97
 110 0080 0CEB      		ldi r16,lo8(188)
98
 111 0082 10E0      		ldi r17,hi8(188)
99
 112 0084 84E9      		ldi r24,lo8(-108)
100
 113 0086 D801      		movw r26,r16
101
 114 0088 8C93      		st X,r24
102
 115 008a 1092 0000 		sts twi_state,__zero_reg__
103
 116 008e EBEB      		ldi r30,lo8(187)
104
 117 0090 F0E0      		ldi r31,hi8(187)
105
 118 0092 8081      		ld r24,Z
106
 119 0094 8093 0000 		sts motor_write,r24
107
 120 0098 1092 0000 		sts motor_write,__zero_reg__
108
 121 009c 1092 0000 		sts motor_read,__zero_reg__
109
 122 00a0 80E8      		ldi r24,lo8(-128)
110
 123 00a2 8C93      		st X,r24
111
 124 00a4 1092 BD00 		sts 189,__zero_reg__
112
 125 00a8 1092 BA00 		sts 186,__zero_reg__
113
 126 00ac 1082      		st Z,__zero_reg__
114
 127 00ae 1092 B900 		sts 185,__zero_reg__
115
 128 00b2 1092 B800 		sts 184,__zero_reg__
116
 129 00b6 0E94 0000 		call I2C_Init
117
 130 00ba 1092 0000 		sts twi_state,__zero_reg__
118
 131 00be 85EA      		ldi r24,lo8(-91)
119
 132 00c0 F801      		movw r30,r16
120
 133 00c2 8083      		st Z,r24
121
 134               	/* epilogue start */
122
 135 00c4 1F91      		pop r17
123
 136 00c6 0F91      		pop r16
124
 137 00c8 0895      		ret
125
 139               	.global	__vector_26
126
 141               	__vector_26:
127
 142 00ca 1F92      		push __zero_reg__
128
 143 00cc 0F92      		push r0
129
 144 00ce 0FB6      		in r0,__SREG__
130
 145 00d0 0F92      		push r0
131
 146 00d2 1124      		clr __zero_reg__
132
 147 00d4 2F93      		push r18
133
 148 00d6 8F93      		push r24
134
 149 00d8 9F93      		push r25
135
 150 00da EF93      		push r30
136
 151 00dc FF93      		push r31
137
 152               	/* prologue: Signal */
138
 153               	/* frame size = 0 */
139
 154 00de 8091 0000 		lds r24,twi_state
140
 155 00e2 8F5F      		subi r24,lo8(-(1))
141
 156 00e4 8093 0000 		sts twi_state,r24
142
 157 00e8 8150      		subi r24,lo8(-(-1))
143
 158 00ea 8530      		cpi r24,lo8(5)
144
 159 00ec 01F4      		brne .+2
145
 160 00ee 00C0      		rjmp .L25
146
 161 00f0 8630      		cpi r24,lo8(6)
147
 162 00f2 00F0      		brlo .L53
148
 163 00f4 8930      		cpi r24,lo8(9)
149
 164 00f6 01F4      		brne .+2
150
 165 00f8 00C0      		rjmp .L28
151
 166 00fa 8A30      		cpi r24,lo8(10)
152
 167 00fc 00F4      		brsh .L33
153
 168 00fe 8730      		cpi r24,lo8(7)
154
 169 0100 01F4      		brne .+2
155
 170 0102 00C0      		rjmp .L26
156
 171 0104 8830      		cpi r24,lo8(8)
157
 172 0106 01F4      		brne .+2
158
 173 0108 00C0      		rjmp .L54
159
 174               	.L19:
160
 175 010a 1092 0000 		sts twi_state,__zero_reg__
161
 176 010e 84E9      		ldi r24,lo8(-108)
162
 177 0110 8093 BC00 		sts 188,r24
163
 178 0114 8AE0      		ldi r24,lo8(10)
164
 179 0116 90E0      		ldi r25,hi8(10)
165
 180 0118 9093 0000 		sts (I2CTimeout)+1,r25
166
 181 011c 8093 0000 		sts I2CTimeout,r24
167
 182 0120 1092 0000 		sts motor_write,__zero_reg__
168
 183 0124 1092 0000 		sts motor_read,__zero_reg__
169
 184               	.L48:
170
 185               	/* epilogue start */
171
 186 0128 FF91      		pop r31
172
 187 012a EF91      		pop r30
173
 188 012c 9F91      		pop r25
174
 189 012e 8F91      		pop r24
175
 190 0130 2F91      		pop r18
176
 191 0132 0F90      		pop r0
177
 192 0134 0FBE      		out __SREG__,r0
178
 193 0136 0F90      		pop r0
179
 194 0138 1F90      		pop __zero_reg__
180
 195 013a 1895      		reti
181
 196               	.L53:
182
 197 013c 8230      		cpi r24,lo8(2)
183
 198 013e 01F4      		brne .+2
184
 199 0140 00C0      		rjmp .L22
185
 200 0142 8330      		cpi r24,lo8(3)
186
 201 0144 00F0      		brlo .L55
187
 202 0146 8330      		cpi r24,lo8(3)
188
 203 0148 01F4      		brne .+2
189
 204 014a 00C0      		rjmp .L23
190
 205 014c 8430      		cpi r24,lo8(4)
191
 206 014e 01F4      		brne .L19
192
 207 0150 8091 0000 		lds r24,motor_read
193
 208 0154 2091 BB00 		lds r18,187
194
 209 0158 90E0      		ldi r25,lo8(0)
195
 210 015a FC01      		movw r30,r24
196
 211 015c EE0F      		lsl r30
197
 212 015e FF1F      		rol r31
198
 213 0160 EE0F      		lsl r30
199
 214 0162 FF1F      		rol r31
200
 215 0164 E80F      		add r30,r24
201
 216 0166 F91F      		adc r31,r25
202
 217 0168 E050      		subi r30,lo8(-(Motor))
203
 218 016a F040      		sbci r31,hi8(-(Motor))
204
 219 016c 2383      		std Z+3,r18
205
 220 016e 85E8      		ldi r24,lo8(-123)
206
 221 0170 8093 BC00 		sts 188,r24
207
 222 0174 00C0      		rjmp .L48
208
 223               	.L33:
209
 224 0176 8A30      		cpi r24,lo8(10)
210
 225 0178 01F4      		brne .+2
211
 226 017a 00C0      		rjmp .L29
212
 227 017c 8B30      		cpi r24,lo8(11)
213
 228 017e 01F4      		brne .L19
214
 229 0180 1092 0000 		sts twi_state,__zero_reg__
215
 230 0184 84E9      		ldi r24,lo8(-108)
216
 231 0186 8093 BC00 		sts 188,r24
217
 232 018a 8AE0      		ldi r24,lo8(10)
218
 233 018c 90E0      		ldi r25,hi8(10)
219
 234 018e 9093 0000 		sts (I2CTimeout)+1,r25
220
 235 0192 8093 0000 		sts I2CTimeout,r24
221
 236 0196 8091 0000 		lds r24,dac_channel
222
 237 019a 8230      		cpi r24,lo8(2)
223
 238 019c 00F4      		brsh .+2
224
 239 019e 00C0      		rjmp .L56
225
 240 01a0 1092 0000 		sts dac_channel,__zero_reg__
226
 241 01a4 00C0      		rjmp .L48
227
 242               	.L55:
228
 243 01a6 8823      		tst r24
229
 244 01a8 01F0      		breq .L52
230
 245 01aa 8130      		cpi r24,lo8(1)
231
 246 01ac 01F0      		breq .+2
232
 247 01ae 00C0      		rjmp .L19
233
 248 01b0 8091 0000 		lds r24,motor_write
234
 249 01b4 90E0      		ldi r25,lo8(0)
235
 250 01b6 FC01      		movw r30,r24
236
 251 01b8 EE0F      		lsl r30
237
 252 01ba FF1F      		rol r31
238
 253 01bc EE0F      		lsl r30
239
 254 01be FF1F      		rol r31
240
 255 01c0 E80F      		add r30,r24
241
 256 01c2 F91F      		adc r31,r25
242
 257 01c4 E050      		subi r30,lo8(-(Motor))
243
 258 01c6 F040      		sbci r31,hi8(-(Motor))
244
 259 01c8 8081      		ld r24,Z
245
 260 01ca 8093 BB00 		sts 187,r24
246
 261 01ce 85E8      		ldi r24,lo8(-123)
247
 262 01d0 8093 BC00 		sts 188,r24
248
 263 01d4 00C0      		rjmp .L48
249
 264               	.L57:
250
 265 01d6 8091 0000 		lds r24,motor_write
251
 266 01da 8C30      		cpi r24,lo8(12)
252
 267 01dc 00F4      		brsh .L34
253
 268 01de 8091 0000 		lds r24,motor_write
254
 269 01e2 8F5F      		subi r24,lo8(-(1))
255
 270 01e4 8093 0000 		sts motor_write,r24
256
 271               	.L52:
257
 272 01e8 E091 0000 		lds r30,motor_write
258
 273 01ec F0E0      		ldi r31,lo8(0)
259
 274 01ee EE0F      		lsl r30
260
 275 01f0 FF1F      		rol r31
261
 276 01f2 EE0F      		lsl r30
262
 277 01f4 FF1F      		rol r31
263
 278 01f6 E050      		subi r30,lo8(-(Mixer))
264
 279 01f8 F040      		sbci r31,hi8(-(Mixer))
265
 280 01fa 8585      		ldd r24,Z+13
266
 281 01fc 1816      		cp __zero_reg__,r24
267
 282 01fe 04F4      		brge .L57
268
 283               	.L34:
269
 284 0200 8091 0000 		lds r24,motor_write
270
 285 0204 8C30      		cpi r24,lo8(12)
271
 286 0206 00F4      		brsh .+2
272
 287 0208 00C0      		rjmp .L36
273
 288 020a 1092 0000 		sts motor_write,__zero_reg__
274
 289 020e 83E0      		ldi r24,lo8(3)
275
 290 0210 8093 0000 		sts twi_state,r24
276
 291 0214 8091 0000 		lds r24,motor_read
277
 292 0218 880F      		lsl r24
278
 293 021a 8D5A      		subi r24,lo8(-(83))
279
 294 021c 8093 BB00 		sts 187,r24
280
 295 0220 85E8      		ldi r24,lo8(-123)
281
 296 0222 8093 BC00 		sts 188,r24
282
 297 0226 00C0      		rjmp .L48
283
 298               	.L28:
284
 299 0228 8091 0000 		lds r24,dac_channel
285
 300 022c 8130      		cpi r24,lo8(1)
286
 301 022e 01F4      		brne .+2
287
 302 0230 00C0      		rjmp .L45
288
 303 0232 8130      		cpi r24,lo8(1)
289
 304 0234 00F4      		brsh .+2
290
 305 0236 00C0      		rjmp .L44
291
 306 0238 8230      		cpi r24,lo8(2)
292
 307 023a 01F0      		breq .+2
293
 308 023c 00C0      		rjmp .L48
294
 309 023e 8091 0000 		lds r24,DacOffsetGyroYaw
295
 310 0242 8093 BB00 		sts 187,r24
296
 311 0246 85E8      		ldi r24,lo8(-123)
297
 312 0248 8093 BC00 		sts 188,r24
298
 313 024c 00C0      		rjmp .L48
299
 314               	.L22:
300
 315 024e 8091 B900 		lds r24,185
301
 316 0252 8033      		cpi r24,lo8(48)
302
 317 0254 01F4      		brne .+2
303
 318 0256 00C0      		rjmp .L58
304
 319               	.L38:
305
 320 0258 1092 0000 		sts twi_state,__zero_reg__
306
 321 025c 84E9      		ldi r24,lo8(-108)
307
 322 025e 8093 BC00 		sts 188,r24
308
 323 0262 8AE0      		ldi r24,lo8(10)
309
 324 0264 90E0      		ldi r25,hi8(10)
310
 325 0266 9093 0000 		sts (I2CTimeout)+1,r25
311
 326 026a 8093 0000 		sts I2CTimeout,r24
312
 327 026e 8091 0000 		lds r24,motor_write
313
 328 0272 8F5F      		subi r24,lo8(-(1))
314
 329 0274 8093 0000 		sts motor_write,r24
315
 330 0278 1092 0000 		sts twi_state,__zero_reg__
316
 331 027c 85EA      		ldi r24,lo8(-91)
317
 332 027e 8093 BC00 		sts 188,r24
318
 333 0282 00C0      		rjmp .L48
319
 334               	.L25:
320
 335 0284 8091 0000 		lds r24,motor_read
321
 336 0288 2091 BB00 		lds r18,187
322
 337 028c 90E0      		ldi r25,lo8(0)
323
 338 028e FC01      		movw r30,r24
324
 339 0290 EE0F      		lsl r30
325
 340 0292 FF1F      		rol r31
326
 341 0294 EE0F      		lsl r30
327
 342 0296 FF1F      		rol r31
328
 343 0298 E80F      		add r30,r24
329
 344 029a F91F      		adc r31,r25
330
 345 029c E050      		subi r30,lo8(-(Motor))
331
 346 029e F040      		sbci r31,hi8(-(Motor))
332
 347 02a0 2483      		std Z+4,r18
333
 348 02a2 8091 0000 		lds r24,motor_read
334
 349 02a6 8F5F      		subi r24,lo8(-(1))
335
 350 02a8 8093 0000 		sts motor_read,r24
336
 351 02ac 8091 0000 		lds r24,motor_read
337
 352 02b0 8C30      		cpi r24,lo8(12)
338
 353 02b2 00F0      		brlo .L43
339
 354 02b4 1092 0000 		sts motor_read,__zero_reg__
340
 355               	.L43:
341
 356 02b8 1092 0000 		sts twi_state,__zero_reg__
342
 357 02bc 84E9      		ldi r24,lo8(-108)
343
 358 02be 8093 BC00 		sts 188,r24
344
 359 02c2 00C0      		rjmp .L48
345
 360               	.L29:
346
 361 02c4 80E8      		ldi r24,lo8(-128)
347
 362 02c6 8093 BB00 		sts 187,r24
348
 363 02ca 85E8      		ldi r24,lo8(-123)
349
 364 02cc 8093 BC00 		sts 188,r24
350
 365 02d0 00C0      		rjmp .L48
351
 366               	.L23:
352
 367 02d2 8091 B900 		lds r24,185
353
 368 02d6 8034      		cpi r24,lo8(64)
354
 369 02d8 01F4      		brne .+2
355
 370 02da 00C0      		rjmp .L40
356
 371 02dc 8091 0000 		lds r24,motor_read
357
 372 02e0 90E0      		ldi r25,lo8(0)
358
 373 02e2 FC01      		movw r30,r24
359
 374 02e4 EE0F      		lsl r30
360
 375 02e6 FF1F      		rol r31
361
 376 02e8 EE0F      		lsl r30
362
 377 02ea FF1F      		rol r31
363
 378 02ec E80F      		add r30,r24
364
 379 02ee F91F      		adc r31,r25
365
 380 02f0 E050      		subi r30,lo8(-(Motor))
366
 381 02f2 F040      		sbci r31,hi8(-(Motor))
367
 382 02f4 1182      		std Z+1,__zero_reg__
368
 383 02f6 8091 0000 		lds r24,motor_read
369
 384 02fa 8F5F      		subi r24,lo8(-(1))
370
 385 02fc 8093 0000 		sts motor_read,r24
371
 386 0300 8091 0000 		lds r24,motor_read
372
 387 0304 8C30      		cpi r24,lo8(12)
373
 388 0306 00F4      		brsh .L59
374
 389               	.L41:
375
 390 0308 1092 0000 		sts twi_state,__zero_reg__
376
 391 030c 84E9      		ldi r24,lo8(-108)
377
 392 030e 8093 BC00 		sts 188,r24
378
 393               	.L42:
379
 394 0312 8091 0000 		lds r24,missing_motor.1550
380
 395 0316 8093 0000 		sts MissingMotor,r24
381
 396 031a 1092 0000 		sts missing_motor.1550,__zero_reg__
382
 397 031e 00C0      		rjmp .L48
383
 398               	.L54:
384
 399 0320 8091 0000 		lds r24,dac_channel
385
 400 0324 90E0      		ldi r25,lo8(0)
386
 401 0326 0896      		adiw r24,8
387
 402 0328 880F      		lsl r24
388
 403 032a 991F      		rol r25
389
 404 032c 8093 BB00 		sts 187,r24
390
 405 0330 85E8      		ldi r24,lo8(-123)
391
 406 0332 8093 BC00 		sts 188,r24
392
 407 0336 00C0      		rjmp .L48
393
 408               	.L26:
394
 409 0338 88E9      		ldi r24,lo8(-104)
395
 410 033a 8093 BB00 		sts 187,r24
396
 411 033e 85E8      		ldi r24,lo8(-123)
397
 412 0340 8093 BC00 		sts 188,r24
398
 413 0344 00C0      		rjmp .L48
399
 414               	.L36:
400
 415 0346 8091 0000 		lds r24,motor_write
401
 416 034a 90E0      		ldi r25,lo8(0)
402
 417 034c 8996      		adiw r24,41
403
 418 034e 880F      		lsl r24
404
 419 0350 991F      		rol r25
405
 420 0352 8093 BB00 		sts 187,r24
406
 421 0356 85E8      		ldi r24,lo8(-123)
407
 422 0358 8093 BC00 		sts 188,r24
408
 423 035c 00C0      		rjmp .L48
409
 424               	.L44:
410
 425 035e 8091 0000 		lds r24,DacOffsetGyroNick
411
 426 0362 8093 BB00 		sts 187,r24
412
 427 0366 85E8      		ldi r24,lo8(-123)
413
 428 0368 8093 BC00 		sts 188,r24
414
 429 036c 00C0      		rjmp .L48
415
 430               	.L59:
416
 431 036e 1092 0000 		sts motor_read,__zero_reg__
417
 432 0372 00C0      		rjmp .L41
418
 433               	.L58:
419
 434 0374 8091 0000 		lds r24,missing_motor.1550
420
 435 0378 8823      		tst r24
421
 436 037a 01F4      		brne .L39
422
 437 037c 8091 0000 		lds r24,motor_write
423
 438 0380 8F5F      		subi r24,lo8(-(1))
424
 439 0382 8093 0000 		sts missing_motor.1550,r24
425
 440               	.L39:
426
 441 0386 8091 0000 		lds r24,motor_write
427
 442 038a 90E0      		ldi r25,lo8(0)
428
 443 038c FC01      		movw r30,r24
429
 444 038e EE0F      		lsl r30
430
 445 0390 FF1F      		rol r31
431
 446 0392 EE0F      		lsl r30
432
 447 0394 FF1F      		rol r31
433
 448 0396 E80F      		add r30,r24
434
 449 0398 F91F      		adc r31,r25
435
 450 039a E050      		subi r30,lo8(-(Motor))
436
 451 039c F040      		sbci r31,hi8(-(Motor))
437
 452 039e 8281      		ldd r24,Z+2
438
 453 03a0 8F5F      		subi r24,lo8(-(1))
439
 454 03a2 8283      		std Z+2,r24
440
 455 03a4 8823      		tst r24
441
 456 03a6 01F0      		breq .+2
442
 457 03a8 00C0      		rjmp .L38
443
 458 03aa 8091 0000 		lds r24,motor_write
444
 459 03ae 90E0      		ldi r25,lo8(0)
445
 460 03b0 FC01      		movw r30,r24
446
 461 03b2 EE0F      		lsl r30
447
 462 03b4 FF1F      		rol r31
448
 463 03b6 EE0F      		lsl r30
449
 464 03b8 FF1F      		rol r31
450
 465 03ba E80F      		add r30,r24
451
 466 03bc F91F      		adc r31,r25
452
 467 03be E050      		subi r30,lo8(-(Motor))
453
 468 03c0 F040      		sbci r31,hi8(-(Motor))
454
 469 03c2 8FEF      		ldi r24,lo8(-1)
455
 470 03c4 8283      		std Z+2,r24
456
 471 03c6 00C0      		rjmp .L38
457
 472               	.L40:
458
 473 03c8 8091 0000 		lds r24,motor_read
459
 474 03cc 2091 0000 		lds r18,motor_read
460
 475 03d0 90E0      		ldi r25,lo8(0)
461
 476 03d2 FC01      		movw r30,r24
462
 477 03d4 EE0F      		lsl r30
463
 478 03d6 FF1F      		rol r31
464
 479 03d8 EE0F      		lsl r30
465
 480 03da FF1F      		rol r31
466
 481 03dc E80F      		add r30,r24
467
 482 03de F91F      		adc r31,r25
468
 483 03e0 E050      		subi r30,lo8(-(Motor))
469
 484 03e2 F040      		sbci r31,hi8(-(Motor))
470
 485 03e4 2C5F      		subi r18,lo8(-(4))
471
 486 03e6 2183      		std Z+1,r18
472
 487 03e8 85EC      		ldi r24,lo8(-59)
473
 488 03ea 8093 BC00 		sts 188,r24
474
 489 03ee 00C0      		rjmp .L42
475
 490               	.L56:
476
 491 03f0 8091 0000 		lds r24,dac_channel
477
 492 03f4 8F5F      		subi r24,lo8(-(1))
478
 493 03f6 8093 0000 		sts dac_channel,r24
479
 494 03fa 87E0      		ldi r24,lo8(7)
480
 495 03fc 8093 0000 		sts twi_state,r24
481
 496 0400 85EA      		ldi r24,lo8(-91)
482
 497 0402 8093 BC00 		sts 188,r24
483
 498 0406 00C0      		rjmp .L48
484
 499               	.L45:
485
 500 0408 8091 0000 		lds r24,DacOffsetGyroRoll
486
 501 040c 8093 BB00 		sts 187,r24
487
 502 0410 85E8      		ldi r24,lo8(-123)
488
 503 0412 8093 BC00 		sts 188,r24
489
 504 0416 00C0      		rjmp .L48
490
 506               	.global	twi_state
491
 507               	.global	twi_state
492
 508               		.section .bss
493
 511               	twi_state:
494
 512 0000 00        		.skip 1,0
495
 513               	.global	dac_channel
496
 514               	.global	dac_channel
497
 517               	dac_channel:
498
 518 0001 00        		.skip 1,0
499
 519               	.global	motor_write
500
 520               	.global	motor_write
501
 523               	motor_write:
502
 524 0002 00        		.skip 1,0
503
 525               	.global	motor_read
504
 526               	.global	motor_read
505
 529               	motor_read:
506
 530 0003 00        		.skip 1,0
507
 531               	.global	I2CTimeout
508
 532               		.data
509
 535               	I2CTimeout:
510
 536 0000 6400      		.word	100
511
 537               	.global	MissingMotor
512
 538               	.global	MissingMotor
513
 539               		.section .bss
514
 542               	MissingMotor:
515
 543 0004 00        		.skip 1,0
516
 544               		.lcomm missing_motor.1550,1
517
 545               		.comm Motor,60,1
518
 546               	.global __do_copy_data
519
 547               	.global __do_clear_bss
520
DEFINED SYMBOLS
521
                            *ABS*:00000000 twimaster.c
522
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:2      *ABS*:0000003f __SREG__
523
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:3      *ABS*:0000003e __SP_H__
524
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:4      *ABS*:0000003d __SP_L__
525
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:5      *ABS*:00000034 __CCP__
526
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:6      *ABS*:00000000 __tmp_reg__
527
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:7      *ABS*:00000001 __zero_reg__
528
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:11     .text:00000000 I2C_Init
529
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:511    .bss:00000000 twi_state
530
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:523    .bss:00000002 motor_write
531
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:529    .bss:00000003 motor_read
532
                            *COM*:0000003c Motor
533
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:51     .text:00000044 I2C_Start
534
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:62     .text:00000050 I2C_Stop
535
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:73     .text:0000005c I2C_WriteByte
536
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:84     .text:00000068 I2C_ReceiveByte
537
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:94     .text:00000070 I2C_ReceiveLastByte
538
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:104    .text:00000078 I2C_Reset
539
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:141    .text:000000ca __vector_26
540
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:535    .data:00000000 I2CTimeout
541
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:517    .bss:00000001 dac_channel
542
                             .bss:00000005 missing_motor.1550
543
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/cctbOQQH.s:542    .bss:00000004 MissingMotor
544
 
545
UNDEFINED SYMBOLS
546
Mixer
547
DacOffsetGyroYaw
548
DacOffsetGyroNick
549
DacOffsetGyroRoll
550
__do_copy_data
551
__do_clear_bss