Subversion Repositories svnkaklik

Rev

Rev 409 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
174 kaklik 1
 
2
AVRcam.elf:     file format elf32-avr
3
 
4
Sections:
5
Idx Name          Size      VMA       LMA       File off  Algn
6
 
7
                  ALLOC
8
  1 .bss          00000274  00800070  00800070  00001182  2**0
9
                  ALLOC
10
  2 .data         00000010  00800060  000010be  00001172  2**0
11
                  CONTENTS, ALLOC, LOAD, DATA
12
  3 .text         000010be  00000000  00000000  000000b4  2**1
13
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
14
  4 .eeprom       00000000  00810000  00810000  00001182  2**0
15
                  CONTENTS
16
  5 .stab         00003ed0  00000000  00000000  00001184  2**2
17
                  CONTENTS, READONLY, DEBUGGING
18
  6 .stabstr      000017c9  00000000  00000000  00005054  2**0
19
                  CONTENTS, READONLY, DEBUGGING
20
Disassembly of section .text:
21
 
22
00000000 <__vectors>:
23
       0:	63 c0       	rjmp	.+198    	; 0xc8 <__init>
24
       2:	05 c8       	rjmp	.-4086   	; 0xfffff00e <__eeprom_end+0xff7ef00e>
25
       4:	05 c8       	rjmp	.-4086   	; 0xfffff010 <__eeprom_end+0xff7ef010>
26
       6:	7a c0       	rjmp	.+244    	; 0xfc <__bad_interrupt>
27
       8:	79 c0       	rjmp	.+242    	; 0xfc <__bad_interrupt>
28
       a:	78 c0       	rjmp	.+240    	; 0xfc <__bad_interrupt>
29
       c:	77 c0       	rjmp	.+238    	; 0xfc <__bad_interrupt>
30
       e:	76 c0       	rjmp	.+236    	; 0xfc <__bad_interrupt>
31
      10:	00 c8       	rjmp	.-4096   	; 0xfffff012 <__eeprom_end+0xff7ef012>
32
      12:	74 c0       	rjmp	.+232    	; 0xfc <__bad_interrupt>
33
      14:	73 c0       	rjmp	.+230    	; 0xfc <__bad_interrupt>
34
      16:	aa c5       	rjmp	.+2900   	; 0xb6c <__vector_11>
35
      18:	71 c0       	rjmp	.+226    	; 0xfc <__bad_interrupt>
36
      1a:	70 c0       	rjmp	.+224    	; 0xfc <__bad_interrupt>
37
      1c:	6f c0       	rjmp	.+222    	; 0xfc <__bad_interrupt>
38
      1e:	6e c0       	rjmp	.+220    	; 0xfc <__bad_interrupt>
39
      20:	6d c0       	rjmp	.+218    	; 0xfc <__bad_interrupt>
40
      22:	0f c6       	rjmp	.+3102   	; 0xc42 <__vector_17>
41
      24:	6b c0       	rjmp	.+214    	; 0xfc <__bad_interrupt>
42
 
43
00000026 <__ctors_end>:
44
      26:	29 c6       	rjmp	.+3154   	; 0xc7a <__vector_17+0x38>
45
      28:	bf c6       	rjmp	.+3454   	; 0xda8 <__vector_17+0x166>
46
      2a:	be c6       	rjmp	.+3452   	; 0xda8 <__vector_17+0x166>
47
      2c:	bd c6       	rjmp	.+3450   	; 0xda8 <__vector_17+0x166>
48
      2e:	bc c6       	rjmp	.+3448   	; 0xda8 <__vector_17+0x166>
49
      30:	bb c6       	rjmp	.+3446   	; 0xda8 <__vector_17+0x166>
50
      32:	ba c6       	rjmp	.+3444   	; 0xda8 <__vector_17+0x166>
51
      34:	b9 c6       	rjmp	.+3442   	; 0xda8 <__vector_17+0x166>
52
      36:	21 c6       	rjmp	.+3138   	; 0xc7a <__vector_17+0x38>
53
      38:	b7 c6       	rjmp	.+3438   	; 0xda8 <__vector_17+0x166>
54
      3a:	b6 c6       	rjmp	.+3436   	; 0xda8 <__vector_17+0x166>
55
      3c:	b5 c6       	rjmp	.+3434   	; 0xda8 <__vector_17+0x166>
56
      3e:	b4 c6       	rjmp	.+3432   	; 0xda8 <__vector_17+0x166>
57
      40:	b3 c6       	rjmp	.+3430   	; 0xda8 <__vector_17+0x166>
58
      42:	b2 c6       	rjmp	.+3428   	; 0xda8 <__vector_17+0x166>
59
      44:	b1 c6       	rjmp	.+3426   	; 0xda8 <__vector_17+0x166>
60
      46:	31 c6       	rjmp	.+3170   	; 0xcaa <__vector_17+0x68>
61
      48:	af c6       	rjmp	.+3422   	; 0xda8 <__vector_17+0x166>
62
      4a:	ae c6       	rjmp	.+3420   	; 0xda8 <__vector_17+0x166>
63
      4c:	ad c6       	rjmp	.+3418   	; 0xda8 <__vector_17+0x166>
64
      4e:	ac c6       	rjmp	.+3416   	; 0xda8 <__vector_17+0x166>
65
      50:	ab c6       	rjmp	.+3414   	; 0xda8 <__vector_17+0x166>
66
      52:	aa c6       	rjmp	.+3412   	; 0xda8 <__vector_17+0x166>
67
      54:	a9 c6       	rjmp	.+3410   	; 0xda8 <__vector_17+0x166>
68
      56:	3a c6       	rjmp	.+3188   	; 0xccc <__vector_17+0x8a>
69
      58:	a7 c6       	rjmp	.+3406   	; 0xda8 <__vector_17+0x166>
70
      5a:	a6 c6       	rjmp	.+3404   	; 0xda8 <__vector_17+0x166>
71
      5c:	a5 c6       	rjmp	.+3402   	; 0xda8 <__vector_17+0x166>
72
      5e:	a4 c6       	rjmp	.+3400   	; 0xda8 <__vector_17+0x166>
73
      60:	a3 c6       	rjmp	.+3398   	; 0xda8 <__vector_17+0x166>
74
      62:	a2 c6       	rjmp	.+3396   	; 0xda8 <__vector_17+0x166>
75
      64:	a1 c6       	rjmp	.+3394   	; 0xda8 <__vector_17+0x166>
76
      66:	3b c6       	rjmp	.+3190   	; 0xcde <__vector_17+0x9c>
77
      68:	9f c6       	rjmp	.+3390   	; 0xda8 <__vector_17+0x166>
78
      6a:	9e c6       	rjmp	.+3388   	; 0xda8 <__vector_17+0x166>
79
      6c:	9d c6       	rjmp	.+3386   	; 0xda8 <__vector_17+0x166>
80
      6e:	9c c6       	rjmp	.+3384   	; 0xda8 <__vector_17+0x166>
81
      70:	9b c6       	rjmp	.+3382   	; 0xda8 <__vector_17+0x166>
82
      72:	9a c6       	rjmp	.+3380   	; 0xda8 <__vector_17+0x166>
83
      74:	99 c6       	rjmp	.+3378   	; 0xda8 <__vector_17+0x166>
84
      76:	54 c6       	rjmp	.+3240   	; 0xd20 <__vector_17+0xde>
85
      78:	97 c6       	rjmp	.+3374   	; 0xda8 <__vector_17+0x166>
86
      7a:	96 c6       	rjmp	.+3372   	; 0xda8 <__vector_17+0x166>
87
      7c:	95 c6       	rjmp	.+3370   	; 0xda8 <__vector_17+0x166>
88
      7e:	94 c6       	rjmp	.+3368   	; 0xda8 <__vector_17+0x166>
89
      80:	93 c6       	rjmp	.+3366   	; 0xda8 <__vector_17+0x166>
90
      82:	92 c6       	rjmp	.+3364   	; 0xda8 <__vector_17+0x166>
91
      84:	91 c6       	rjmp	.+3362   	; 0xda8 <__vector_17+0x166>
92
      86:	90 c6       	rjmp	.+3360   	; 0xda8 <__vector_17+0x166>
93
      88:	8f c6       	rjmp	.+3358   	; 0xda8 <__vector_17+0x166>
94
      8a:	8e c6       	rjmp	.+3356   	; 0xda8 <__vector_17+0x166>
95
      8c:	8d c6       	rjmp	.+3354   	; 0xda8 <__vector_17+0x166>
96
      8e:	8c c6       	rjmp	.+3352   	; 0xda8 <__vector_17+0x166>
97
      90:	8b c6       	rjmp	.+3350   	; 0xda8 <__vector_17+0x166>
98
      92:	8a c6       	rjmp	.+3348   	; 0xda8 <__vector_17+0x166>
99
      94:	89 c6       	rjmp	.+3346   	; 0xda8 <__vector_17+0x166>
100
      96:	4d c6       	rjmp	.+3226   	; 0xd32 <__vector_17+0xf0>
101
      98:	87 c6       	rjmp	.+3342   	; 0xda8 <__vector_17+0x166>
102
      9a:	86 c6       	rjmp	.+3340   	; 0xda8 <__vector_17+0x166>
103
      9c:	85 c6       	rjmp	.+3338   	; 0xda8 <__vector_17+0x166>
104
      9e:	84 c6       	rjmp	.+3336   	; 0xda8 <__vector_17+0x166>
105
      a0:	83 c6       	rjmp	.+3334   	; 0xda8 <__vector_17+0x166>
106
      a2:	82 c6       	rjmp	.+3332   	; 0xda8 <__vector_17+0x166>
107
      a4:	81 c6       	rjmp	.+3330   	; 0xda8 <__vector_17+0x166>
108
      a6:	12 c6       	rjmp	.+3108   	; 0xccc <__vector_17+0x8a>
109
      a8:	7f c6       	rjmp	.+3326   	; 0xda8 <__vector_17+0x166>
110
      aa:	7e c6       	rjmp	.+3324   	; 0xda8 <__vector_17+0x166>
111
      ac:	7d c6       	rjmp	.+3322   	; 0xda8 <__vector_17+0x166>
112
      ae:	7c c6       	rjmp	.+3320   	; 0xda8 <__vector_17+0x166>
113
      b0:	7b c6       	rjmp	.+3318   	; 0xda8 <__vector_17+0x166>
114
      b2:	7a c6       	rjmp	.+3316   	; 0xda8 <__vector_17+0x166>
115
      b4:	79 c6       	rjmp	.+3314   	; 0xda8 <__vector_17+0x166>
116
      b6:	4e c6       	rjmp	.+3228   	; 0xd54 <__vector_17+0x112>
117
      b8:	77 c6       	rjmp	.+3310   	; 0xda8 <__vector_17+0x166>
118
      ba:	76 c6       	rjmp	.+3308   	; 0xda8 <__vector_17+0x166>
119
      bc:	75 c6       	rjmp	.+3306   	; 0xda8 <__vector_17+0x166>
120
      be:	74 c6       	rjmp	.+3304   	; 0xda8 <__vector_17+0x166>
121
      c0:	73 c6       	rjmp	.+3302   	; 0xda8 <__vector_17+0x166>
122
      c2:	72 c6       	rjmp	.+3300   	; 0xda8 <__vector_17+0x166>
123
      c4:	71 c6       	rjmp	.+3298   	; 0xda8 <__vector_17+0x166>
124
      c6:	62 c6       	rjmp	.+3268   	; 0xd8c <__vector_17+0x14a>
125
 
126
000000c8 <__init>:
127
      c8:	11 24       	eor	r1, r1
128
      ca:	1f be       	out	0x3f, r1	; 63
129
      cc:	cf e5       	ldi	r28, 0x5F	; 95
130
      ce:	d4 e0       	ldi	r29, 0x04	; 4
131
      d0:	de bf       	out	0x3e, r29	; 62
132
      d2:	cd bf       	out	0x3d, r28	; 61
133
 
134
000000d4 <__do_copy_data>:
135
      d4:	10 e0       	ldi	r17, 0x00	; 0
136
      d6:	a0 e6       	ldi	r26, 0x60	; 96
137
      d8:	b0 e0       	ldi	r27, 0x00	; 0
138
      da:	ee eb       	ldi	r30, 0xBE	; 190
139
      dc:	f0 e1       	ldi	r31, 0x10	; 16
140
      de:	02 c0       	rjmp	.+4      	; 0xe4 <.do_copy_data_start>
141
 
142
000000e0 <.do_copy_data_loop>:
143
      e0:	05 90       	lpm	r0, Z+
144
      e2:	0d 92       	st	X+, r0
145
 
146
000000e4 <.do_copy_data_start>:
147
      e4:	a0 37       	cpi	r26, 0x70	; 112
148
      e6:	b1 07       	cpc	r27, r17
149
      e8:	d9 f7       	brne	.-10     	; 0xe0 <.do_copy_data_loop>
150
 
151
000000ea <__do_clear_bss>:
152
      ea:	12 e0       	ldi	r17, 0x02	; 2
153
      ec:	a0 e7       	ldi	r26, 0x70	; 112
154
      ee:	b0 e0       	ldi	r27, 0x00	; 0
155
      f0:	01 c0       	rjmp	.+2      	; 0xf4 <.do_clear_bss_start>
156
 
157
000000f2 <.do_clear_bss_loop>:
158
      f2:	1d 92       	st	X+, r1
159
 
160
000000f4 <.do_clear_bss_start>:
161
      f4:	a4 3e       	cpi	r26, 0xE4	; 228
162
      f6:	b1 07       	cpc	r27, r17
163
      f8:	e1 f7       	brne	.-8      	; 0xf2 <.do_clear_bss_loop>
164
      fa:	30 c0       	rjmp	.+96     	; 0x15c <main>
165
 
166
000000fc <__bad_interrupt>:
167
      fc:	91 c7       	rjmp	.+3874   	; 0x1020 <__vector_default>
168
 
169
000000fe <CamInt_resetCam>:
151 kaklik 170
    output the clock signal.  Thus, if we reset the cam, the
171
    AVR has no clock, and thus doesn't run...
172
***********************************************************/	
173
void CamInt_resetCam(void)
174
{
174 kaklik 175
      fe:	08 95       	ret
176
 
177
00000100 <CamInt_init>:
178
     100:	8f 9a       	sbi	0x11, 7	; 17
179
     102:	8f 9a       	sbi	0x11, 7	; 17
180
     104:	8a 98       	cbi	0x11, 2	; 17
181
     106:	97 98       	cbi	0x12, 7	; 18
182
     108:	87 b3       	in	r24, 0x17	; 23
183
     10a:	80 7f       	andi	r24, 0xF0	; 240
184
     10c:	87 bb       	out	0x17, r24	; 23
185
     10e:	87 b3       	in	r24, 0x17	; 23
186
     110:	80 6f       	ori	r24, 0xF0	; 240
187
     112:	87 bb       	out	0x17, r24	; 23
188
     114:	84 b3       	in	r24, 0x14	; 20
189
     116:	80 7f       	andi	r24, 0xF0	; 240
190
     118:	84 bb       	out	0x14, r24	; 20
191
     11a:	8e b5       	in	r24, 0x2e	; 46
192
     11c:	88 7f       	andi	r24, 0xF8	; 248
193
     11e:	8e bd       	out	0x2e, r24	; 46
194
     120:	85 b7       	in	r24, 0x35	; 53
195
     122:	8c 60       	ori	r24, 0x0C	; 12
196
     124:	85 bf       	out	0x35, r24	; 53
197
     126:	85 b7       	in	r24, 0x35	; 53
198
     128:	83 60       	ori	r24, 0x03	; 3
199
     12a:	85 bf       	out	0x35, r24	; 53
200
     12c:	8b b7       	in	r24, 0x3b	; 59
201
     12e:	80 64       	ori	r24, 0x40	; 64
202
     130:	8b bf       	out	0x3b, r24	; 59
203
     132:	86 e0       	ldi	r24, 0x06	; 6
204
     134:	83 bf       	out	0x33, r24	; 51
205
     136:	85 b7       	in	r24, 0x35	; 53
206
     138:	8f 78       	andi	r24, 0x8F	; 143
207
     13a:	85 bf       	out	0x35, r24	; 53
208
     13c:	85 b7       	in	r24, 0x35	; 53
209
     13e:	80 68       	ori	r24, 0x80	; 128
210
     140:	85 bf       	out	0x35, r24	; 53
211
     142:	e0 e0       	ldi	r30, 0x00	; 0
212
     144:	f3 e0       	ldi	r31, 0x03	; 3
213
     146:	80 e3       	ldi	r24, 0x30	; 48
214
     148:	df 01       	movw	r26, r30
215
     14a:	98 2f       	mov	r25, r24
216
     14c:	1d 92       	st	X+, r1
217
     14e:	9a 95       	dec	r25
218
     150:	e9 f7       	brne	.-6      	; 0x14c <CamInt_init+0x4c>
219
              /* Needed in order to truncate to 8 bit.  */
220
              uint8_t len;
221
              len = (uint8_t) n; 
222
 
223
              asm volatile (
224
     152:	a1 e0       	ldi	r26, 0x01	; 1
225
     154:	b0 e0       	ldi	r27, 0x00	; 0
226
     156:	18 2e       	mov	r1, r24
227
     158:	a0 d7       	rcall	.+3904   	; 0x109a <__eeprom_read_block_1C1D1E>
228
     15a:	08 95       	ret
229
 
230
0000015c <main>:
151 kaklik 231
	Inputs:  none
232
	Outputs: int
233
***********************************************************/	
234
int main(void)
235
{
174 kaklik 236
     15c:	cf e5       	ldi	r28, 0x5F	; 95
237
     15e:	d4 e0       	ldi	r29, 0x04	; 4
238
     160:	de bf       	out	0x3e, r29	; 62
239
     162:	cd bf       	out	0x3d, r28	; 61
151 kaklik 240
	/* initialize all of the interface modules */
241
	DebugInt_init();
174 kaklik 242
     164:	cf d6       	rcall	.+3486   	; 0xf04 <DebugInt_init>
151 kaklik 243
	UartInt_init();
174 kaklik 244
     166:	f4 d4       	rcall	.+2536   	; 0xb50 <UartInt_init>
151 kaklik 245
	I2CInt_init();
174 kaklik 246
     168:	2b d5       	rcall	.+2646   	; 0xbc0 <I2CInt_init>
151 kaklik 247
	CamInt_init();
174 kaklik 248
     16a:	ca df       	rcall	.-108    	; 0x100 <CamInt_init>
151 kaklik 249
 
250
	/* initialize the remaining modules that will process
251
	data...interrupts need to be on for these */
252
	ENABLE_INTS();
174 kaklik 253
     16c:	78 94       	sei
151 kaklik 254
	CamConfig_init(); 
174 kaklik 255
     16e:	7e d6       	rcall	.+3324   	; 0xe6c <CamConfig_init>
151 kaklik 256
	UIMgr_init();
174 kaklik 257
     170:	8a d3       	rcall	.+1812   	; 0x886 <UIMgr_init>
151 kaklik 258
	FrameMgr_init();
174 kaklik 259
     172:	37 d2       	rcall	.+1134   	; 0x5e2 <FrameMgr_init>
151 kaklik 260
 
261
	/* provide a short delay for the camera to stabilize before
262
	we let the executive start up */
263
	Utility_delay(1000);
174 kaklik 264
     174:	88 ee       	ldi	r24, 0xE8	; 232
265
     176:	93 e0       	ldi	r25, 0x03	; 3
266
     178:	8a d6       	rcall	.+3348   	; 0xe8e <Utility_delay>
151 kaklik 267
 
268
	/* the rest of the application will be under the
269
	control of the Executive.  */
270
	Exec_run();	
174 kaklik 271
     17a:	11 d0       	rcall	.+34     	; 0x19e <Exec_run>
151 kaklik 272
 
273
	/* this should never be reached */
274
	return(0);
275
}
174 kaklik 276
     17c:	80 e0       	ldi	r24, 0x00	; 0
277
     17e:	90 e0       	ldi	r25, 0x00	; 0
278
     180:	9d c7       	rjmp	.+3898   	; 0x10bc <_exit>
279
 
280
00000182 <Exec_writeEventFifo>:
151 kaklik 281
 
174 kaklik 282
     182:	f8 94       	cli
283
     184:	90 91 70 00 	lds	r25, 0x0070
284
     188:	ec e6       	ldi	r30, 0x6C	; 108
285
     18a:	f2 e0       	ldi	r31, 0x02	; 2
286
     18c:	e9 0f       	add	r30, r25
287
     18e:	f1 1d       	adc	r31, r1
288
     190:	80 83       	st	Z, r24
289
     192:	9f 5f       	subi	r25, 0xFF	; 255
290
     194:	97 70       	andi	r25, 0x07	; 7
291
     196:	90 93 70 00 	sts	0x0070, r25
292
     19a:	78 94       	sei
293
     19c:	08 95       	ret
294
 
295
0000019e <Exec_run>:
296
     19e:	80 91 72 00 	lds	r24, 0x0072
297
     1a2:	88 23       	and	r24, r24
298
     1a4:	99 f0       	breq	.+38     	; 0x1cc <Exec_run+0x2e>
299
     1a6:	80 ff       	sbrs	r24, 0
300
     1a8:	07 c0       	rjmp	.+14     	; 0x1b8 <Exec_run+0x1a>
301
     1aa:	f8 94       	cli
302
     1ac:	8e 7f       	andi	r24, 0xFE	; 254
303
     1ae:	80 93 72 00 	sts	0x0072, r24
304
     1b2:	78 94       	sei
305
     1b4:	b6 d0       	rcall	.+364    	; 0x322 <FrameMgr_processLine>
306
     1b6:	ff d2       	rcall	.+1534   	; 0x7b6 <UIMgr_transmitPendingData>
307
     1b8:	80 91 72 00 	lds	r24, 0x0072
308
     1bc:	81 ff       	sbrs	r24, 1
309
     1be:	06 c0       	rjmp	.+12     	; 0x1cc <Exec_run+0x2e>
310
     1c0:	f8 94       	cli
311
     1c2:	8d 7f       	andi	r24, 0xFD	; 253
312
     1c4:	80 93 72 00 	sts	0x0072, r24
313
     1c8:	78 94       	sei
314
     1ca:	12 d2       	rcall	.+1060   	; 0x5f0 <FrameMgr_acquireLine>
315
     1cc:	20 91 71 00 	lds	r18, 0x0071
316
     1d0:	80 91 70 00 	lds	r24, 0x0070
317
     1d4:	82 17       	cp	r24, r18
318
     1d6:	19 f3       	breq	.-58     	; 0x19e <Exec_run>
319
     1d8:	f8 94       	cli
320
     1da:	e2 2f       	mov	r30, r18
321
     1dc:	ff 27       	eor	r31, r31
322
     1de:	e4 59       	subi	r30, 0x94	; 148
323
     1e0:	fd 4f       	sbci	r31, 0xFD	; 253
324
     1e2:	90 81       	ld	r25, Z
325
     1e4:	82 2f       	mov	r24, r18
326
     1e6:	8f 5f       	subi	r24, 0xFF	; 255
327
     1e8:	87 70       	andi	r24, 0x07	; 7
328
     1ea:	80 93 71 00 	sts	0x0071, r24
329
     1ee:	78 94       	sei
330
     1f0:	89 2f       	mov	r24, r25
331
     1f2:	99 27       	eor	r25, r25
332
     1f4:	80 31       	cpi	r24, 0x10	; 16
333
     1f6:	31 f1       	breq	.+76     	; 0x244 <Exec_run+0xa6>
334
     1f8:	81 31       	cpi	r24, 0x11	; 17
335
     1fa:	68 f4       	brcc	.+26     	; 0x216 <Exec_run+0x78>
336
     1fc:	82 30       	cpi	r24, 0x02	; 2
337
     1fe:	c9 f0       	breq	.+50     	; 0x232 <Exec_run+0x94>
338
     200:	83 30       	cpi	r24, 0x03	; 3
339
     202:	18 f4       	brcc	.+6      	; 0x20a <Exec_run+0x6c>
340
     204:	81 30       	cpi	r24, 0x01	; 1
341
     206:	59 f6       	brne	.-106    	; 0x19e <Exec_run>
342
     208:	2b c0       	rjmp	.+86     	; 0x260 <Exec_run+0xc2>
343
     20a:	84 30       	cpi	r24, 0x04	; 4
344
     20c:	31 f1       	breq	.+76     	; 0x25a <Exec_run+0xbc>
345
     20e:	88 30       	cpi	r24, 0x08	; 8
346
     210:	09 f0       	breq	.+2      	; 0x214 <Exec_run+0x76>
347
     212:	c5 cf       	rjmp	.-118    	; 0x19e <Exec_run>
348
     214:	1f c0       	rjmp	.+62     	; 0x254 <Exec_run+0xb6>
349
     216:	80 38       	cpi	r24, 0x80	; 128
350
     218:	79 f0       	breq	.+30     	; 0x238 <Exec_run+0x9a>
351
     21a:	81 38       	cpi	r24, 0x81	; 129
352
     21c:	20 f4       	brcc	.+8      	; 0x226 <Exec_run+0x88>
353
     21e:	80 32       	cpi	r24, 0x20	; 32
354
     220:	09 f0       	breq	.+2      	; 0x224 <Exec_run+0x86>
355
     222:	bd cf       	rjmp	.-134    	; 0x19e <Exec_run>
356
     224:	14 c0       	rjmp	.+40     	; 0x24e <Exec_run+0xb0>
357
     226:	81 38       	cpi	r24, 0x81	; 129
358
     228:	51 f0       	breq	.+20     	; 0x23e <Exec_run+0xa0>
359
     22a:	80 39       	cpi	r24, 0x90	; 144
360
     22c:	09 f0       	breq	.+2      	; 0x230 <Exec_run+0x92>
361
     22e:	b7 cf       	rjmp	.-146    	; 0x19e <Exec_run>
362
     230:	1c c0       	rjmp	.+56     	; 0x26a <Exec_run+0xcc>
363
     232:	82 e0       	ldi	r24, 0x02	; 2
364
     234:	2e d2       	rcall	.+1116   	; 0x692 <FrameMgr_dispatchEvent>
365
     236:	b3 cf       	rjmp	.-154    	; 0x19e <Exec_run>
366
     238:	80 e8       	ldi	r24, 0x80	; 128
367
     23a:	2b d2       	rcall	.+1110   	; 0x692 <FrameMgr_dispatchEvent>
368
     23c:	b0 cf       	rjmp	.-160    	; 0x19e <Exec_run>
369
     23e:	81 e8       	ldi	r24, 0x81	; 129
370
     240:	28 d2       	rcall	.+1104   	; 0x692 <FrameMgr_dispatchEvent>
371
     242:	ad cf       	rjmp	.-166    	; 0x19e <Exec_run>
372
     244:	80 e1       	ldi	r24, 0x10	; 16
373
     246:	25 d2       	rcall	.+1098   	; 0x692 <FrameMgr_dispatchEvent>
374
     248:	80 e1       	ldi	r24, 0x10	; 16
375
     24a:	75 d4       	rcall	.+2282   	; 0xb36 <UIMgr_dispatchEvent>
376
     24c:	a8 cf       	rjmp	.-176    	; 0x19e <Exec_run>
377
     24e:	80 e2       	ldi	r24, 0x20	; 32
378
     250:	20 d2       	rcall	.+1088   	; 0x692 <FrameMgr_dispatchEvent>
379
     252:	a5 cf       	rjmp	.-182    	; 0x19e <Exec_run>
380
     254:	88 e0       	ldi	r24, 0x08	; 8
381
     256:	1d d2       	rcall	.+1082   	; 0x692 <FrameMgr_dispatchEvent>
382
     258:	a2 cf       	rjmp	.-188    	; 0x19e <Exec_run>
383
     25a:	84 e0       	ldi	r24, 0x04	; 4
384
     25c:	1a d2       	rcall	.+1076   	; 0x692 <FrameMgr_dispatchEvent>
385
     25e:	9f cf       	rjmp	.-194    	; 0x19e <Exec_run>
386
     260:	81 e0       	ldi	r24, 0x01	; 1
387
     262:	69 d4       	rcall	.+2258   	; 0xb36 <UIMgr_dispatchEvent>
388
     264:	81 e0       	ldi	r24, 0x01	; 1
389
     266:	15 d2       	rcall	.+1066   	; 0x692 <FrameMgr_dispatchEvent>
390
     268:	9a cf       	rjmp	.-204    	; 0x19e <Exec_run>
391
     26a:	80 e9       	ldi	r24, 0x90	; 144
392
     26c:	64 d4       	rcall	.+2248   	; 0xb36 <UIMgr_dispatchEvent>
393
     26e:	97 cf       	rjmp	.-210    	; 0x19e <Exec_run>
394
 
395
00000270 <FrameMgr_processFrame>:
396
     270:	df 92       	push	r13
397
     272:	ef 92       	push	r14
398
     274:	ff 92       	push	r15
399
     276:	0f 93       	push	r16
400
     278:	1f 93       	push	r17
401
     27a:	cf 93       	push	r28
402
     27c:	df 93       	push	r29
403
     27e:	20 91 60 00 	lds	r18, 0x0060
404
     282:	30 91 61 00 	lds	r19, 0x0061
405
     286:	80 91 73 00 	lds	r24, 0x0073
406
     28a:	88 23       	and	r24, r24
407
     28c:	09 f4       	brne	.+2      	; 0x290 <FrameMgr_processFrame+0x20>
408
     28e:	3f c0       	rjmp	.+126    	; 0x30e <FrameMgr_processFrame+0x9e>
409
     290:	e9 01       	movw	r28, r18
410
     292:	8a e0       	ldi	r24, 0x0A	; 10
411
     294:	5c d2       	rcall	.+1208   	; 0x74e <UIMgr_writeTxFifo>
412
     296:	80 91 73 00 	lds	r24, 0x0073
413
     29a:	59 d2       	rcall	.+1202   	; 0x74e <UIMgr_writeTxFifo>
414
     29c:	dd 24       	eor	r13, r13
415
     29e:	8f 81       	ldd	r24, Y+7	; 0x07
416
     2a0:	81 30       	cpi	r24, 0x01	; 1
417
     2a2:	69 f5       	brne	.+90     	; 0x2fe <FrameMgr_processFrame+0x8e>
418
     2a4:	88 81       	ld	r24, Y
419
     2a6:	80 38       	cpi	r24, 0x80	; 128
420
     2a8:	e1 f0       	breq	.+56     	; 0x2e2 <FrameMgr_processFrame+0x72>
421
     2aa:	80 34       	cpi	r24, 0x40	; 64
422
     2ac:	11 f4       	brne	.+4      	; 0x2b2 <FrameMgr_processFrame+0x42>
423
     2ae:	81 e0       	ldi	r24, 0x01	; 1
424
     2b0:	19 c0       	rjmp	.+50     	; 0x2e4 <FrameMgr_processFrame+0x74>
425
     2b2:	80 32       	cpi	r24, 0x20	; 32
426
     2b4:	11 f4       	brne	.+4      	; 0x2ba <FrameMgr_processFrame+0x4a>
427
     2b6:	82 e0       	ldi	r24, 0x02	; 2
428
     2b8:	15 c0       	rjmp	.+42     	; 0x2e4 <FrameMgr_processFrame+0x74>
429
     2ba:	80 31       	cpi	r24, 0x10	; 16
430
     2bc:	11 f4       	brne	.+4      	; 0x2c2 <FrameMgr_processFrame+0x52>
431
     2be:	83 e0       	ldi	r24, 0x03	; 3
432
     2c0:	11 c0       	rjmp	.+34     	; 0x2e4 <FrameMgr_processFrame+0x74>
433
     2c2:	88 30       	cpi	r24, 0x08	; 8
434
     2c4:	11 f4       	brne	.+4      	; 0x2ca <FrameMgr_processFrame+0x5a>
435
     2c6:	84 e0       	ldi	r24, 0x04	; 4
436
     2c8:	0d c0       	rjmp	.+26     	; 0x2e4 <FrameMgr_processFrame+0x74>
437
     2ca:	84 30       	cpi	r24, 0x04	; 4
438
     2cc:	11 f4       	brne	.+4      	; 0x2d2 <FrameMgr_processFrame+0x62>
439
     2ce:	85 e0       	ldi	r24, 0x05	; 5
440
     2d0:	09 c0       	rjmp	.+18     	; 0x2e4 <FrameMgr_processFrame+0x74>
441
     2d2:	82 30       	cpi	r24, 0x02	; 2
442
     2d4:	11 f4       	brne	.+4      	; 0x2da <FrameMgr_processFrame+0x6a>
443
     2d6:	86 e0       	ldi	r24, 0x06	; 6
444
     2d8:	05 c0       	rjmp	.+10     	; 0x2e4 <FrameMgr_processFrame+0x74>
445
     2da:	81 30       	cpi	r24, 0x01	; 1
446
     2dc:	11 f4       	brne	.+4      	; 0x2e2 <FrameMgr_processFrame+0x72>
447
     2de:	87 e0       	ldi	r24, 0x07	; 7
448
     2e0:	01 c0       	rjmp	.+2      	; 0x2e4 <FrameMgr_processFrame+0x74>
449
     2e2:	80 e0       	ldi	r24, 0x00	; 0
450
     2e4:	1b 81       	ldd	r17, Y+3	; 0x03
451
     2e6:	0c 81       	ldd	r16, Y+4	; 0x04
452
     2e8:	fd 80       	ldd	r15, Y+5	; 0x05
453
     2ea:	ee 80       	ldd	r14, Y+6	; 0x06
454
     2ec:	30 d2       	rcall	.+1120   	; 0x74e <UIMgr_writeTxFifo>
455
     2ee:	81 2f       	mov	r24, r17
456
     2f0:	2e d2       	rcall	.+1116   	; 0x74e <UIMgr_writeTxFifo>
457
     2f2:	80 2f       	mov	r24, r16
458
     2f4:	2c d2       	rcall	.+1112   	; 0x74e <UIMgr_writeTxFifo>
459
     2f6:	8f 2d       	mov	r24, r15
460
     2f8:	2a d2       	rcall	.+1108   	; 0x74e <UIMgr_writeTxFifo>
461
     2fa:	8e 2d       	mov	r24, r14
462
     2fc:	28 d2       	rcall	.+1104   	; 0x74e <UIMgr_writeTxFifo>
463
     2fe:	d3 94       	inc	r13
464
     300:	88 e0       	ldi	r24, 0x08	; 8
465
     302:	d8 16       	cp	r13, r24
466
     304:	11 f0       	breq	.+4      	; 0x30a <FrameMgr_processFrame+0x9a>
467
     306:	28 96       	adiw	r28, 0x08	; 8
468
     308:	ca cf       	rjmp	.-108    	; 0x29e <FrameMgr_processFrame+0x2e>
469
     30a:	8f ef       	ldi	r24, 0xFF	; 255
470
     30c:	20 d2       	rcall	.+1088   	; 0x74e <UIMgr_writeTxFifo>
471
     30e:	84 e0       	ldi	r24, 0x04	; 4
472
     310:	38 df       	rcall	.-400    	; 0x182 <Exec_writeEventFifo>
473
     312:	df 91       	pop	r29
474
     314:	cf 91       	pop	r28
475
     316:	1f 91       	pop	r17
476
     318:	0f 91       	pop	r16
477
     31a:	ff 90       	pop	r15
478
     31c:	ef 90       	pop	r14
479
     31e:	df 90       	pop	r13
480
     320:	08 95       	ret
481
 
482
00000322 <FrameMgr_processLine>:
483
     322:	2f 92       	push	r2
484
     324:	3f 92       	push	r3
485
     326:	4f 92       	push	r4
486
     328:	5f 92       	push	r5
487
     32a:	6f 92       	push	r6
488
     32c:	7f 92       	push	r7
489
     32e:	8f 92       	push	r8
490
     330:	9f 92       	push	r9
491
     332:	af 92       	push	r10
492
     334:	bf 92       	push	r11
493
     336:	cf 92       	push	r12
494
     338:	df 92       	push	r13
495
     33a:	ef 92       	push	r14
496
     33c:	ff 92       	push	r15
497
     33e:	0f 93       	push	r16
498
     340:	1f 93       	push	r17
499
     342:	cf 93       	push	r28
500
     344:	df 93       	push	r29
501
     346:	cd b7       	in	r28, 0x3d	; 61
502
     348:	de b7       	in	r29, 0x3e	; 62
503
     34a:	21 97       	sbiw	r28, 0x01	; 1
504
     34c:	0f b6       	in	r0, 0x3f	; 63
505
     34e:	f8 94       	cli
506
     350:	de bf       	out	0x3e, r29	; 62
507
     352:	0f be       	out	0x3f, r0	; 63
508
     354:	cd bf       	out	0x3d, r28	; 61
509
     356:	00 91 60 00 	lds	r16, 0x0060
510
     35a:	10 91 61 00 	lds	r17, 0x0061
511
     35e:	80 91 74 00 	lds	r24, 0x0074
512
     362:	82 30       	cpi	r24, 0x02	; 2
513
     364:	09 f0       	breq	.+2      	; 0x368 <FrameMgr_processLine+0x46>
514
     366:	6a c0       	rjmp	.+212    	; 0x43c <FrameMgr_processLine+0x11a>
515
     368:	8b e0       	ldi	r24, 0x0B	; 11
516
     36a:	fc d3       	rcall	.+2040   	; 0xb64 <UartInt_txByte>
517
     36c:	80 91 75 00 	lds	r24, 0x0075
518
     370:	f9 d3       	rcall	.+2034   	; 0xb64 <UartInt_txByte>
519
     372:	0f 2e       	mov	r0, r31
520
     374:	fc eb       	ldi	r31, 0xBC	; 188
521
     376:	cf 2e       	mov	r12, r31
522
     378:	f1 e0       	ldi	r31, 0x01	; 1
523
     37a:	df 2e       	mov	r13, r31
524
     37c:	f0 2d       	mov	r31, r0
525
     37e:	00 e0       	ldi	r16, 0x00	; 0
526
     380:	10 e0       	ldi	r17, 0x00	; 0
527
     382:	0f 2e       	mov	r0, r31
528
     384:	fc e0       	ldi	r31, 0x0C	; 12
529
     386:	ef 2e       	mov	r14, r31
530
     388:	f1 e0       	ldi	r31, 0x01	; 1
531
     38a:	ff 2e       	mov	r15, r31
532
     38c:	f0 2d       	mov	r31, r0
533
     38e:	f6 01       	movw	r30, r12
534
     390:	80 81       	ld	r24, Z
535
     392:	89 83       	std	Y+1, r24	; 0x01
536
     394:	89 81       	ldd	r24, Y+1	; 0x01
537
     396:	8f 70       	andi	r24, 0x0F	; 15
538
     398:	89 83       	std	Y+1, r24	; 0x01
539
     39a:	89 81       	ldd	r24, Y+1	; 0x01
540
     39c:	82 95       	swap	r24
541
     39e:	80 7f       	andi	r24, 0xF0	; 240
542
     3a0:	89 83       	std	Y+1, r24	; 0x01
543
     3a2:	99 81       	ldd	r25, Y+1	; 0x01
544
     3a4:	f7 01       	movw	r30, r14
545
     3a6:	80 81       	ld	r24, Z
546
     3a8:	8f 70       	andi	r24, 0x0F	; 15
547
     3aa:	89 2b       	or	r24, r25
548
     3ac:	89 83       	std	Y+1, r24	; 0x01
549
     3ae:	89 81       	ldd	r24, Y+1	; 0x01
550
     3b0:	d9 d3       	rcall	.+1970   	; 0xb64 <UartInt_txByte>
551
     3b2:	d8 01       	movw	r26, r16
552
     3b4:	11 96       	adiw	r26, 0x01	; 1
553
     3b6:	fd 01       	movw	r30, r26
554
     3b8:	e4 5f       	subi	r30, 0xF4	; 244
555
     3ba:	fe 4f       	sbci	r31, 0xFE	; 254
556
     3bc:	80 81       	ld	r24, Z
557
     3be:	89 83       	std	Y+1, r24	; 0x01
558
     3c0:	89 81       	ldd	r24, Y+1	; 0x01
559
     3c2:	8f 70       	andi	r24, 0x0F	; 15
560
     3c4:	89 83       	std	Y+1, r24	; 0x01
561
     3c6:	89 81       	ldd	r24, Y+1	; 0x01
562
     3c8:	82 95       	swap	r24
563
     3ca:	80 7f       	andi	r24, 0xF0	; 240
564
     3cc:	89 83       	std	Y+1, r24	; 0x01
565
     3ce:	99 81       	ldd	r25, Y+1	; 0x01
566
     3d0:	a4 54       	subi	r26, 0x44	; 68
567
     3d2:	be 4f       	sbci	r27, 0xFE	; 254
568
     3d4:	8c 91       	ld	r24, X
569
     3d6:	8f 70       	andi	r24, 0x0F	; 15
570
     3d8:	89 2b       	or	r24, r25
571
     3da:	89 83       	std	Y+1, r24	; 0x01
572
     3dc:	89 81       	ldd	r24, Y+1	; 0x01
573
     3de:	c2 d3       	rcall	.+1924   	; 0xb64 <UartInt_txByte>
574
     3e0:	82 e0       	ldi	r24, 0x02	; 2
575
     3e2:	90 e0       	ldi	r25, 0x00	; 0
576
     3e4:	c8 0e       	add	r12, r24
577
     3e6:	d9 1e       	adc	r13, r25
578
     3e8:	0e 5f       	subi	r16, 0xFE	; 254
579
     3ea:	1f 4f       	sbci	r17, 0xFF	; 255
580
     3ec:	e8 0e       	add	r14, r24
581
     3ee:	f9 1e       	adc	r15, r25
582
     3f0:	00 3b       	cpi	r16, 0xB0	; 176
583
     3f2:	11 05       	cpc	r17, r1
584
     3f4:	61 f6       	brne	.-104    	; 0x38e <FrameMgr_processLine+0x6c>
585
     3f6:	8f e0       	ldi	r24, 0x0F	; 15
586
     3f8:	b5 d3       	rcall	.+1898   	; 0xb64 <UartInt_txByte>
587
     3fa:	80 91 75 00 	lds	r24, 0x0075
588
     3fe:	8f 5f       	subi	r24, 0xFF	; 255
589
     400:	80 93 75 00 	sts	0x0075, r24
590
     404:	88 34       	cpi	r24, 0x48	; 72
591
     406:	60 f0       	brcs	.+24     	; 0x420 <FrameMgr_processLine+0xfe>
592
     408:	10 92 75 00 	sts	0x0075, r1
593
     40c:	10 92 74 00 	sts	0x0074, r1
594
     410:	89 b7       	in	r24, 0x39	; 57
595
     412:	8b 7f       	andi	r24, 0xFB	; 251
596
     414:	89 bf       	out	0x39, r24	; 57
597
     416:	60 e0       	ldi	r22, 0x00	; 0
598
     418:	81 e1       	ldi	r24, 0x11	; 17
599
     41a:	e9 d4       	rcall	.+2514   	; 0xdee <CamConfig_setCamReg>
600
     41c:	ed d4       	rcall	.+2522   	; 0xdf8 <CamConfig_sendFifoCmds>
601
     41e:	c8 c0       	rjmp	.+400    	; 0x5b0 <__stack+0x151>
602
     420:	80 91 72 00 	lds	r24, 0x0072
603
     424:	82 60       	ori	r24, 0x02	; 2
604
     426:	80 93 72 00 	sts	0x0072, r24
605
     42a:	c2 c0       	rjmp	.+388    	; 0x5b0 <__stack+0x151>
606
     42c:	80 e2       	ldi	r24, 0x20	; 32
607
     42e:	a9 de       	rcall	.-686    	; 0x182 <Exec_writeEventFifo>
608
     430:	89 b7       	in	r24, 0x39	; 57
609
     432:	8b 7f       	andi	r24, 0xFB	; 251
610
     434:	89 bf       	out	0x39, r24	; 57
611
     436:	10 92 76 00 	sts	0x0076, r1
612
     43a:	ba c0       	rjmp	.+372    	; 0x5b0 <__stack+0x151>
613
     43c:	81 30       	cpi	r24, 0x01	; 1
614
     43e:	09 f0       	breq	.+2      	; 0x442 <FrameMgr_processLine+0x120>
615
     440:	b7 c0       	rjmp	.+366    	; 0x5b0 <__stack+0x151>
616
     442:	f0 90 76 00 	lds	r15, 0x0076
617
     446:	cf 2c       	mov	r12, r15
618
     448:	dd 24       	eor	r13, r13
619
     44a:	36 01       	movw	r6, r12
620
     44c:	08 94       	sec
621
     44e:	61 08       	sbc	r6, r1
622
     450:	71 08       	sbc	r7, r1
623
     452:	70 91 73 00 	lds	r23, 0x0073
624
     456:	0f 2e       	mov	r0, r31
625
     458:	fc eb       	ldi	r31, 0xBC	; 188
626
     45a:	2f 2e       	mov	r2, r31
627
     45c:	f1 e0       	ldi	r31, 0x01	; 1
628
     45e:	3f 2e       	mov	r3, r31
629
     460:	f0 2d       	mov	r31, r0
630
     462:	50 e0       	ldi	r21, 0x00	; 0
631
     464:	40 e0       	ldi	r20, 0x00	; 0
632
     466:	61 e0       	ldi	r22, 0x01	; 1
633
     468:	ef 2c       	mov	r14, r15
634
     46a:	e3 94       	inc	r14
635
     46c:	f1 01       	movw	r30, r2
636
     46e:	30 81       	ld	r19, Z
637
     470:	56 0f       	add	r21, r22
638
     472:	61 81       	ldd	r22, Z+1	; 0x01
639
     474:	82 e0       	ldi	r24, 0x02	; 2
640
     476:	90 e0       	ldi	r25, 0x00	; 0
641
     478:	28 0e       	add	r2, r24
642
     47a:	39 1e       	adc	r3, r25
643
     47c:	46 0f       	add	r20, r22
644
     47e:	33 23       	and	r19, r19
645
     480:	09 f4       	brne	.+2      	; 0x484 <__stack+0x25>
646
     482:	5c c0       	rjmp	.+184    	; 0x53c <__stack+0xdd>
647
     484:	64 30       	cpi	r22, 0x04	; 4
648
     486:	08 f4       	brcc	.+2      	; 0x48a <__stack+0x2b>
649
     488:	59 c0       	rjmp	.+178    	; 0x53c <__stack+0xdd>
650
     48a:	d8 01       	movw	r26, r16
651
     48c:	20 e0       	ldi	r18, 0x00	; 0
652
     48e:	8c 91       	ld	r24, X
653
     490:	38 17       	cp	r19, r24
654
     492:	c9 f5       	brne	.+114    	; 0x506 <__stack+0xa7>
655
     494:	fd 01       	movw	r30, r26
656
     496:	87 81       	ldd	r24, Z+7	; 0x07
657
     498:	81 30       	cpi	r24, 0x01	; 1
658
     49a:	a9 f5       	brne	.+106    	; 0x506 <__stack+0xa7>
659
     49c:	0f 2e       	mov	r0, r31
660
     49e:	f6 e0       	ldi	r31, 0x06	; 6
661
     4a0:	af 2e       	mov	r10, r31
662
     4a2:	bb 24       	eor	r11, r11
663
     4a4:	f0 2d       	mov	r31, r0
664
     4a6:	aa 0e       	add	r10, r26
665
     4a8:	bb 1e       	adc	r11, r27
666
     4aa:	86 81       	ldd	r24, Z+6	; 0x06
667
     4ac:	99 27       	eor	r25, r25
668
     4ae:	86 15       	cp	r24, r6
669
     4b0:	97 05       	cpc	r25, r7
670
     4b2:	49 f5       	brne	.+82     	; 0x506 <__stack+0xa7>
671
     4b4:	2d 01       	movw	r4, r26
672
     4b6:	08 94       	sec
673
     4b8:	41 1c       	adc	r4, r1
674
     4ba:	51 1c       	adc	r5, r1
675
     4bc:	81 81       	ldd	r24, Z+1	; 0x01
676
     4be:	88 24       	eor	r8, r8
677
     4c0:	99 24       	eor	r9, r9
678
     4c2:	68 94       	set
679
     4c4:	81 f8       	bld	r8, 1
680
     4c6:	8a 0e       	add	r8, r26
681
     4c8:	9b 1e       	adc	r9, r27
682
     4ca:	92 81       	ldd	r25, Z+2	; 0x02
683
     4cc:	58 17       	cp	r21, r24
684
     4ce:	10 f0       	brcs	.+4      	; 0x4d4 <__stack+0x75>
685
     4d0:	95 17       	cp	r25, r21
686
     4d2:	40 f4       	brcc	.+16     	; 0x4e4 <__stack+0x85>
687
     4d4:	48 17       	cp	r20, r24
688
     4d6:	10 f0       	brcs	.+4      	; 0x4dc <__stack+0x7d>
689
     4d8:	94 17       	cp	r25, r20
690
     4da:	20 f4       	brcc	.+8      	; 0x4e4 <__stack+0x85>
691
     4dc:	85 17       	cp	r24, r21
692
     4de:	98 f0       	brcs	.+38     	; 0x506 <__stack+0xa7>
693
     4e0:	49 17       	cp	r20, r25
694
     4e2:	88 f0       	brcs	.+34     	; 0x506 <__stack+0xa7>
695
     4e4:	f2 01       	movw	r30, r4
696
     4e6:	50 83       	st	Z, r21
697
     4e8:	f4 01       	movw	r30, r8
698
     4ea:	40 83       	st	Z, r20
699
     4ec:	fd 01       	movw	r30, r26
700
     4ee:	83 81       	ldd	r24, Z+3	; 0x03
701
     4f0:	58 17       	cp	r21, r24
702
     4f2:	08 f4       	brcc	.+2      	; 0x4f6 <__stack+0x97>
703
     4f4:	53 83       	std	Z+3, r21	; 0x03
704
     4f6:	fd 01       	movw	r30, r26
705
     4f8:	85 81       	ldd	r24, Z+5	; 0x05
706
     4fa:	84 17       	cp	r24, r20
707
     4fc:	08 f4       	brcc	.+2      	; 0x500 <__stack+0xa1>
708
     4fe:	45 83       	std	Z+5, r20	; 0x05
709
     500:	f5 01       	movw	r30, r10
710
     502:	f0 82       	st	Z, r15
711
     504:	1b c0       	rjmp	.+54     	; 0x53c <__stack+0xdd>
712
     506:	2f 5f       	subi	r18, 0xFF	; 255
713
     508:	28 30       	cpi	r18, 0x08	; 8
714
     50a:	09 f4       	brne	.+2      	; 0x50e <__stack+0xaf>
715
     50c:	4d c0       	rjmp	.+154    	; 0x5a8 <__stack+0x149>
716
     50e:	18 96       	adiw	r26, 0x08	; 8
717
     510:	be cf       	rjmp	.-132    	; 0x48e <__stack+0x2f>
718
     512:	d8 01       	movw	r26, r16
719
     514:	90 e0       	ldi	r25, 0x00	; 0
720
     516:	fd 01       	movw	r30, r26
721
     518:	87 81       	ldd	r24, Z+7	; 0x07
722
     51a:	88 23       	and	r24, r24
723
     51c:	21 f0       	breq	.+8      	; 0x526 <__stack+0xc7>
724
     51e:	18 96       	adiw	r26, 0x08	; 8
725
     520:	9f 5f       	subi	r25, 0xFF	; 255
726
     522:	98 30       	cpi	r25, 0x08	; 8
727
     524:	c1 f7       	brne	.-16     	; 0x516 <__stack+0xb7>
728
     526:	3c 93       	st	X, r19
729
     528:	fd 01       	movw	r30, r26
730
     52a:	51 83       	std	Z+1, r21	; 0x01
731
     52c:	42 83       	std	Z+2, r20	; 0x02
732
     52e:	53 83       	std	Z+3, r21	; 0x03
733
     530:	f4 82       	std	Z+4, r15	; 0x04
734
     532:	45 83       	std	Z+5, r20	; 0x05
735
     534:	f6 82       	std	Z+6, r15	; 0x06
736
     536:	81 e0       	ldi	r24, 0x01	; 1
737
     538:	87 83       	std	Z+7, r24	; 0x07
738
     53a:	7f 5f       	subi	r23, 0xFF	; 255
739
     53c:	40 3b       	cpi	r20, 0xB0	; 176
740
     53e:	08 f4       	brcc	.+2      	; 0x542 <__stack+0xe3>
741
     540:	95 cf       	rjmp	.-214    	; 0x46c <__stack+0xd>
742
     542:	70 93 73 00 	sts	0x0073, r23
743
     546:	c6 01       	movw	r24, r12
744
     548:	87 70       	andi	r24, 0x07	; 7
745
     54a:	90 70       	andi	r25, 0x00	; 0
746
     54c:	07 97       	sbiw	r24, 0x07	; 7
747
     54e:	01 f5       	brne	.+64     	; 0x590 <__stack+0x131>
748
     550:	d8 01       	movw	r26, r16
749
     552:	17 96       	adiw	r26, 0x07	; 7
750
     554:	40 e0       	ldi	r20, 0x00	; 0
751
     556:	8c 91       	ld	r24, X
752
     558:	81 30       	cpi	r24, 0x01	; 1
753
     55a:	a1 f4       	brne	.+40     	; 0x584 <__stack+0x125>
754
     55c:	fd 01       	movw	r30, r26
755
     55e:	31 97       	sbiw	r30, 0x01	; 1
756
     560:	90 81       	ld	r25, Z
757
     562:	fd 01       	movw	r30, r26
758
     564:	33 97       	sbiw	r30, 0x03	; 3
759
     566:	80 81       	ld	r24, Z
760
     568:	29 2f       	mov	r18, r25
761
     56a:	33 27       	eor	r19, r19
762
     56c:	f9 01       	movw	r30, r18
763
     56e:	e8 1b       	sub	r30, r24
764
     570:	f1 09       	sbc	r31, r1
765
     572:	33 97       	sbiw	r30, 0x03	; 3
766
     574:	3c f4       	brge	.+14     	; 0x584 <__stack+0x125>
767
     576:	c6 01       	movw	r24, r12
768
     578:	82 1b       	sub	r24, r18
769
     57a:	93 0b       	sbc	r25, r19
770
     57c:	03 97       	sbiw	r24, 0x03	; 3
771
     57e:	14 f0       	brlt	.+4      	; 0x584 <__stack+0x125>
772
     580:	1c 92       	st	X, r1
773
     582:	71 50       	subi	r23, 0x01	; 1
774
     584:	4f 5f       	subi	r20, 0xFF	; 255
775
     586:	18 96       	adiw	r26, 0x08	; 8
776
     588:	48 30       	cpi	r20, 0x08	; 8
777
     58a:	29 f7       	brne	.-54     	; 0x556 <__stack+0xf7>
778
     58c:	70 93 73 00 	sts	0x0073, r23
779
     590:	e0 92 76 00 	sts	0x0076, r14
780
     594:	f0 e9       	ldi	r31, 0x90	; 144
781
     596:	ef 16       	cp	r14, r31
782
     598:	09 f4       	brne	.+2      	; 0x59c <__stack+0x13d>
783
     59a:	48 cf       	rjmp	.-368    	; 0x42c <FrameMgr_processLine+0x10a>
784
     59c:	80 91 72 00 	lds	r24, 0x0072
785
     5a0:	82 60       	ori	r24, 0x02	; 2
786
     5a2:	80 93 72 00 	sts	0x0072, r24
787
     5a6:	04 c0       	rjmp	.+8      	; 0x5b0 <__stack+0x151>
788
     5a8:	78 30       	cpi	r23, 0x08	; 8
789
     5aa:	08 f4       	brcc	.+2      	; 0x5ae <__stack+0x14f>
790
     5ac:	b2 cf       	rjmp	.-156    	; 0x512 <__stack+0xb3>
791
     5ae:	c6 cf       	rjmp	.-116    	; 0x53c <__stack+0xdd>
792
     5b0:	21 96       	adiw	r28, 0x01	; 1
793
     5b2:	0f b6       	in	r0, 0x3f	; 63
794
     5b4:	f8 94       	cli
795
     5b6:	de bf       	out	0x3e, r29	; 62
796
     5b8:	0f be       	out	0x3f, r0	; 63
797
     5ba:	cd bf       	out	0x3d, r28	; 61
798
     5bc:	df 91       	pop	r29
799
     5be:	cf 91       	pop	r28
800
     5c0:	1f 91       	pop	r17
801
     5c2:	0f 91       	pop	r16
802
     5c4:	ff 90       	pop	r15
803
     5c6:	ef 90       	pop	r14
804
     5c8:	df 90       	pop	r13
805
     5ca:	cf 90       	pop	r12
806
     5cc:	bf 90       	pop	r11
807
     5ce:	af 90       	pop	r10
808
     5d0:	9f 90       	pop	r9
809
     5d2:	8f 90       	pop	r8
810
     5d4:	7f 90       	pop	r7
811
     5d6:	6f 90       	pop	r6
812
     5d8:	5f 90       	pop	r5
813
     5da:	4f 90       	pop	r4
814
     5dc:	3f 90       	pop	r3
815
     5de:	2f 90       	pop	r2
816
     5e0:	08 95       	ret
817
 
818
000005e2 <FrameMgr_init>:
819
     5e2:	80 e4       	ldi	r24, 0x40	; 64
820
     5e4:	e8 e7       	ldi	r30, 0x78	; 120
821
     5e6:	f0 e0       	ldi	r31, 0x00	; 0
822
     5e8:	11 92       	st	Z+, r1
823
     5ea:	8a 95       	dec	r24
824
     5ec:	e9 f7       	brne	.-6      	; 0x5e8 <FrameMgr_init+0x6>
825
     5ee:	08 95       	ret
826
 
827
000005f0 <FrameMgr_acquireLine>:
828
     5f0:	80 91 74 00 	lds	r24, 0x0074
829
     5f4:	82 30       	cpi	r24, 0x02	; 2
830
     5f6:	49 f5       	brne	.+82     	; 0x64a <FrameMgr_acquireLine+0x5a>
831
     5f8:	80 91 75 00 	lds	r24, 0x0075
832
     5fc:	28 2f       	mov	r18, r24
833
     5fe:	22 0f       	add	r18, r18
834
     600:	80 eb       	ldi	r24, 0xB0	; 176
835
     602:	ec eb       	ldi	r30, 0xBC	; 188
836
     604:	f1 e0       	ldi	r31, 0x01	; 1
837
     606:	98 2f       	mov	r25, r24
838
     608:	11 92       	st	Z+, r1
839
     60a:	9a 95       	dec	r25
840
     60c:	e9 f7       	brne	.-6      	; 0x608 <FrameMgr_acquireLine+0x18>
841
     60e:	ec e0       	ldi	r30, 0x0C	; 12
842
     610:	f1 e0       	ldi	r31, 0x01	; 1
843
     612:	11 92       	st	Z+, r1
844
     614:	8a 95       	dec	r24
845
     616:	e9 f7       	brne	.-6      	; 0x612 <FrameMgr_acquireLine+0x22>
846
     618:	82 9b       	sbis	0x10, 2	; 16
847
     61a:	fe cf       	rjmp	.-4      	; 0x618 <FrameMgr_acquireLine+0x28>
848
     61c:	82 9b       	sbis	0x10, 2	; 16
849
     61e:	07 c0       	rjmp	.+14     	; 0x62e <FrameMgr_acquireLine+0x3e>
850
     620:	fd cf       	rjmp	.-6      	; 0x61c <FrameMgr_acquireLine+0x2c>
851
     622:	90 e0       	ldi	r25, 0x00	; 0
852
     624:	84 9b       	sbis	0x10, 4	; 16
853
     626:	fe cf       	rjmp	.-4      	; 0x624 <FrameMgr_acquireLine+0x34>
854
     628:	84 9b       	sbis	0x10, 4	; 16
855
     62a:	04 c0       	rjmp	.+8      	; 0x634 <FrameMgr_acquireLine+0x44>
856
     62c:	fd cf       	rjmp	.-6      	; 0x628 <FrameMgr_acquireLine+0x38>
857
     62e:	22 23       	and	r18, r18
858
     630:	c1 f7       	brne	.-16     	; 0x622 <FrameMgr_acquireLine+0x32>
859
     632:	05 c0       	rjmp	.+10     	; 0x63e <FrameMgr_acquireLine+0x4e>
860
     634:	91 50       	subi	r25, 0x01	; 1
861
     636:	82 2f       	mov	r24, r18
862
     638:	81 95       	neg	r24
863
     63a:	98 17       	cp	r25, r24
864
     63c:	99 f7       	brne	.-26     	; 0x624 <FrameMgr_acquireLine+0x34>
865
     63e:	6c e0       	ldi	r22, 0x0C	; 12
866
     640:	71 e0       	ldi	r23, 0x01	; 1
867
     642:	8c eb       	ldi	r24, 0xBC	; 188
868
     644:	91 e0       	ldi	r25, 0x01	; 1
869
     646:	c3 d4       	rcall	.+2438   	; 0xfce <CamIntAsm_acquireDumpLine>
870
     648:	08 95       	ret
871
     64a:	81 30       	cpi	r24, 0x01	; 1
872
     64c:	39 f4       	brne	.+14     	; 0x65c <FrameMgr_acquireLine+0x6c>
873
     64e:	84 99       	sbic	0x10, 4	; 16
874
     650:	fe cf       	rjmp	.-4      	; 0x64e <FrameMgr_acquireLine+0x5e>
875
     652:	60 e0       	ldi	r22, 0x00	; 0
876
     654:	73 e0       	ldi	r23, 0x03	; 3
877
     656:	8c eb       	ldi	r24, 0xBC	; 188
878
     658:	91 e0       	ldi	r25, 0x01	; 1
879
     65a:	72 d4       	rcall	.+2276   	; 0xf40 <CamIntAsm_acquireTrackingLine>
880
     65c:	08 95       	ret
881
 
882
0000065e <FrameMgr_acquireFrame>:
883
     65e:	80 91 74 00 	lds	r24, 0x0074
884
     662:	81 30       	cpi	r24, 0x01	; 1
885
     664:	a9 f4       	brne	.+42     	; 0x690 <FrameMgr_acquireFrame+0x32>
886
     666:	10 92 76 00 	sts	0x0076, r1
887
     66a:	80 91 73 00 	lds	r24, 0x0073
888
     66e:	80 93 77 00 	sts	0x0077, r24
889
     672:	10 92 73 00 	sts	0x0073, r1
890
     676:	80 e4       	ldi	r24, 0x40	; 64
891
     678:	e8 e7       	ldi	r30, 0x78	; 120
892
     67a:	f0 e0       	ldi	r31, 0x00	; 0
893
     67c:	11 92       	st	Z+, r1
894
     67e:	8a 95       	dec	r24
895
     680:	e9 f7       	brne	.-6      	; 0x67c <FrameMgr_acquireFrame+0x1e>
896
     682:	82 9b       	sbis	0x10, 2	; 16
897
     684:	fe cf       	rjmp	.-4      	; 0x682 <FrameMgr_acquireFrame+0x24>
898
     686:	60 e0       	ldi	r22, 0x00	; 0
899
     688:	73 e0       	ldi	r23, 0x03	; 3
900
     68a:	8c eb       	ldi	r24, 0xBC	; 188
901
     68c:	91 e0       	ldi	r25, 0x01	; 1
902
     68e:	58 d4       	rcall	.+2224   	; 0xf40 <CamIntAsm_acquireTrackingLine>
903
     690:	08 95       	ret
904
 
905
00000692 <FrameMgr_dispatchEvent>:
906
     692:	84 30       	cpi	r24, 0x04	; 4
907
     694:	19 f1       	breq	.+70     	; 0x6dc <FrameMgr_dispatchEvent+0x4a>
908
     696:	85 30       	cpi	r24, 0x05	; 5
909
     698:	28 f4       	brcc	.+10     	; 0x6a4 <FrameMgr_dispatchEvent+0x12>
910
     69a:	81 30       	cpi	r24, 0x01	; 1
911
     69c:	09 f1       	breq	.+66     	; 0x6e0 <FrameMgr_dispatchEvent+0x4e>
912
     69e:	82 30       	cpi	r24, 0x02	; 2
913
     6a0:	41 f5       	brne	.+80     	; 0x6f2 <FrameMgr_dispatchEvent+0x60>
914
     6a2:	07 c0       	rjmp	.+14     	; 0x6b2 <FrameMgr_dispatchEvent+0x20>
915
     6a4:	80 38       	cpi	r24, 0x80	; 128
916
     6a6:	99 f0       	breq	.+38     	; 0x6ce <FrameMgr_dispatchEvent+0x3c>
917
     6a8:	81 38       	cpi	r24, 0x81	; 129
918
     6aa:	09 f1       	breq	.+66     	; 0x6ee <FrameMgr_dispatchEvent+0x5c>
919
     6ac:	80 32       	cpi	r24, 0x20	; 32
920
     6ae:	09 f5       	brne	.+66     	; 0x6f2 <FrameMgr_dispatchEvent+0x60>
921
     6b0:	13 c0       	rjmp	.+38     	; 0x6d8 <FrameMgr_dispatchEvent+0x46>
922
     6b2:	61 e0       	ldi	r22, 0x01	; 1
923
     6b4:	81 e1       	ldi	r24, 0x11	; 17
924
     6b6:	9b d3       	rcall	.+1846   	; 0xdee <CamConfig_setCamReg>
925
     6b8:	9f d3       	rcall	.+1854   	; 0xdf8 <CamConfig_sendFifoCmds>
926
     6ba:	88 ee       	ldi	r24, 0xE8	; 232
927
     6bc:	93 e0       	ldi	r25, 0x03	; 3
928
     6be:	e7 d3       	rcall	.+1998   	; 0xe8e <Utility_delay>
929
     6c0:	10 92 75 00 	sts	0x0075, r1
930
     6c4:	82 e0       	ldi	r24, 0x02	; 2
931
     6c6:	80 93 74 00 	sts	0x0074, r24
932
     6ca:	92 df       	rcall	.-220    	; 0x5f0 <FrameMgr_acquireLine>
933
     6cc:	08 95       	ret
934
     6ce:	81 e0       	ldi	r24, 0x01	; 1
935
     6d0:	80 93 74 00 	sts	0x0074, r24
936
     6d4:	c4 df       	rcall	.-120    	; 0x65e <FrameMgr_acquireFrame>
937
     6d6:	08 95       	ret
938
     6d8:	cb dd       	rcall	.-1130   	; 0x270 <FrameMgr_processFrame>
939
     6da:	08 95       	ret
940
     6dc:	c0 df       	rcall	.-128    	; 0x65e <FrameMgr_acquireFrame>
941
     6de:	08 95       	ret
942
     6e0:	80 91 74 00 	lds	r24, 0x0074
943
     6e4:	88 23       	and	r24, r24
944
     6e6:	29 f0       	breq	.+10     	; 0x6f2 <FrameMgr_dispatchEvent+0x60>
945
     6e8:	84 e0       	ldi	r24, 0x04	; 4
946
     6ea:	4b dd       	rcall	.-1386   	; 0x182 <Exec_writeEventFifo>
947
     6ec:	08 95       	ret
948
     6ee:	10 92 74 00 	sts	0x0074, r1
949
     6f2:	08 95       	ret
950
 
951
000006f4 <UIMgr_writeBufferToTxFifo>:
952
     6f4:	dc 01       	movw	r26, r24
953
     6f6:	86 2f       	mov	r24, r22
954
     6f8:	66 23       	and	r22, r22
955
     6fa:	c9 f0       	breq	.+50     	; 0x72e <UIMgr_writeBufferToTxFifo+0x3a>
956
     6fc:	f8 94       	cli
957
     6fe:	61 50       	subi	r22, 0x01	; 1
958
     700:	6f 3f       	cpi	r22, 0xFF	; 255
959
     702:	a1 f0       	breq	.+40     	; 0x72c <UIMgr_writeBufferToTxFifo+0x38>
960
     704:	26 2f       	mov	r18, r22
961
     706:	44 e9       	ldi	r20, 0x94	; 148
962
     708:	52 e0       	ldi	r21, 0x02	; 2
963
     70a:	86 1b       	sub	r24, r22
964
     70c:	68 2f       	mov	r22, r24
965
     70e:	62 50       	subi	r22, 0x02	; 2
966
     710:	80 91 ba 00 	lds	r24, 0x00BA
967
     714:	fa 01       	movw	r30, r20
968
     716:	e8 0f       	add	r30, r24
969
     718:	f1 1d       	adc	r31, r1
970
     71a:	9d 91       	ld	r25, X+
971
     71c:	90 83       	st	Z, r25
972
     71e:	8f 5f       	subi	r24, 0xFF	; 255
973
     720:	8f 73       	andi	r24, 0x3F	; 63
974
     722:	80 93 ba 00 	sts	0x00BA, r24
975
     726:	21 50       	subi	r18, 0x01	; 1
976
     728:	62 17       	cp	r22, r18
977
     72a:	91 f7       	brne	.-28     	; 0x710 <UIMgr_writeBufferToTxFifo+0x1c>
978
     72c:	78 94       	sei
979
     72e:	08 95       	ret
980
 
981
00000730 <UIMgr_readTxFifo>:
982
     730:	f8 94       	cli
983
     732:	90 91 bb 00 	lds	r25, 0x00BB
984
     736:	e4 e9       	ldi	r30, 0x94	; 148
985
     738:	f2 e0       	ldi	r31, 0x02	; 2
986
     73a:	e9 0f       	add	r30, r25
987
     73c:	f1 1d       	adc	r31, r1
988
     73e:	80 81       	ld	r24, Z
989
     740:	9f 5f       	subi	r25, 0xFF	; 255
990
     742:	9f 73       	andi	r25, 0x3F	; 63
991
     744:	90 93 bb 00 	sts	0x00BB, r25
992
     748:	78 94       	sei
993
     74a:	99 27       	eor	r25, r25
994
     74c:	08 95       	ret
995
 
996
0000074e <UIMgr_writeTxFifo>:
997
     74e:	f8 94       	cli
998
     750:	90 91 ba 00 	lds	r25, 0x00BA
999
     754:	e4 e9       	ldi	r30, 0x94	; 148
1000
     756:	f2 e0       	ldi	r31, 0x02	; 2
1001
     758:	e9 0f       	add	r30, r25
1002
     75a:	f1 1d       	adc	r31, r1
1003
     75c:	80 83       	st	Z, r24
1004
     75e:	9f 5f       	subi	r25, 0xFF	; 255
1005
     760:	9f 73       	andi	r25, 0x3F	; 63
1006
     762:	90 93 ba 00 	sts	0x00BA, r25
1007
     766:	78 94       	sei
1008
     768:	08 95       	ret
1009
 
1010
0000076a <UIMgr_flushTxBuffer>:
1011
     76a:	90 91 ba 00 	lds	r25, 0x00BA
1012
     76e:	80 91 bb 00 	lds	r24, 0x00BB
1013
     772:	98 17       	cp	r25, r24
1014
     774:	41 f0       	breq	.+16     	; 0x786 <UIMgr_flushTxBuffer+0x1c>
1015
     776:	dc df       	rcall	.-72     	; 0x730 <UIMgr_readTxFifo>
1016
     778:	f5 d1       	rcall	.+1002   	; 0xb64 <UartInt_txByte>
1017
     77a:	90 91 ba 00 	lds	r25, 0x00BA
1018
     77e:	80 91 bb 00 	lds	r24, 0x00BB
1019
     782:	98 17       	cp	r25, r24
1020
     784:	c1 f7       	brne	.-16     	; 0x776 <UIMgr_flushTxBuffer+0xc>
1021
     786:	08 95       	ret
1022
 
1023
00000788 <UIMgr_txBuffer>:
1024
     788:	0f 93       	push	r16
1025
     78a:	1f 93       	push	r17
1026
     78c:	cf 93       	push	r28
1027
     78e:	df 93       	push	r29
1028
     790:	ec 01       	movw	r28, r24
1029
     792:	86 2f       	mov	r24, r22
1030
     794:	61 50       	subi	r22, 0x01	; 1
1031
     796:	6f 3f       	cpi	r22, 0xFF	; 255
1032
     798:	49 f0       	breq	.+18     	; 0x7ac <UIMgr_txBuffer+0x24>
1033
     79a:	16 2f       	mov	r17, r22
1034
     79c:	86 1b       	sub	r24, r22
1035
     79e:	08 2f       	mov	r16, r24
1036
     7a0:	02 50       	subi	r16, 0x02	; 2
1037
     7a2:	89 91       	ld	r24, Y+
1038
     7a4:	df d1       	rcall	.+958    	; 0xb64 <UartInt_txByte>
1039
     7a6:	11 50       	subi	r17, 0x01	; 1
1040
     7a8:	01 17       	cp	r16, r17
1041
     7aa:	d9 f7       	brne	.-10     	; 0x7a2 <UIMgr_txBuffer+0x1a>
1042
     7ac:	df 91       	pop	r29
1043
     7ae:	cf 91       	pop	r28
1044
     7b0:	1f 91       	pop	r17
1045
     7b2:	0f 91       	pop	r16
1046
     7b4:	08 95       	ret
1047
 
1048
000007b6 <UIMgr_transmitPendingData>:
1049
     7b6:	90 91 ba 00 	lds	r25, 0x00BA
1050
     7ba:	80 91 bb 00 	lds	r24, 0x00BB
1051
     7be:	98 17       	cp	r25, r24
1052
     7c0:	11 f0       	breq	.+4      	; 0x7c6 <UIMgr_transmitPendingData+0x10>
1053
     7c2:	b6 df       	rcall	.-148    	; 0x730 <UIMgr_readTxFifo>
1054
     7c4:	cf d1       	rcall	.+926    	; 0xb64 <UartInt_txByte>
1055
     7c6:	08 95       	ret
1056
 
1057
000007c8 <UIMgr_convertTokenToCmd>:
1058
     7c8:	90 91 bf 00 	lds	r25, 0x00BF
1059
     7cc:	90 35       	cpi	r25, 0x50	; 80
1060
     7ce:	41 f4       	brne	.+16     	; 0x7e0 <UIMgr_convertTokenToCmd+0x18>
1061
     7d0:	80 91 c0 00 	lds	r24, 0x00C0
1062
     7d4:	87 34       	cpi	r24, 0x47	; 71
1063
     7d6:	09 f5       	brne	.+66     	; 0x81a <UIMgr_convertTokenToCmd+0x52>
1064
     7d8:	81 e0       	ldi	r24, 0x01	; 1
1065
     7da:	80 93 62 00 	sts	0x0062, r24
1066
     7de:	48 c0       	rjmp	.+144    	; 0x870 <UIMgr_convertTokenToCmd+0xa8>
1067
     7e0:	97 34       	cpi	r25, 0x47	; 71
1068
     7e2:	39 f4       	brne	.+14     	; 0x7f2 <UIMgr_convertTokenToCmd+0x2a>
1069
     7e4:	80 91 c0 00 	lds	r24, 0x00C0
1070
     7e8:	86 35       	cpi	r24, 0x56	; 86
1071
     7ea:	09 f5       	brne	.+66     	; 0x82e <UIMgr_convertTokenToCmd+0x66>
1072
     7ec:	10 92 62 00 	sts	0x0062, r1
1073
     7f0:	3f c0       	rjmp	.+126    	; 0x870 <UIMgr_convertTokenToCmd+0xa8>
1074
     7f2:	94 34       	cpi	r25, 0x44	; 68
1075
     7f4:	41 f4       	brne	.+16     	; 0x806 <UIMgr_convertTokenToCmd+0x3e>
1076
     7f6:	80 91 c0 00 	lds	r24, 0x00C0
1077
     7fa:	86 34       	cpi	r24, 0x46	; 70
1078
     7fc:	11 f5       	brne	.+68     	; 0x842 <UIMgr_convertTokenToCmd+0x7a>
1079
     7fe:	83 e0       	ldi	r24, 0x03	; 3
1080
     800:	80 93 62 00 	sts	0x0062, r24
1081
     804:	35 c0       	rjmp	.+106    	; 0x870 <UIMgr_convertTokenToCmd+0xa8>
1082
     806:	93 34       	cpi	r25, 0x43	; 67
1083
     808:	41 f4       	brne	.+16     	; 0x81a <UIMgr_convertTokenToCmd+0x52>
1084
     80a:	80 91 c0 00 	lds	r24, 0x00C0
1085
     80e:	82 35       	cpi	r24, 0x52	; 82
1086
     810:	11 f5       	brne	.+68     	; 0x856 <UIMgr_convertTokenToCmd+0x8e>
1087
     812:	82 e0       	ldi	r24, 0x02	; 2
1088
     814:	80 93 62 00 	sts	0x0062, r24
1089
     818:	2b c0       	rjmp	.+86     	; 0x870 <UIMgr_convertTokenToCmd+0xa8>
1090
     81a:	95 34       	cpi	r25, 0x45	; 69
1091
     81c:	41 f4       	brne	.+16     	; 0x82e <UIMgr_convertTokenToCmd+0x66>
1092
     81e:	80 91 c0 00 	lds	r24, 0x00C0
1093
     822:	84 35       	cpi	r24, 0x54	; 84
1094
     824:	11 f5       	brne	.+68     	; 0x86a <UIMgr_convertTokenToCmd+0xa2>
1095
     826:	84 e0       	ldi	r24, 0x04	; 4
1096
     828:	80 93 62 00 	sts	0x0062, r24
1097
     82c:	21 c0       	rjmp	.+66     	; 0x870 <UIMgr_convertTokenToCmd+0xa8>
1098
     82e:	93 35       	cpi	r25, 0x53	; 83
1099
     830:	41 f4       	brne	.+16     	; 0x842 <UIMgr_convertTokenToCmd+0x7a>
1100
     832:	80 91 c0 00 	lds	r24, 0x00C0
1101
     836:	8d 34       	cpi	r24, 0x4D	; 77
1102
     838:	c1 f4       	brne	.+48     	; 0x86a <UIMgr_convertTokenToCmd+0xa2>
1103
     83a:	86 e0       	ldi	r24, 0x06	; 6
1104
     83c:	80 93 62 00 	sts	0x0062, r24
1105
     840:	17 c0       	rjmp	.+46     	; 0x870 <UIMgr_convertTokenToCmd+0xa8>
1106
     842:	94 34       	cpi	r25, 0x44	; 68
1107
     844:	41 f4       	brne	.+16     	; 0x856 <UIMgr_convertTokenToCmd+0x8e>
1108
     846:	80 91 c0 00 	lds	r24, 0x00C0
1109
     84a:	84 35       	cpi	r24, 0x54	; 84
1110
     84c:	71 f4       	brne	.+28     	; 0x86a <UIMgr_convertTokenToCmd+0xa2>
1111
     84e:	85 e0       	ldi	r24, 0x05	; 5
1112
     850:	80 93 62 00 	sts	0x0062, r24
1113
     854:	0d c0       	rjmp	.+26     	; 0x870 <UIMgr_convertTokenToCmd+0xa8>
1114
     856:	92 35       	cpi	r25, 0x52	; 82
1115
     858:	41 f4       	brne	.+16     	; 0x86a <UIMgr_convertTokenToCmd+0xa2>
1116
     85a:	80 91 c0 00 	lds	r24, 0x00C0
1117
     85e:	83 35       	cpi	r24, 0x53	; 83
1118
     860:	21 f4       	brne	.+8      	; 0x86a <UIMgr_convertTokenToCmd+0xa2>
1119
     862:	87 e0       	ldi	r24, 0x07	; 7
1120
     864:	80 93 62 00 	sts	0x0062, r24
1121
     868:	03 c0       	rjmp	.+6      	; 0x870 <UIMgr_convertTokenToCmd+0xa8>
1122
     86a:	89 e0       	ldi	r24, 0x09	; 9
1123
     86c:	80 93 62 00 	sts	0x0062, r24
1124
     870:	83 e0       	ldi	r24, 0x03	; 3
1125
     872:	ef eb       	ldi	r30, 0xBF	; 191
1126
     874:	f0 e0       	ldi	r31, 0x00	; 0
1127
     876:	11 92       	st	Z+, r1
1128
     878:	8a 95       	dec	r24
1129
     87a:	e9 f7       	brne	.-6      	; 0x876 <UIMgr_convertTokenToCmd+0xae>
1130
     87c:	10 92 be 00 	sts	0x00BE, r1
1131
     880:	10 92 bd 00 	sts	0x00BD, r1
1132
     884:	08 95       	ret
1133
 
1134
00000886 <UIMgr_init>:
1135
     886:	10 92 bf 00 	sts	0x00BF, r1
1136
     88a:	10 92 c0 00 	sts	0x00C0, r1
1137
     88e:	10 92 c1 00 	sts	0x00C1, r1
1138
     892:	10 92 c2 00 	sts	0x00C2, r1
1139
     896:	80 e4       	ldi	r24, 0x40	; 64
1140
     898:	e3 ec       	ldi	r30, 0xC3	; 195
1141
     89a:	f0 e0       	ldi	r31, 0x00	; 0
1142
     89c:	98 2f       	mov	r25, r24
1143
     89e:	11 92       	st	Z+, r1
1144
     8a0:	9a 95       	dec	r25
1145
     8a2:	e9 f7       	brne	.-6      	; 0x89e <UIMgr_init+0x18>
1146
     8a4:	e4 e9       	ldi	r30, 0x94	; 148
1147
     8a6:	f2 e0       	ldi	r31, 0x02	; 2
1148
     8a8:	11 92       	st	Z+, r1
1149
     8aa:	8a 95       	dec	r24
1150
     8ac:	e9 f7       	brne	.-6      	; 0x8a8 <UIMgr_init+0x22>
1151
     8ae:	80 e2       	ldi	r24, 0x20	; 32
1152
     8b0:	e4 e7       	ldi	r30, 0x74	; 116
1153
     8b2:	f2 e0       	ldi	r31, 0x02	; 2
1154
     8b4:	11 92       	st	Z+, r1
1155
     8b6:	8a 95       	dec	r24
1156
     8b8:	e9 f7       	brne	.-6      	; 0x8b4 <UIMgr_init+0x2e>
1157
     8ba:	08 95       	ret
1158
 
1159
000008bc <UIMgr_convertTokenToValue>:
1160
     8bc:	8f eb       	ldi	r24, 0xBF	; 191
1161
     8be:	90 e0       	ldi	r25, 0x00	; 0
1162
     8c0:	b0 d3       	rcall	.+1888   	; 0x1022 <atoi>
1163
     8c2:	9c 01       	movw	r18, r24
1164
     8c4:	8f 3f       	cpi	r24, 0xFF	; 255
1165
     8c6:	91 05       	cpc	r25, r1
1166
     8c8:	69 f0       	breq	.+26     	; 0x8e4 <UIMgr_convertTokenToValue+0x28>
1167
     8ca:	60 f0       	brcs	.+24     	; 0x8e4 <UIMgr_convertTokenToValue+0x28>
1168
     8cc:	89 e0       	ldi	r24, 0x09	; 9
1169
     8ce:	80 93 62 00 	sts	0x0062, r24
1170
     8d2:	80 91 bc 00 	lds	r24, 0x00BC
1171
     8d6:	e3 ec       	ldi	r30, 0xC3	; 195
1172
     8d8:	f0 e0       	ldi	r31, 0x00	; 0
1173
     8da:	e8 0f       	add	r30, r24
1174
     8dc:	f1 1d       	adc	r31, r1
1175
     8de:	8f ef       	ldi	r24, 0xFF	; 255
1176
     8e0:	80 83       	st	Z, r24
1177
     8e2:	07 c0       	rjmp	.+14     	; 0x8f2 <UIMgr_convertTokenToValue+0x36>
1178
     8e4:	80 91 bc 00 	lds	r24, 0x00BC
1179
     8e8:	e3 ec       	ldi	r30, 0xC3	; 195
1180
     8ea:	f0 e0       	ldi	r31, 0x00	; 0
1181
     8ec:	e8 0f       	add	r30, r24
1182
     8ee:	f1 1d       	adc	r31, r1
1183
     8f0:	20 83       	st	Z, r18
1184
     8f2:	83 e0       	ldi	r24, 0x03	; 3
1185
     8f4:	ef eb       	ldi	r30, 0xBF	; 191
1186
     8f6:	f0 e0       	ldi	r31, 0x00	; 0
1187
     8f8:	11 92       	st	Z+, r1
1188
     8fa:	8a 95       	dec	r24
1189
     8fc:	e9 f7       	brne	.-6      	; 0x8f8 <UIMgr_convertTokenToValue+0x3c>
1190
     8fe:	10 92 be 00 	sts	0x00BE, r1
1191
     902:	10 92 bd 00 	sts	0x00BD, r1
1192
     906:	08 95       	ret
1193
 
1194
00000908 <UIMgr_processReceivedData>:
1195
     908:	ff 92       	push	r15
1196
     90a:	0f 93       	push	r16
1197
     90c:	1f 93       	push	r17
1198
     90e:	cf 93       	push	r28
1199
     910:	df 93       	push	r29
1200
     912:	0f 2e       	mov	r0, r31
1201
     914:	f9 e0       	ldi	r31, 0x09	; 9
1202
     916:	ff 2e       	mov	r15, r31
1203
     918:	f0 2d       	mov	r31, r0
1204
     91a:	ff c0       	rjmp	.+510    	; 0xb1a <UIMgr_processReceivedData+0x212>
1205
     91c:	f8 94       	cli
1206
     91e:	e2 2f       	mov	r30, r18
1207
     920:	ff 27       	eor	r31, r31
1208
     922:	ec 58       	subi	r30, 0x8C	; 140
1209
     924:	fd 4f       	sbci	r31, 0xFD	; 253
1210
     926:	90 81       	ld	r25, Z
1211
     928:	82 2f       	mov	r24, r18
1212
     92a:	8f 5f       	subi	r24, 0xFF	; 255
1213
     92c:	8f 71       	andi	r24, 0x1F	; 31
1214
     92e:	80 93 b9 00 	sts	0x00B9, r24
1215
     932:	78 94       	sei
1216
     934:	9d 30       	cpi	r25, 0x0D	; 13
1217
     936:	09 f0       	breq	.+2      	; 0x93a <UIMgr_processReceivedData+0x32>
1218
     938:	b1 c0       	rjmp	.+354    	; 0xa9c <UIMgr_processReceivedData+0x194>
1219
     93a:	80 91 bc 00 	lds	r24, 0x00BC
1220
     93e:	88 23       	and	r24, r24
1221
     940:	11 f4       	brne	.+4      	; 0x946 <UIMgr_processReceivedData+0x3e>
1222
     942:	42 df       	rcall	.-380    	; 0x7c8 <UIMgr_convertTokenToCmd>
1223
     944:	06 c0       	rjmp	.+12     	; 0x952 <UIMgr_processReceivedData+0x4a>
1224
     946:	ba df       	rcall	.-140    	; 0x8bc <UIMgr_convertTokenToValue>
1225
     948:	80 91 bc 00 	lds	r24, 0x00BC
1226
     94c:	8f 5f       	subi	r24, 0xFF	; 255
1227
     94e:	80 93 bc 00 	sts	0x00BC, r24
1228
     952:	84 e6       	ldi	r24, 0x64	; 100
1229
     954:	90 e0       	ldi	r25, 0x00	; 0
1230
     956:	9b d2       	rcall	.+1334   	; 0xe8e <Utility_delay>
1231
     958:	80 91 62 00 	lds	r24, 0x0062
1232
     95c:	88 50       	subi	r24, 0x08	; 8
1233
     95e:	82 30       	cpi	r24, 0x02	; 2
1234
     960:	58 f4       	brcc	.+22     	; 0x978 <UIMgr_processReceivedData+0x70>
1235
     962:	8e e4       	ldi	r24, 0x4E	; 78
1236
     964:	f4 de       	rcall	.-536    	; 0x74e <UIMgr_writeTxFifo>
1237
     966:	83 e4       	ldi	r24, 0x43	; 67
1238
     968:	f2 de       	rcall	.-540    	; 0x74e <UIMgr_writeTxFifo>
1239
     96a:	8b e4       	ldi	r24, 0x4B	; 75
1240
     96c:	f0 de       	rcall	.-544    	; 0x74e <UIMgr_writeTxFifo>
1241
     96e:	8d e0       	ldi	r24, 0x0D	; 13
1242
     970:	ee de       	rcall	.-548    	; 0x74e <UIMgr_writeTxFifo>
1243
     972:	80 e9       	ldi	r24, 0x90	; 144
1244
     974:	06 dc       	rcall	.-2036   	; 0x182 <Exec_writeEventFifo>
1245
     976:	89 c0       	rjmp	.+274    	; 0xa8a <UIMgr_processReceivedData+0x182>
1246
     978:	81 e4       	ldi	r24, 0x41	; 65
1247
     97a:	e9 de       	rcall	.-558    	; 0x74e <UIMgr_writeTxFifo>
1248
     97c:	83 e4       	ldi	r24, 0x43	; 67
1249
     97e:	e7 de       	rcall	.-562    	; 0x74e <UIMgr_writeTxFifo>
1250
     980:	8b e4       	ldi	r24, 0x4B	; 75
1251
     982:	e5 de       	rcall	.-566    	; 0x74e <UIMgr_writeTxFifo>
1252
     984:	8d e0       	ldi	r24, 0x0D	; 13
1253
     986:	e3 de       	rcall	.-570    	; 0x74e <UIMgr_writeTxFifo>
1254
     988:	80 e9       	ldi	r24, 0x90	; 144
1255
     98a:	fb db       	rcall	.-2058   	; 0x182 <Exec_writeEventFifo>
1256
     98c:	80 91 62 00 	lds	r24, 0x0062
1257
     990:	81 30       	cpi	r24, 0x01	; 1
1258
     992:	09 f4       	brne	.+2      	; 0x996 <UIMgr_processReceivedData+0x8e>
1259
     994:	7a c0       	rjmp	.+244    	; 0xa8a <UIMgr_processReceivedData+0x182>
1260
     996:	88 23       	and	r24, r24
1261
     998:	71 f4       	brne	.+28     	; 0x9b6 <UIMgr_processReceivedData+0xae>
1262
     99a:	80 91 63 00 	lds	r24, 0x0063
1263
     99e:	88 23       	and	r24, r24
1264
     9a0:	09 f4       	brne	.+2      	; 0x9a4 <UIMgr_processReceivedData+0x9c>
1265
     9a2:	73 c0       	rjmp	.+230    	; 0xa8a <UIMgr_processReceivedData+0x182>
1266
     9a4:	c3 e6       	ldi	r28, 0x63	; 99
1267
     9a6:	d0 e0       	ldi	r29, 0x00	; 0
1268
     9a8:	21 96       	adiw	r28, 0x01	; 1
1269
     9aa:	d1 de       	rcall	.-606    	; 0x74e <UIMgr_writeTxFifo>
1270
     9ac:	88 81       	ld	r24, Y
1271
     9ae:	88 23       	and	r24, r24
1272
     9b0:	09 f4       	brne	.+2      	; 0x9b4 <UIMgr_processReceivedData+0xac>
1273
     9b2:	6b c0       	rjmp	.+214    	; 0xa8a <UIMgr_processReceivedData+0x182>
1274
     9b4:	f9 cf       	rjmp	.-14     	; 0x9a8 <UIMgr_processReceivedData+0xa0>
1275
     9b6:	87 30       	cpi	r24, 0x07	; 7
1276
     9b8:	11 f4       	brne	.+4      	; 0x9be <UIMgr_processReceivedData+0xb6>
1277
     9ba:	a1 db       	rcall	.-2238   	; 0xfe <CamInt_resetCam>
1278
     9bc:	66 c0       	rjmp	.+204    	; 0xa8a <UIMgr_processReceivedData+0x182>
1279
     9be:	83 30       	cpi	r24, 0x03	; 3
1280
     9c0:	31 f4       	brne	.+12     	; 0x9ce <UIMgr_processReceivedData+0xc6>
1281
     9c2:	84 e6       	ldi	r24, 0x64	; 100
1282
     9c4:	90 e0       	ldi	r25, 0x00	; 0
1283
     9c6:	63 d2       	rcall	.+1222   	; 0xe8e <Utility_delay>
1284
     9c8:	82 e0       	ldi	r24, 0x02	; 2
1285
     9ca:	db db       	rcall	.-2122   	; 0x182 <Exec_writeEventFifo>
1286
     9cc:	5e c0       	rjmp	.+188    	; 0xa8a <UIMgr_processReceivedData+0x182>
1287
     9ce:	82 30       	cpi	r24, 0x02	; 2
1288
     9d0:	99 f4       	brne	.+38     	; 0x9f8 <UIMgr_processReceivedData+0xf0>
1289
     9d2:	80 91 bc 00 	lds	r24, 0x00BC
1290
     9d6:	82 30       	cpi	r24, 0x02	; 2
1291
     9d8:	68 f0       	brcs	.+26     	; 0x9f4 <UIMgr_processReceivedData+0xec>
1292
     9da:	11 e0       	ldi	r17, 0x01	; 1
1293
     9dc:	e1 2f       	mov	r30, r17
1294
     9de:	ff 27       	eor	r31, r31
1295
     9e0:	ed 53       	subi	r30, 0x3D	; 61
1296
     9e2:	ff 4f       	sbci	r31, 0xFF	; 255
1297
     9e4:	61 81       	ldd	r22, Z+1	; 0x01
1298
     9e6:	80 81       	ld	r24, Z
1299
     9e8:	02 d2       	rcall	.+1028   	; 0xdee <CamConfig_setCamReg>
1300
     9ea:	1e 5f       	subi	r17, 0xFE	; 254
1301
     9ec:	80 91 bc 00 	lds	r24, 0x00BC
1302
     9f0:	18 17       	cp	r17, r24
1303
     9f2:	a0 f3       	brcs	.-24     	; 0x9dc <UIMgr_processReceivedData+0xd4>
1304
     9f4:	01 d2       	rcall	.+1026   	; 0xdf8 <CamConfig_sendFifoCmds>
1305
     9f6:	49 c0       	rjmp	.+146    	; 0xa8a <UIMgr_processReceivedData+0x182>
1306
     9f8:	84 30       	cpi	r24, 0x04	; 4
1307
     9fa:	31 f4       	brne	.+12     	; 0xa08 <UIMgr_processReceivedData+0x100>
1308
     9fc:	84 e6       	ldi	r24, 0x64	; 100
1309
     9fe:	90 e0       	ldi	r25, 0x00	; 0
1310
     a00:	46 d2       	rcall	.+1164   	; 0xe8e <Utility_delay>
1311
     a02:	80 e8       	ldi	r24, 0x80	; 128
1312
     a04:	be db       	rcall	.-2180   	; 0x182 <Exec_writeEventFifo>
1313
     a06:	41 c0       	rjmp	.+130    	; 0xa8a <UIMgr_processReceivedData+0x182>
1314
     a08:	85 30       	cpi	r24, 0x05	; 5
1315
     a0a:	19 f4       	brne	.+6      	; 0xa12 <UIMgr_processReceivedData+0x10a>
1316
     a0c:	81 e8       	ldi	r24, 0x81	; 129
1317
     a0e:	b9 db       	rcall	.-2190   	; 0x182 <Exec_writeEventFifo>
1318
     a10:	3c c0       	rjmp	.+120    	; 0xa8a <UIMgr_processReceivedData+0x182>
1319
     a12:	86 30       	cpi	r24, 0x06	; 6
1320
     a14:	09 f0       	breq	.+2      	; 0xa18 <UIMgr_processReceivedData+0x110>
1321
     a16:	39 c0       	rjmp	.+114    	; 0xa8a <UIMgr_processReceivedData+0x182>
1322
     a18:	80 91 bc 00 	lds	r24, 0x00BC
1323
     a1c:	88 23       	and	r24, r24
1324
     a1e:	09 f4       	brne	.+2      	; 0xa22 <UIMgr_processReceivedData+0x11a>
1325
     a20:	34 c0       	rjmp	.+104    	; 0xa8a <UIMgr_processReceivedData+0x182>
1326
     a22:	40 e0       	ldi	r20, 0x00	; 0
1327
     a24:	03 ec       	ldi	r16, 0xC3	; 195
1328
     a26:	10 e0       	ldi	r17, 0x00	; 0
1329
     a28:	60 e0       	ldi	r22, 0x00	; 0
1330
     a2a:	73 e0       	ldi	r23, 0x03	; 3
1331
     a2c:	84 2f       	mov	r24, r20
1332
     a2e:	99 27       	eor	r25, r25
1333
     a30:	9c 01       	movw	r18, r24
1334
     a32:	2f 5f       	subi	r18, 0xFF	; 255
1335
     a34:	3f 4f       	sbci	r19, 0xFF	; 255
1336
     a36:	f9 01       	movw	r30, r18
1337
     a38:	e0 0f       	add	r30, r16
1338
     a3a:	f1 1f       	adc	r31, r17
1339
     a3c:	e0 81       	ld	r30, Z
1340
     a3e:	ec 01       	movw	r28, r24
1341
     a40:	c6 0f       	add	r28, r22
1342
     a42:	d7 1f       	adc	r29, r23
1343
     a44:	e8 83       	st	Y, r30
1344
uint8_t 
1345
eeprom_read_byte (const uint8_t *addr) 
1346
{
1347
  uint8_t result;
1348
  asm volatile
1349
     a46:	d9 01       	movw	r26, r18
1350
     a48:	20 d3       	rcall	.+1600   	; 0x108a <__eeprom_read_byte_1C1D1E>
1351
     a4a:	80 2d       	mov	r24, r0
1352
static unsigned char tokenBuffer[MAX_TOKEN_COUNT];
1353
static UIMgr_Cmd_t receivedCmd = noCmd;
1354
static unsigned char AVRcamVersion[] = "AVRcam v1.4\r";
151 kaklik 1355
 
174 kaklik 1356
/*  Local Function Declaration */
1357
static unsigned char UIMgr_readRxFifo(void);
1358
static unsigned char UIMgr_readTxFifo(void);
1359
static unsigned char UIMgr_readRxFifo(void);
1360
static void UIMgr_sendNck(void);
1361
static void UIMgr_sendAck(void);
1362
static void UIMgr_convertTokenToCmd(void);
1363
static void UIMgr_convertTokenToValue(void);
1364
static void UIMgr_executeCmd(void);
151 kaklik 1365
 
174 kaklik 1366
/*  Extern Variables */
1367
unsigned char UIMgr_rxFifo[UI_MGR_RX_FIFO_SIZE];
1368
unsigned char UIMgr_rxFifoHead=0;
1369
unsigned char UIMgr_rxFifoTail=0;
151 kaklik 1370
 
174 kaklik 1371
unsigned char UIMgr_txFifo[UI_MGR_TX_FIFO_SIZE];
1372
unsigned char UIMgr_txFifoHead=0;
1373
unsigned char UIMgr_txFifoTail=0;
151 kaklik 1374
 
174 kaklik 1375
/*  Definitions */
1376
#define IS_DATA_IN_TX_FIFO() (!(UIMgr_txFifoHead == UIMgr_txFifoTail))
1377
#define IS_DATA_IN_RX_FIFO() (!(UIMgr_rxFifoHead == UIMgr_rxFifoTail))
151 kaklik 1378
 
174 kaklik 1379
/* MAX_EEPROM_WRITE_ATTEMPTS limits the number of writes that can be
1380
done to a particular EEPROM cell, so that it can't possible just 
1381
write to the same cell over and over */
1382
#define MAX_EEPROM_WRITE_ATTEMPTS 3
1383
 
151 kaklik 1384
/***********************************************************
174 kaklik 1385
	Function Name: UIMgr_init
151 kaklik 1386
	Function Description: This function is responsible for
174 kaklik 1387
	initializing the UIMgr module.  It sets up the fifo
1388
	used to hold incoming data, etc.
151 kaklik 1389
	Inputs:  none 
1390
	Outputs: none
1391
***********************************************************/	
1392
void UIMgr_init(void)
1393
{
1394
	memset(asciiTokenBuffer,0x00,MAX_TOKEN_LENGTH+1);
1395
	memset(tokenBuffer,0x00,MAX_TOKEN_COUNT);
1396
	memset(UIMgr_txFifo,0x00,UI_MGR_TX_FIFO_SIZE);
1397
	memset(UIMgr_rxFifo,0x00,UI_MGR_RX_FIFO_SIZE);
1398
}
1399
 
1400
/***********************************************************
1401
	Function Name: UIMgr_dispatchEvent
1402
	Function Description: This function is responsible for
1403
	processing events that pertain to the UIMgr.
1404
	Inputs:  event - the generated event
1405
	Outputs: none
1406
***********************************************************/	
1407
void UIMgr_dispatchEvent(unsigned char event)
1408
{
1409
	switch(event)
1410
	{
1411
		case EV_ACQUIRE_LINE_COMPLETE:
1412
			UIMgr_transmitPendingData();
1413
			break;
1414
 
1415
		case EV_SERIAL_DATA_RECEIVED:		
1416
			UIMgr_processReceivedData();
1417
			break;
1418
 
1419
		case EV_SERIAL_DATA_PENDING_TX:
1420
			UIMgr_flushTxBuffer();
1421
			break;
1422
	}
1423
}
1424
/***********************************************************
1425
	Function Name: UIMgr_transmitPendingData
1426
	Function Description: This function is responsible for
1427
	transmitting a single byte of data if data is waiting
1428
	to be sent.  Otherwise, if nothing is waiting, the
1429
	function just returns.
1430
	Inputs:  none 
1431
	Outputs: none
1432
***********************************************************/
1433
void UIMgr_transmitPendingData(void)
1434
{
1435
	if (IS_DATA_IN_TX_FIFO() == TRUE)
1436
	{
1437
		/* data is waiting...send a single byte */
1438
		UartInt_txByte( UIMgr_readTxFifo() );
1439
	}
1440
}
1441
/***********************************************************
1442
	Function Name: UIMgr_processReceivedData
1443
	Function Description: This function is responsible for
1444
	parsing any serial data waiting in the rx fifo
1445
	Inputs:  none 
1446
	Outputs: none
1447
***********************************************************/
1448
void UIMgr_processReceivedData(void)
1449
{
1450
	unsigned char tmpData = 0;
1451
 
1452
	/* still need to add a mechanism to handle token counts 
1453
	that are excessive!!! FIX ME!!! */
1454
 
1455
	while(IS_DATA_IN_RX_FIFO() == TRUE)
1456
	{
1457
		tmpData = UIMgr_readRxFifo();
1458
		if (tmpData == '\r') 
1459
		{
1460
			/* we have reached a token separator */
1461
			if (tokenCount == 0)
1462
			{
1463
				/* convert the command */
1464
				UIMgr_convertTokenToCmd();				
1465
			}
1466
			else
1467
			{
1468
				/* convert a value */
1469
				UIMgr_convertTokenToValue();
1470
				tokenCount++;
1471
			}
1472
			/* either way, it is time to try to process the received
1473
			token list since we have reached the end of the cmd. */
1474
			Utility_delay(100);
1475
			if (receivedCmd == invalidCmd ||
1476
			     receivedCmd == noCmd )
1477
			{
1478
				UIMgr_sendNck();
1479
				PUBLISH_EVENT(EV_SERIAL_DATA_PENDING_TX);
1480
			}
1481
			else
1482
			{
1483
				UIMgr_sendAck();
1484
				/* publish the serial data pending event, so it
1485
				will push the ACK out before we execute the cmd */
1486
				PUBLISH_EVENT(EV_SERIAL_DATA_PENDING_TX);
1487
				UIMgr_executeCmd();
1488
			}
1489
 
1490
			/* reset any necessary data */
1491
			tokenCount = 0;
1492
			memset(tokenBuffer,0x00,MAX_TOKEN_COUNT);
1493
		}
1494
		else if (tmpData == ' ')  /* space char */
1495
		{
1496
			/* the end of a token has been reached */
1497
			if (tokenCount == 0)
1498
			{
1499
				UIMgr_convertTokenToCmd();
1500
				tokenCount++;   /* check this...why is this being incremented here??? This
1501
                means we have received a token, with tokenCount == 0, which means it is a
1502
                command...why is this contributing to tokenCount?
1503
                This might cause the set color map command to include too much data, since
1504
                it sets the color map based on tokenCount...CHECK*/
1505
			}
1506
			else
1507
			{
1508
				/* check to see if this token is going to push
1509
				us over the limit...if so, abort the transaction */
1510
				if (tokenCount+1 >= MAX_TOKEN_COUNT)
1511
				{
1512
					/* we received too many tokens, and 
1513
					need to NCK this request, since its too
1514
					large...reset everything...*/
1515
					charCount=0;
1516
					charIndex=0;
1517
					tokenCount=0;
1518
					receivedCmd = invalidCmd;
1519
				}
1520
				else
1521
				{
1522
					/* tokenCount is still in range...*/
1523
					UIMgr_convertTokenToValue();
1524
					tokenCount++;
1525
				}
1526
			}
1527
		}
1528
		else if ( (tmpData >= 'A' && tmpData <= 'Z') ||
1529
				   (tmpData >= '0' && tmpData <= '9') )
1530
		{
1531
			/* a valid range of token was received */
1532
			asciiTokenBuffer[charIndex] = tmpData;
1533
			charCount++;
1534
			charIndex++;
1535
			if (charCount > MAX_TOKEN_LENGTH)
1536
			{
1537
				/* we have received a token that cannot be handled...
1538
				set the received cmd to an invalid cmd, and wait
1539
				for the \r to process it */
1540
				receivedCmd = invalidCmd;
1541
				charIndex = 0;  /* ...so we won't overwrite memory */
1542
			}
1543
		}
1544
		else
1545
		{
1546
			/* an invalid character was received */
1547
			receivedCmd = invalidCmd;
1548
		}
1549
	}  /* end while */
1550
 
1551
	asm volatile("clt"::);  /* clear out the T flag in case it wasn't
1552
								 cleared already */
1553
}						
1554
 
1555
/***********************************************************
1556
	Function Name: UIMgr_executeCmd
1557
	Function Description: This function is responsible for
1558
	executing whatever cmd is stored in the receivedCmd
1559
	object.
1560
	Inputs:  none 
1561
	Outputs: none
1562
***********************************************************/
1563
static void UIMgr_executeCmd(void)
1564
{
1565
	unsigned char i,eepromData, num_writes=0;
1566
	unsigned char *pData;
1567
    unsigned char eeprom_write_succeeded = FALSE;
1568
#if	DEBUG_COLOR_MAP	
1569
	unsigned char asciiBuffer[5];
1570
#endif
1571
 
1572
	if (receivedCmd == pingCmd) 
1573
	{
1574
	}
1575
	else if (receivedCmd == getVersionCmd)
1576
	{
1577
		pData = AVRcamVersion;
1578
		while(*pData != 0)
1579
		{		
1580
			UIMgr_writeTxFifo(*pData++);
1581
		}
1582
	}		
1583
	else if (receivedCmd == resetCameraCmd)
1584
	{
1585
		CamInt_resetCam();
1586
	}
1587
	else if (receivedCmd == dumpFrameCmd)
1588
	{
1589
		/* publish the event that will indicate that
1590
		a request has come to dump a frame...this will
1591
		be received by the FrameMgr, which will begin
1592
		dumping the frame...a short delay is needed
1593
		here to keep the Java demo app happy (sometimes
1594
		it wouldn't be able to receive the serial data
1595
		as quickly as AVRcam can provide it). */
1596
		Utility_delay(100);
1597
		PUBLISH_EVENT(EV_DUMP_FRAME);
1598
	}
1599
	else if (receivedCmd == setCameraRegsCmd)
1600
	{
1601
		/* we need to gather the tokens and
1602
		build config cmds to be sent to the camera */
1603
		for (i=1; i<tokenCount; i+=2)  /* starts at 1 since first token
1604
											is the CR cmd */
1605
		{
1606
			CamConfig_setCamReg(tokenBuffer[i],tokenBuffer[i+1]);
1607
		}
1608
		CamConfig_sendFifoCmds();
1609
	}
1610
	else if (receivedCmd == enableTrackingCmd)
1611
	{
1612
		/* publish the event...again with a short delay */
1613
		Utility_delay(100);
1614
		PUBLISH_EVENT(EV_ENABLE_TRACKING);
1615
	}
1616
	else if (receivedCmd == disableTrackingCmd)
1617
	{
1618
		PUBLISH_EVENT(EV_DISABLE_TRACKING);
1619
	}
1620
	else if (receivedCmd == setColorMapCmd)
1621
	{
1622
		/* copy the received tokens into the color map */
1623
		for (i=0; i<tokenCount; i++)
1624
		{
1625
			colorMap[i] = tokenBuffer[i+1];
1626
 
1627
            /* write each colorMap byte to EEPROM, but only those
1628
            that changed...this will help reduce wear on the EEPROM */
1629
            eepromData = eeprom_read_byte( (unsigned char*)(i+1));
1630
            if (eepromData != colorMap[i])
174 kaklik 1631
     a4c:	e8 17       	cp	r30, r24
1632
     a4e:	c1 f0       	breq	.+48     	; 0xa80 <UIMgr_processReceivedData+0x178>
1633
 
1634
void 
1635
eeprom_write_byte (uint8_t *addr,uint8_t value)
1636
{
1637
  asm volatile (
1638
     a50:	d9 01       	movw	r26, r18
1639
     a52:	0e 2e       	mov	r0, r30
1640
     a54:	27 d3       	rcall	.+1614   	; 0x10a4 <__eeprom_write_byte_1C1D1E>
1641
     a56:	d9 01       	movw	r26, r18
1642
     a58:	18 d3       	rcall	.+1584   	; 0x108a <__eeprom_read_byte_1C1D1E>
1643
     a5a:	80 2d       	mov	r24, r0
151 kaklik 1644
            {
1645
                /* need to actually perform the write because the
1646
                data in eeprom is different than the current colorMap */
1647
                eeprom_write_succeeded = FALSE;
1648
                while(eeprom_write_succeeded == FALSE && num_writes < MAX_EEPROM_WRITE_ATTEMPTS)
1649
                {
1650
                    eeprom_write_byte((unsigned char*)(i+1),colorMap[i]);
1651
                    num_writes++;
1652
                    eepromData = eeprom_read_byte( (unsigned char*)(i+1));
1653
                    if (eepromData == colorMap[i])
174 kaklik 1654
     a5c:	98 81       	ld	r25, Y
1655
     a5e:	98 17       	cp	r25, r24
1656
     a60:	79 f0       	breq	.+30     	; 0xa80 <UIMgr_processReceivedData+0x178>
1657
 
1658
void 
1659
eeprom_write_byte (uint8_t *addr,uint8_t value)
1660
{
1661
  asm volatile (
1662
     a62:	d9 01       	movw	r26, r18
1663
     a64:	09 2e       	mov	r0, r25
1664
     a66:	1e d3       	rcall	.+1596   	; 0x10a4 <__eeprom_write_byte_1C1D1E>
1665
     a68:	d9 01       	movw	r26, r18
1666
     a6a:	0f d3       	rcall	.+1566   	; 0x108a <__eeprom_read_byte_1C1D1E>
1667
     a6c:	80 2d       	mov	r24, r0
1668
     a6e:	98 81       	ld	r25, Y
1669
     a70:	98 17       	cp	r25, r24
1670
     a72:	31 f0       	breq	.+12     	; 0xa80 <UIMgr_processReceivedData+0x178>
1671
 
1672
void 
1673
eeprom_write_byte (uint8_t *addr,uint8_t value)
1674
{
1675
  asm volatile (
1676
     a74:	d9 01       	movw	r26, r18
1677
     a76:	09 2e       	mov	r0, r25
1678
     a78:	15 d3       	rcall	.+1578   	; 0x10a4 <__eeprom_write_byte_1C1D1E>
1679
     a7a:	d9 01       	movw	r26, r18
1680
     a7c:	06 d3       	rcall	.+1548   	; 0x108a <__eeprom_read_byte_1C1D1E>
1681
     a7e:	80 2d       	mov	r24, r0
1682
     a80:	4f 5f       	subi	r20, 0xFF	; 255
1683
     a82:	80 91 bc 00 	lds	r24, 0x00BC
1684
     a86:	48 17       	cp	r20, r24
1685
     a88:	88 f2       	brcs	.-94     	; 0xa2c <UIMgr_processReceivedData+0x124>
1686
     a8a:	10 92 bc 00 	sts	0x00BC, r1
1687
     a8e:	80 e4       	ldi	r24, 0x40	; 64
1688
     a90:	e3 ec       	ldi	r30, 0xC3	; 195
1689
     a92:	f0 e0       	ldi	r31, 0x00	; 0
1690
     a94:	11 92       	st	Z+, r1
1691
     a96:	8a 95       	dec	r24
1692
     a98:	e9 f7       	brne	.-6      	; 0xa94 <UIMgr_processReceivedData+0x18c>
1693
     a9a:	3f c0       	rjmp	.+126    	; 0xb1a <UIMgr_processReceivedData+0x212>
1694
     a9c:	90 32       	cpi	r25, 0x20	; 32
1695
     a9e:	f1 f4       	brne	.+60     	; 0xadc <UIMgr_processReceivedData+0x1d4>
1696
     aa0:	80 91 bc 00 	lds	r24, 0x00BC
1697
     aa4:	88 23       	and	r24, r24
1698
     aa6:	39 f4       	brne	.+14     	; 0xab6 <UIMgr_processReceivedData+0x1ae>
1699
     aa8:	8f de       	rcall	.-738    	; 0x7c8 <UIMgr_convertTokenToCmd>
1700
     aaa:	80 91 bc 00 	lds	r24, 0x00BC
1701
     aae:	8f 5f       	subi	r24, 0xFF	; 255
1702
     ab0:	80 93 bc 00 	sts	0x00BC, r24
1703
     ab4:	32 c0       	rjmp	.+100    	; 0xb1a <UIMgr_processReceivedData+0x212>
1704
     ab6:	99 27       	eor	r25, r25
1705
     ab8:	cf 97       	sbiw	r24, 0x3f	; 63
1706
     aba:	4c f0       	brlt	.+18     	; 0xace <UIMgr_processReceivedData+0x1c6>
1707
     abc:	10 92 bd 00 	sts	0x00BD, r1
1708
     ac0:	10 92 be 00 	sts	0x00BE, r1
1709
     ac4:	10 92 bc 00 	sts	0x00BC, r1
1710
     ac8:	f0 92 62 00 	sts	0x0062, r15
1711
     acc:	26 c0       	rjmp	.+76     	; 0xb1a <UIMgr_processReceivedData+0x212>
1712
     ace:	f6 de       	rcall	.-532    	; 0x8bc <UIMgr_convertTokenToValue>
1713
     ad0:	80 91 bc 00 	lds	r24, 0x00BC
1714
     ad4:	8f 5f       	subi	r24, 0xFF	; 255
1715
     ad6:	80 93 bc 00 	sts	0x00BC, r24
1716
     ada:	1f c0       	rjmp	.+62     	; 0xb1a <UIMgr_processReceivedData+0x212>
1717
     adc:	89 2f       	mov	r24, r25
1718
     ade:	81 54       	subi	r24, 0x41	; 65
1719
     ae0:	8a 31       	cpi	r24, 0x1A	; 26
1720
     ae2:	18 f0       	brcs	.+6      	; 0xaea <UIMgr_processReceivedData+0x1e2>
1721
     ae4:	8f 5e       	subi	r24, 0xEF	; 239
1722
     ae6:	8a 30       	cpi	r24, 0x0A	; 10
1723
     ae8:	b0 f4       	brcc	.+44     	; 0xb16 <UIMgr_processReceivedData+0x20e>
1724
     aea:	80 91 be 00 	lds	r24, 0x00BE
1725
     aee:	e8 2f       	mov	r30, r24
1726
     af0:	ff 27       	eor	r31, r31
1727
     af2:	e1 54       	subi	r30, 0x41	; 65
1728
     af4:	ff 4f       	sbci	r31, 0xFF	; 255
1729
     af6:	90 83       	st	Z, r25
1730
     af8:	90 91 bd 00 	lds	r25, 0x00BD
1731
     afc:	9f 5f       	subi	r25, 0xFF	; 255
1732
     afe:	90 93 bd 00 	sts	0x00BD, r25
1733
     b02:	8f 5f       	subi	r24, 0xFF	; 255
1734
     b04:	80 93 be 00 	sts	0x00BE, r24
1735
     b08:	94 30       	cpi	r25, 0x04	; 4
1736
     b0a:	38 f0       	brcs	.+14     	; 0xb1a <UIMgr_processReceivedData+0x212>
1737
     b0c:	f0 92 62 00 	sts	0x0062, r15
1738
     b10:	10 92 be 00 	sts	0x00BE, r1
1739
     b14:	02 c0       	rjmp	.+4      	; 0xb1a <UIMgr_processReceivedData+0x212>
1740
     b16:	f0 92 62 00 	sts	0x0062, r15
1741
     b1a:	20 91 b9 00 	lds	r18, 0x00B9
1742
     b1e:	80 91 b8 00 	lds	r24, 0x00B8
1743
     b22:	82 17       	cp	r24, r18
1744
     b24:	09 f0       	breq	.+2      	; 0xb28 <UIMgr_processReceivedData+0x220>
1745
     b26:	fa ce       	rjmp	.-524    	; 0x91c <UIMgr_processReceivedData+0x14>
1746
     b28:	e8 94       	clt
1747
     b2a:	df 91       	pop	r29
1748
     b2c:	cf 91       	pop	r28
1749
     b2e:	1f 91       	pop	r17
1750
     b30:	0f 91       	pop	r16
1751
     b32:	ff 90       	pop	r15
1752
     b34:	08 95       	ret
1753
 
1754
00000b36 <UIMgr_dispatchEvent>:
1755
     b36:	80 31       	cpi	r24, 0x10	; 16
1756
     b38:	29 f0       	breq	.+10     	; 0xb44 <UIMgr_dispatchEvent+0xe>
1757
     b3a:	80 39       	cpi	r24, 0x90	; 144
1758
     b3c:	39 f0       	breq	.+14     	; 0xb4c <UIMgr_dispatchEvent+0x16>
1759
     b3e:	81 30       	cpi	r24, 0x01	; 1
1760
     b40:	31 f4       	brne	.+12     	; 0xb4e <UIMgr_dispatchEvent+0x18>
1761
     b42:	02 c0       	rjmp	.+4      	; 0xb48 <UIMgr_dispatchEvent+0x12>
1762
     b44:	38 de       	rcall	.-912    	; 0x7b6 <UIMgr_transmitPendingData>
1763
     b46:	08 95       	ret
1764
     b48:	df de       	rcall	.-578    	; 0x908 <UIMgr_processReceivedData>
1765
     b4a:	08 95       	ret
1766
     b4c:	0e de       	rcall	.-996    	; 0x76a <UIMgr_flushTxBuffer>
1767
     b4e:	08 95       	ret
1768
 
1769
00000b50 <UartInt_init>:
1770
     b50:	10 bc       	out	0x20, r1	; 32
1771
     b52:	82 e1       	ldi	r24, 0x12	; 18
1772
     b54:	89 b9       	out	0x09, r24	; 9
1773
     b56:	88 e9       	ldi	r24, 0x98	; 152
1774
     b58:	8a b9       	out	0x0a, r24	; 10
1775
     b5a:	86 e8       	ldi	r24, 0x86	; 134
1776
     b5c:	80 bd       	out	0x20, r24	; 32
1777
     b5e:	82 e0       	ldi	r24, 0x02	; 2
1778
     b60:	8b b9       	out	0x0b, r24	; 11
1779
     b62:	08 95       	ret
1780
 
1781
00000b64 <UartInt_txByte>:
1782
     b64:	5d 9b       	sbis	0x0b, 5	; 11
1783
     b66:	fe cf       	rjmp	.-4      	; 0xb64 <UartInt_txByte>
1784
     b68:	8c b9       	out	0x0c, r24	; 12
1785
     b6a:	08 95       	ret
1786
 
1787
00000b6c <__vector_11>:
1788
     b6c:	1f 92       	push	r1
1789
     b6e:	0f 92       	push	r0
1790
     b70:	0f b6       	in	r0, 0x3f	; 63
1791
     b72:	0f 92       	push	r0
1792
     b74:	11 24       	eor	r1, r1
1793
     b76:	8f 93       	push	r24
1794
     b78:	9f 93       	push	r25
1795
     b7a:	ef 93       	push	r30
1796
     b7c:	ff 93       	push	r31
1797
     b7e:	80 91 b8 00 	lds	r24, 0x00B8
1798
     b82:	9c b1       	in	r25, 0x0c	; 12
1799
     b84:	e4 e7       	ldi	r30, 0x74	; 116
1800
     b86:	f2 e0       	ldi	r31, 0x02	; 2
1801
     b88:	e8 0f       	add	r30, r24
1802
     b8a:	f1 1d       	adc	r31, r1
1803
     b8c:	90 83       	st	Z, r25
1804
     b8e:	8f 5f       	subi	r24, 0xFF	; 255
1805
     b90:	8f 71       	andi	r24, 0x1F	; 31
1806
     b92:	80 93 b8 00 	sts	0x00B8, r24
1807
     b96:	80 91 70 00 	lds	r24, 0x0070
1808
     b9a:	ec e6       	ldi	r30, 0x6C	; 108
1809
     b9c:	f2 e0       	ldi	r31, 0x02	; 2
1810
     b9e:	e8 0f       	add	r30, r24
1811
     ba0:	f1 1d       	adc	r31, r1
1812
     ba2:	91 e0       	ldi	r25, 0x01	; 1
1813
     ba4:	90 83       	st	Z, r25
1814
     ba6:	8f 5f       	subi	r24, 0xFF	; 255
1815
     ba8:	87 70       	andi	r24, 0x07	; 7
1816
     baa:	80 93 70 00 	sts	0x0070, r24
1817
     bae:	ff 91       	pop	r31
1818
     bb0:	ef 91       	pop	r30
1819
     bb2:	9f 91       	pop	r25
1820
     bb4:	8f 91       	pop	r24
1821
     bb6:	0f 90       	pop	r0
1822
     bb8:	0f be       	out	0x3f, r0	; 63
1823
     bba:	0f 90       	pop	r0
1824
     bbc:	1f 90       	pop	r1
1825
     bbe:	18 95       	reti
1826
 
1827
00000bc0 <I2CInt_init>:
1828
     bc0:	11 b8       	out	0x01, r1	; 1
1829
     bc2:	88 e4       	ldi	r24, 0x48	; 72
1830
     bc4:	80 b9       	out	0x00, r24	; 0
1831
     bc6:	08 95       	ret
1832
 
1833
00000bc8 <I2CInt_writeData>:
1834
     bc8:	98 2f       	mov	r25, r24
1835
     bca:	80 91 08 01 	lds	r24, 0x0108
1836
     bce:	88 23       	and	r24, r24
1837
     bd0:	e4 f3       	brlt	.-8      	; 0xbca <I2CInt_writeData+0x2>
1838
     bd2:	06 b6       	in	r0, 0x36	; 54
1839
     bd4:	04 fc       	sbrc	r0, 4
1840
     bd6:	fd cf       	rjmp	.-6      	; 0xbd2 <I2CInt_writeData+0xa>
1841
     bd8:	90 93 03 01 	sts	0x0103, r25
1842
     bdc:	70 93 05 01 	sts	0x0105, r23
1843
     be0:	60 93 04 01 	sts	0x0104, r22
1844
     be4:	40 93 07 01 	sts	0x0107, r20
1845
     be8:	10 92 06 01 	sts	0x0106, r1
1846
     bec:	10 92 09 01 	sts	0x0109, r1
1847
     bf0:	85 ea       	ldi	r24, 0xA5	; 165
1848
     bf2:	86 bf       	out	0x36, r24	; 54
1849
     bf4:	80 91 08 01 	lds	r24, 0x0108
1850
     bf8:	80 68       	ori	r24, 0x80	; 128
1851
     bfa:	80 93 08 01 	sts	0x0108, r24
1852
     bfe:	08 95       	ret
1853
 
1854
00000c00 <I2CInt_readData>:
1855
     c00:	98 2f       	mov	r25, r24
1856
     c02:	80 91 08 01 	lds	r24, 0x0108
1857
     c06:	88 23       	and	r24, r24
1858
     c08:	e4 f3       	brlt	.-8      	; 0xc02 <I2CInt_readData+0x2>
1859
     c0a:	90 93 03 01 	sts	0x0103, r25
1860
     c0e:	70 93 05 01 	sts	0x0105, r23
1861
     c12:	60 93 04 01 	sts	0x0104, r22
1862
     c16:	40 93 07 01 	sts	0x0107, r20
1863
     c1a:	81 e0       	ldi	r24, 0x01	; 1
1864
     c1c:	80 93 06 01 	sts	0x0106, r24
1865
     c20:	10 92 09 01 	sts	0x0109, r1
1866
     c24:	85 ea       	ldi	r24, 0xA5	; 165
1867
     c26:	86 bf       	out	0x36, r24	; 54
1868
     c28:	80 91 08 01 	lds	r24, 0x0108
1869
     c2c:	80 68       	ori	r24, 0x80	; 128
1870
     c2e:	80 93 08 01 	sts	0x0108, r24
1871
     c32:	08 95       	ret
1872
 
1873
00000c34 <I2CInt_isI2cBusy>:
1874
     c34:	80 91 08 01 	lds	r24, 0x0108
1875
     c38:	88 1f       	adc	r24, r24
1876
     c3a:	88 27       	eor	r24, r24
1877
     c3c:	88 1f       	adc	r24, r24
1878
     c3e:	99 27       	eor	r25, r25
1879
     c40:	08 95       	ret
1880
 
1881
00000c42 <__vector_17>:
1882
     c42:	1f 92       	push	r1
1883
     c44:	0f 92       	push	r0
1884
     c46:	0f b6       	in	r0, 0x3f	; 63
1885
     c48:	0f 92       	push	r0
1886
     c4a:	11 24       	eor	r1, r1
1887
     c4c:	8f 93       	push	r24
1888
     c4e:	9f 93       	push	r25
1889
     c50:	af 93       	push	r26
1890
     c52:	bf 93       	push	r27
1891
     c54:	ef 93       	push	r30
1892
     c56:	ff 93       	push	r31
1893
     c58:	81 b1       	in	r24, 0x01	; 1
1894
     c5a:	99 27       	eor	r25, r25
1895
     c5c:	aa 27       	eor	r26, r26
1896
     c5e:	bb 27       	eor	r27, r27
1897
     c60:	88 7f       	andi	r24, 0xF8	; 248
1898
     c62:	90 70       	andi	r25, 0x00	; 0
1899
     c64:	a0 70       	andi	r26, 0x00	; 0
1900
     c66:	b0 70       	andi	r27, 0x00	; 0
1901
     c68:	fc 01       	movw	r30, r24
1902
     c6a:	38 97       	sbiw	r30, 0x08	; 8
1903
     c6c:	e1 35       	cpi	r30, 0x51	; 81
1904
     c6e:	f1 05       	cpc	r31, r1
1905
     c70:	08 f0       	brcs	.+2      	; 0xc74 <__vector_17+0x32>
1906
     c72:	9a c0       	rjmp	.+308    	; 0xda8 <__vector_17+0x166>
1907
     c74:	ed 5e       	subi	r30, 0xED	; 237
1908
     c76:	ff 4f       	sbci	r31, 0xFF	; 255
1909
     c78:	09 94       	ijmp
1910
     c7a:	80 91 09 01 	lds	r24, 0x0109
1911
     c7e:	83 30       	cpi	r24, 0x03	; 3
1912
     c80:	48 f0       	brcs	.+18     	; 0xc94 <__vector_17+0x52>
1913
     c82:	86 b7       	in	r24, 0x36	; 54
1914
     c84:	80 69       	ori	r24, 0x90	; 144
1915
     c86:	86 bf       	out	0x36, r24	; 54
1916
     c88:	80 91 08 01 	lds	r24, 0x0108
1917
     c8c:	8f 77       	andi	r24, 0x7F	; 127
1918
     c8e:	80 93 08 01 	sts	0x0108, r24
1919
     c92:	8a c0       	rjmp	.+276    	; 0xda8 <__vector_17+0x166>
1920
     c94:	80 91 03 01 	lds	r24, 0x0103
1921
     c98:	90 91 06 01 	lds	r25, 0x0106
1922
     c9c:	88 0f       	add	r24, r24
1923
     c9e:	89 0f       	add	r24, r25
1924
     ca0:	83 b9       	out	0x03, r24	; 3
1925
     ca2:	86 b7       	in	r24, 0x36	; 54
1926
     ca4:	8f 7d       	andi	r24, 0xDF	; 223
1927
     ca6:	86 bf       	out	0x36, r24	; 54
1928
     ca8:	7f c0       	rjmp	.+254    	; 0xda8 <__vector_17+0x166>
1929
     caa:	10 92 09 01 	sts	0x0109, r1
1930
     cae:	e0 91 04 01 	lds	r30, 0x0104
1931
     cb2:	f0 91 05 01 	lds	r31, 0x0105
1932
     cb6:	80 81       	ld	r24, Z
1933
     cb8:	83 b9       	out	0x03, r24	; 3
1934
     cba:	31 96       	adiw	r30, 0x01	; 1
1935
     cbc:	f0 93 05 01 	sts	0x0105, r31
1936
     cc0:	e0 93 04 01 	sts	0x0104, r30
1937
     cc4:	86 b7       	in	r24, 0x36	; 54
1938
     cc6:	80 68       	ori	r24, 0x80	; 128
1939
     cc8:	86 bf       	out	0x36, r24	; 54
1940
     cca:	6e c0       	rjmp	.+220    	; 0xda8 <__vector_17+0x166>
1941
     ccc:	80 91 09 01 	lds	r24, 0x0109
1942
     cd0:	8f 5f       	subi	r24, 0xFF	; 255
1943
     cd2:	80 93 09 01 	sts	0x0109, r24
1944
     cd6:	86 b7       	in	r24, 0x36	; 54
1945
     cd8:	80 6b       	ori	r24, 0xB0	; 176
1946
     cda:	86 bf       	out	0x36, r24	; 54
1947
     cdc:	65 c0       	rjmp	.+202    	; 0xda8 <__vector_17+0x166>
1948
     cde:	80 91 07 01 	lds	r24, 0x0107
1949
     ce2:	81 50       	subi	r24, 0x01	; 1
1950
     ce4:	80 93 07 01 	sts	0x0107, r24
1951
     ce8:	80 91 07 01 	lds	r24, 0x0107
1952
     cec:	88 23       	and	r24, r24
1953
     cee:	79 f0       	breq	.+30     	; 0xd0e <__vector_17+0xcc>
1954
     cf0:	e0 91 04 01 	lds	r30, 0x0104
1955
     cf4:	f0 91 05 01 	lds	r31, 0x0105
1956
     cf8:	80 81       	ld	r24, Z
1957
     cfa:	83 b9       	out	0x03, r24	; 3
1958
     cfc:	31 96       	adiw	r30, 0x01	; 1
1959
     cfe:	f0 93 05 01 	sts	0x0105, r31
1960
     d02:	e0 93 04 01 	sts	0x0104, r30
1961
     d06:	86 b7       	in	r24, 0x36	; 54
1962
     d08:	80 68       	ori	r24, 0x80	; 128
1963
     d0a:	86 bf       	out	0x36, r24	; 54
1964
     d0c:	4d c0       	rjmp	.+154    	; 0xda8 <__vector_17+0x166>
1965
     d0e:	86 b7       	in	r24, 0x36	; 54
1966
     d10:	80 69       	ori	r24, 0x90	; 144
1967
     d12:	86 bf       	out	0x36, r24	; 54
1968
     d14:	80 91 08 01 	lds	r24, 0x0108
1969
     d18:	8f 77       	andi	r24, 0x7F	; 127
1970
     d1a:	80 93 08 01 	sts	0x0108, r24
1971
     d1e:	44 c0       	rjmp	.+136    	; 0xda8 <__vector_17+0x166>
1972
     d20:	86 b7       	in	r24, 0x36	; 54
1973
     d22:	80 69       	ori	r24, 0x90	; 144
1974
     d24:	86 bf       	out	0x36, r24	; 54
1975
     d26:	80 91 08 01 	lds	r24, 0x0108
1976
     d2a:	8f 77       	andi	r24, 0x7F	; 127
1977
     d2c:	80 93 08 01 	sts	0x0108, r24
1978
     d30:	3b c0       	rjmp	.+118    	; 0xda8 <__vector_17+0x166>
1979
     d32:	80 91 07 01 	lds	r24, 0x0107
1980
     d36:	81 50       	subi	r24, 0x01	; 1
1981
     d38:	80 93 07 01 	sts	0x0107, r24
1982
     d3c:	80 91 07 01 	lds	r24, 0x0107
1983
     d40:	88 23       	and	r24, r24
1984
     d42:	21 f0       	breq	.+8      	; 0xd4c <__vector_17+0x10a>
1985
     d44:	86 b7       	in	r24, 0x36	; 54
1986
     d46:	80 6c       	ori	r24, 0xC0	; 192
1987
     d48:	86 bf       	out	0x36, r24	; 54
1988
     d4a:	2e c0       	rjmp	.+92     	; 0xda8 <__vector_17+0x166>
1989
     d4c:	86 b7       	in	r24, 0x36	; 54
1990
     d4e:	80 68       	ori	r24, 0x80	; 128
1991
     d50:	86 bf       	out	0x36, r24	; 54
1992
     d52:	2a c0       	rjmp	.+84     	; 0xda8 <__vector_17+0x166>
1993
     d54:	e0 91 04 01 	lds	r30, 0x0104
1994
     d58:	f0 91 05 01 	lds	r31, 0x0105
1995
     d5c:	83 b1       	in	r24, 0x03	; 3
1996
     d5e:	80 83       	st	Z, r24
1997
     d60:	31 96       	adiw	r30, 0x01	; 1
1998
     d62:	f0 93 05 01 	sts	0x0105, r31
1999
     d66:	e0 93 04 01 	sts	0x0104, r30
2000
     d6a:	80 91 07 01 	lds	r24, 0x0107
2001
     d6e:	81 50       	subi	r24, 0x01	; 1
2002
     d70:	80 93 07 01 	sts	0x0107, r24
2003
     d74:	80 91 07 01 	lds	r24, 0x0107
2004
     d78:	88 23       	and	r24, r24
2005
     d7a:	21 f0       	breq	.+8      	; 0xd84 <__vector_17+0x142>
2006
     d7c:	86 b7       	in	r24, 0x36	; 54
2007
     d7e:	80 6c       	ori	r24, 0xC0	; 192
2008
     d80:	86 bf       	out	0x36, r24	; 54
2009
     d82:	12 c0       	rjmp	.+36     	; 0xda8 <__vector_17+0x166>
2010
     d84:	86 b7       	in	r24, 0x36	; 54
2011
     d86:	8f 7b       	andi	r24, 0xBF	; 191
2012
     d88:	86 bf       	out	0x36, r24	; 54
2013
     d8a:	0e c0       	rjmp	.+28     	; 0xda8 <__vector_17+0x166>
2014
     d8c:	e0 91 04 01 	lds	r30, 0x0104
2015
     d90:	f0 91 05 01 	lds	r31, 0x0105
2016
     d94:	83 b1       	in	r24, 0x03	; 3
2017
     d96:	80 83       	st	Z, r24
2018
     d98:	86 b7       	in	r24, 0x36	; 54
2019
     d9a:	80 69       	ori	r24, 0x90	; 144
2020
     d9c:	86 bf       	out	0x36, r24	; 54
2021
     d9e:	80 91 08 01 	lds	r24, 0x0108
2022
     da2:	8f 77       	andi	r24, 0x7F	; 127
2023
     da4:	80 93 08 01 	sts	0x0108, r24
2024
     da8:	ff 91       	pop	r31
2025
     daa:	ef 91       	pop	r30
2026
     dac:	bf 91       	pop	r27
2027
     dae:	af 91       	pop	r26
2028
     db0:	9f 91       	pop	r25
2029
     db2:	8f 91       	pop	r24
2030
     db4:	0f 90       	pop	r0
2031
     db6:	0f be       	out	0x3f, r0	; 63
2032
     db8:	0f 90       	pop	r0
2033
     dba:	1f 90       	pop	r1
2034
     dbc:	18 95       	reti
2035
 
2036
00000dbe <CamConfig_writeTxFifo>:
2037
     dbe:	20 91 0a 01 	lds	r18, 0x010A
2038
     dc2:	e2 2f       	mov	r30, r18
2039
     dc4:	ff 27       	eor	r31, r31
2040
     dc6:	ee 0f       	add	r30, r30
2041
     dc8:	ff 1f       	adc	r31, r31
2042
     dca:	ec 52       	subi	r30, 0x2C	; 44
2043
     dcc:	fd 4f       	sbci	r31, 0xFD	; 253
2044
     dce:	91 83       	std	Z+1, r25	; 0x01
2045
     dd0:	80 83       	st	Z, r24
2046
     dd2:	2f 5f       	subi	r18, 0xFF	; 255
2047
     dd4:	27 70       	andi	r18, 0x07	; 7
2048
     dd6:	20 93 0a 01 	sts	0x010A, r18
2049
     dda:	90 e0       	ldi	r25, 0x00	; 0
2050
     ddc:	80 91 0b 01 	lds	r24, 0x010B
2051
     de0:	28 17       	cp	r18, r24
2052
     de2:	09 f4       	brne	.+2      	; 0xde6 <CamConfig_writeTxFifo+0x28>
2053
     de4:	91 e0       	ldi	r25, 0x01	; 1
2054
     de6:	81 e0       	ldi	r24, 0x01	; 1
2055
     de8:	89 27       	eor	r24, r25
2056
     dea:	99 27       	eor	r25, r25
2057
     dec:	08 95       	ret
2058
 
2059
00000dee <CamConfig_setCamReg>:
2060
     dee:	28 2f       	mov	r18, r24
2061
     df0:	36 2f       	mov	r19, r22
2062
     df2:	c9 01       	movw	r24, r18
2063
     df4:	e4 df       	rcall	.-56     	; 0xdbe <CamConfig_writeTxFifo>
2064
     df6:	08 95       	ret
2065
 
2066
00000df8 <CamConfig_sendFifoCmds>:
2067
     df8:	0f 93       	push	r16
2068
     dfa:	1f 93       	push	r17
2069
     dfc:	cf 93       	push	r28
2070
     dfe:	df 93       	push	r29
2071
     e00:	cd b7       	in	r28, 0x3d	; 61
2072
     e02:	de b7       	in	r29, 0x3e	; 62
2073
     e04:	22 97       	sbiw	r28, 0x02	; 2
2074
     e06:	0f b6       	in	r0, 0x3f	; 63
2075
     e08:	f8 94       	cli
2076
     e0a:	de bf       	out	0x3e, r29	; 62
2077
     e0c:	0f be       	out	0x3f, r0	; 63
2078
     e0e:	cd bf       	out	0x3d, r28	; 61
2079
     e10:	8e 01       	movw	r16, r28
2080
     e12:	0f 5f       	subi	r16, 0xFF	; 255
2081
     e14:	1f 4f       	sbci	r17, 0xFF	; 255
2082
     e16:	19 c0       	rjmp	.+50     	; 0xe4a <CamConfig_sendFifoCmds+0x52>
2083
     e18:	e3 2f       	mov	r30, r19
2084
     e1a:	ff 27       	eor	r31, r31
2085
     e1c:	ee 0f       	add	r30, r30
2086
     e1e:	ff 1f       	adc	r31, r31
2087
     e20:	ec 52       	subi	r30, 0x2C	; 44
2088
     e22:	fd 4f       	sbci	r31, 0xFD	; 253
2089
     e24:	91 81       	ldd	r25, Z+1	; 0x01
2090
     e26:	20 81       	ld	r18, Z
2091
     e28:	83 2f       	mov	r24, r19
2092
     e2a:	8f 5f       	subi	r24, 0xFF	; 255
2093
     e2c:	87 70       	andi	r24, 0x07	; 7
2094
     e2e:	80 93 0b 01 	sts	0x010B, r24
2095
     e32:	9a 83       	std	Y+2, r25	; 0x02
2096
     e34:	29 83       	std	Y+1, r18	; 0x01
2097
     e36:	42 e0       	ldi	r20, 0x02	; 2
2098
     e38:	b8 01       	movw	r22, r16
2099
     e3a:	80 e6       	ldi	r24, 0x60	; 96
2100
     e3c:	c5 de       	rcall	.-630    	; 0xbc8 <I2CInt_writeData>
2101
     e3e:	84 e6       	ldi	r24, 0x64	; 100
2102
     e40:	90 e0       	ldi	r25, 0x00	; 0
2103
     e42:	25 d0       	rcall	.+74     	; 0xe8e <Utility_delay>
2104
     e44:	f7 de       	rcall	.-530    	; 0xc34 <I2CInt_isI2cBusy>
2105
     e46:	81 30       	cpi	r24, 0x01	; 1
2106
     e48:	e9 f3       	breq	.-6      	; 0xe44 <CamConfig_sendFifoCmds+0x4c>
2107
     e4a:	30 91 0b 01 	lds	r19, 0x010B
2108
     e4e:	80 91 0a 01 	lds	r24, 0x010A
2109
     e52:	83 17       	cp	r24, r19
2110
     e54:	09 f7       	brne	.-62     	; 0xe18 <CamConfig_sendFifoCmds+0x20>
2111
     e56:	22 96       	adiw	r28, 0x02	; 2
2112
     e58:	0f b6       	in	r0, 0x3f	; 63
2113
     e5a:	f8 94       	cli
2114
     e5c:	de bf       	out	0x3e, r29	; 62
2115
     e5e:	0f be       	out	0x3f, r0	; 63
2116
     e60:	cd bf       	out	0x3d, r28	; 61
2117
     e62:	df 91       	pop	r29
2118
     e64:	cf 91       	pop	r28
2119
     e66:	1f 91       	pop	r17
2120
     e68:	0f 91       	pop	r16
2121
     e6a:	08 95       	ret
2122
 
2123
00000e6c <CamConfig_init>:
2124
     e6c:	60 e2       	ldi	r22, 0x20	; 32
2125
     e6e:	84 e1       	ldi	r24, 0x14	; 20
2126
     e70:	be df       	rcall	.-132    	; 0xdee <CamConfig_setCamReg>
2127
     e72:	60 e4       	ldi	r22, 0x40	; 64
2128
     e74:	89 e3       	ldi	r24, 0x39	; 57
2129
     e76:	bb df       	rcall	.-138    	; 0xdee <CamConfig_setCamReg>
2130
     e78:	68 e2       	ldi	r22, 0x28	; 40
2131
     e7a:	82 e1       	ldi	r24, 0x12	; 18
2132
     e7c:	b8 df       	rcall	.-144    	; 0xdee <CamConfig_setCamReg>
2133
     e7e:	65 e0       	ldi	r22, 0x05	; 5
2134
     e80:	88 e2       	ldi	r24, 0x28	; 40
2135
     e82:	b5 df       	rcall	.-150    	; 0xdee <CamConfig_setCamReg>
2136
     e84:	61 e0       	ldi	r22, 0x01	; 1
2137
     e86:	83 e1       	ldi	r24, 0x13	; 19
2138
     e88:	b2 df       	rcall	.-156    	; 0xdee <CamConfig_setCamReg>
2139
     e8a:	b6 df       	rcall	.-148    	; 0xdf8 <CamConfig_sendFifoCmds>
2140
     e8c:	08 95       	ret
2141
 
2142
00000e8e <Utility_delay>:
2143
     e8e:	cf 93       	push	r28
2144
     e90:	df 93       	push	r29
2145
     e92:	cd b7       	in	r28, 0x3d	; 61
2146
     e94:	de b7       	in	r29, 0x3e	; 62
2147
     e96:	24 97       	sbiw	r28, 0x04	; 4
2148
     e98:	0f b6       	in	r0, 0x3f	; 63
2149
     e9a:	f8 94       	cli
2150
     e9c:	de bf       	out	0x3e, r29	; 62
2151
     e9e:	0f be       	out	0x3f, r0	; 63
2152
     ea0:	cd bf       	out	0x3d, r28	; 61
2153
     ea2:	9c 01       	movw	r18, r24
2154
     ea4:	1a 82       	std	Y+2, r1	; 0x02
2155
     ea6:	19 82       	std	Y+1, r1	; 0x01
2156
     ea8:	1c 82       	std	Y+4, r1	; 0x04
2157
     eaa:	1b 82       	std	Y+3, r1	; 0x03
2158
     eac:	1a 82       	std	Y+2, r1	; 0x02
2159
     eae:	19 82       	std	Y+1, r1	; 0x01
2160
     eb0:	89 81       	ldd	r24, Y+1	; 0x01
2161
     eb2:	9a 81       	ldd	r25, Y+2	; 0x02
2162
     eb4:	82 17       	cp	r24, r18
2163
     eb6:	93 07       	cpc	r25, r19
2164
     eb8:	e0 f4       	brcc	.+56     	; 0xef2 <Utility_delay+0x64>
2165
     eba:	1c 82       	std	Y+4, r1	; 0x04
2166
     ebc:	1b 82       	std	Y+3, r1	; 0x03
2167
     ebe:	8b 81       	ldd	r24, Y+3	; 0x03
2168
     ec0:	9c 81       	ldd	r25, Y+4	; 0x04
2169
     ec2:	88 5e       	subi	r24, 0xE8	; 232
2170
     ec4:	93 40       	sbci	r25, 0x03	; 3
2171
     ec6:	58 f4       	brcc	.+22     	; 0xede <Utility_delay+0x50>
2172
     ec8:	00 00       	nop
2173
     eca:	8b 81       	ldd	r24, Y+3	; 0x03
2174
     ecc:	9c 81       	ldd	r25, Y+4	; 0x04
2175
     ece:	01 96       	adiw	r24, 0x01	; 1
2176
     ed0:	9c 83       	std	Y+4, r25	; 0x04
2177
     ed2:	8b 83       	std	Y+3, r24	; 0x03
2178
     ed4:	8b 81       	ldd	r24, Y+3	; 0x03
2179
     ed6:	9c 81       	ldd	r25, Y+4	; 0x04
2180
     ed8:	88 5e       	subi	r24, 0xE8	; 232
2181
     eda:	93 40       	sbci	r25, 0x03	; 3
2182
     edc:	a8 f3       	brcs	.-22     	; 0xec8 <Utility_delay+0x3a>
2183
     ede:	89 81       	ldd	r24, Y+1	; 0x01
2184
     ee0:	9a 81       	ldd	r25, Y+2	; 0x02
2185
     ee2:	01 96       	adiw	r24, 0x01	; 1
2186
     ee4:	9a 83       	std	Y+2, r25	; 0x02
2187
     ee6:	89 83       	std	Y+1, r24	; 0x01
2188
     ee8:	89 81       	ldd	r24, Y+1	; 0x01
2189
     eea:	9a 81       	ldd	r25, Y+2	; 0x02
2190
     eec:	82 17       	cp	r24, r18
2191
     eee:	93 07       	cpc	r25, r19
2192
     ef0:	20 f3       	brcs	.-56     	; 0xeba <Utility_delay+0x2c>
2193
     ef2:	24 96       	adiw	r28, 0x04	; 4
2194
     ef4:	0f b6       	in	r0, 0x3f	; 63
2195
     ef6:	f8 94       	cli
2196
     ef8:	de bf       	out	0x3e, r29	; 62
2197
     efa:	0f be       	out	0x3f, r0	; 63
2198
     efc:	cd bf       	out	0x3d, r28	; 61
2199
     efe:	df 91       	pop	r29
2200
     f00:	cf 91       	pop	r28
2201
     f02:	08 95       	ret
2202
 
2203
00000f04 <DebugInt_init>:
2204
     f04:	8e 9a       	sbi	0x11, 6	; 17
2205
     f06:	96 9a       	sbi	0x12, 6	; 18
2206
     f08:	84 ef       	ldi	r24, 0xF4	; 244
2207
     f0a:	91 e0       	ldi	r25, 0x01	; 1
2208
     f0c:	c0 df       	rcall	.-128    	; 0xe8e <Utility_delay>
2209
     f0e:	96 98       	cbi	0x12, 6	; 18
2210
     f10:	84 ef       	ldi	r24, 0xF4	; 244
2211
     f12:	91 e0       	ldi	r25, 0x01	; 1
2212
     f14:	bc df       	rcall	.-136    	; 0xe8e <Utility_delay>
2213
     f16:	96 9a       	sbi	0x12, 6	; 18
2214
     f18:	84 ef       	ldi	r24, 0xF4	; 244
2215
     f1a:	91 e0       	ldi	r25, 0x01	; 1
2216
     f1c:	b8 df       	rcall	.-144    	; 0xe8e <Utility_delay>
2217
     f1e:	96 98       	cbi	0x12, 6	; 18
2218
     f20:	84 ef       	ldi	r24, 0xF4	; 244
2219
     f22:	91 e0       	ldi	r25, 0x01	; 1
2220
     f24:	b4 df       	rcall	.-152    	; 0xe8e <Utility_delay>
2221
     f26:	96 9a       	sbi	0x12, 6	; 18
2222
     f28:	84 ef       	ldi	r24, 0xF4	; 244
2223
     f2a:	91 e0       	ldi	r25, 0x01	; 1
2224
     f2c:	b0 df       	rcall	.-160    	; 0xe8e <Utility_delay>
2225
     f2e:	96 98       	cbi	0x12, 6	; 18
2226
     f30:	84 ef       	ldi	r24, 0xF4	; 244
2227
     f32:	91 e0       	ldi	r25, 0x01	; 1
2228
     f34:	ac df       	rcall	.-168    	; 0xe8e <Utility_delay>
2229
     f36:	96 9a       	sbi	0x12, 6	; 18
2230
     f38:	08 95       	ret
2231
 
2232
00000f3a <CamIntAsm_waitForNewTrackingFrame>:
151 kaklik 2233
;		set, and the function will return.
2234
;*****************************************************************
2235
 
2236
CamIntAsm_waitForNewTrackingFrame:
2237
		sbi		_SFR_IO_ADDR(PORTD),PD6  ; For testing...
174 kaklik 2238
     f3a:	96 9a       	sbi	0x12, 6	; 18
151 kaklik 2239
		cbi		_SFR_IO_ADDR(PORTD),PD6		
174 kaklik 2240
     f3c:	96 98       	cbi	0x12, 6	; 18
151 kaklik 2241
		sleep
174 kaklik 2242
     f3e:	88 95       	sleep
2243
 
2244
00000f40 <CamIntAsm_acquireTrackingLine>:
151 kaklik 2245
 
2246
;*****************************************************************
2247
; REMEMBER...everything from here on out is critically timed to be
2248
; synchronized with the flow of pixel data from the camera...
2249
;*****************************************************************
2250
 
2251
CamIntAsm_acquireTrackingLine:
2252
		brts	_cleanUp
174 kaklik 2253
     f40:	e6 f1       	brts	.+120    	; 0xfba <_cleanUp>
151 kaklik 2254
		;sbi		_SFR_IO_ADDR(PORTD),PD6 ; For testing...
2255
		;cbi		_SFR_IO_ADDR(PORTD),PD6
2256
 
2257
        in      tmp1,_SFR_IO_ADDR(TCCR1B) ; Enable the PCLK line to actually
174 kaklik 2258
     f42:	3e b5       	in	r19, 0x2e	; 46
151 kaklik 2259
        ori     tmp1, 0x07                 ; feed Timer1
174 kaklik 2260
     f44:	37 60       	ori	r19, 0x07	; 7
151 kaklik 2261
        out     _SFR_IO_ADDR(TCCR1B),tmp1 
174 kaklik 2262
     f46:	3e bd       	out	0x2e, r19	; 46
151 kaklik 2263
										; The line is about to start...		
2264
		ldi     pixelCount,0			; Initialize the RLE stats...
174 kaklik 2265
     f48:	00 e0       	ldi	r16, 0x00	; 0
151 kaklik 2266
		ldi		pixelRunStart,PIXEL_RUN_START_INITIAL  	; Remember, we always calculate
174 kaklik 2267
     f4a:	10 e5       	ldi	r17, 0x50	; 80
151 kaklik 2268
														; the pixel run length as
2269
														; TCNT1L - pixelRunStart
2270
 
2271
		ldi		lastColor,0x00				; clear out the last color before we start
174 kaklik 2272
     f4c:	20 e0       	ldi	r18, 0x00	; 0
151 kaklik 2273
 
2274
		mov   	XH,currLineBuffHigh    	; Load the pointer to the current line
174 kaklik 2275
     f4e:	b9 2f       	mov	r27, r25
151 kaklik 2276
		mov		XL,currLineBuffLow		; buffer into the X pointer regs		 
174 kaklik 2277
     f50:	a8 2f       	mov	r26, r24
151 kaklik 2278
 
2279
		mov   	ZH,colorMapHigh      	; Load the pointers to the membership
174 kaklik 2280
     f52:	f7 2f       	mov	r31, r23
151 kaklik 2281
		mov		ZL,colorMapLow			; lookup tables (ZL and YL will be overwritten
174 kaklik 2282
     f54:	e6 2f       	mov	r30, r22
151 kaklik 2283
		mov 	YH,colorMapHigh	 		; as soon as we start reading data) to Z and Y
174 kaklik 2284
     f56:	d7 2f       	mov	r29, r23
151 kaklik 2285
 
2286
		in		tmp1, _SFR_IO_ADDR(TIMSK)			; enable TIMER1 to start counting
174 kaklik 2287
     f58:	39 b7       	in	r19, 0x39	; 57
151 kaklik 2288
		ori		tmp1, ENABLE_PCLK_TIMER1_OVERFLOW_BITMASK 	; external PCLK pulses and interrupt on 
174 kaklik 2289
     f5a:	34 60       	ori	r19, 0x04	; 4
151 kaklik 2290
		out		_SFR_IO_ADDR(TIMSK),tmp1			; overflow
174 kaklik 2291
     f5c:	39 bf       	out	0x39, r19	; 57
151 kaklik 2292
 
2293
		ldi 	tmp1,PIXEL_RUN_START_INITIAL	; set up the TCNT1 to overflow (and
174 kaklik 2294
     f5e:	30 e5       	ldi	r19, 0x50	; 80
151 kaklik 2295
		ldi 	tmp2,0xFF 						; interrupts) after 176 pixels		
174 kaklik 2296
     f60:	4f ef       	ldi	r20, 0xFF	; 255
151 kaklik 2297
		out 	_SFR_IO_ADDR(TCNT1H),tmp2		
174 kaklik 2298
     f62:	4d bd       	out	0x2d, r20	; 45
151 kaklik 2299
		out 	_SFR_IO_ADDR(TCNT1L),tmp1				
174 kaklik 2300
     f64:	3c bd       	out	0x2c, r19	; 44
151 kaklik 2301
 
2302
		mov		YL,colorMapLow		
174 kaklik 2303
     f66:	c6 2f       	mov	r28, r22
151 kaklik 2304
 
2305
		in 		tmp1, _SFR_IO_ADDR(GICR)	; enable the HREF interrupt...remember, we
174 kaklik 2306
     f68:	3b b7       	in	r19, 0x3b	; 59
151 kaklik 2307
											; only use this interrupt to synchronize
2308
											; the beginning of the line
2309
		ori 	tmp1, HREF_INTERRUPT_ENABLE_MASK
174 kaklik 2310
     f6a:	30 68       	ori	r19, 0x80	; 128
151 kaklik 2311
		out		_SFR_IO_ADDR(GICR), tmp1
174 kaklik 2312
     f6c:	3b bf       	out	0x3b, r19	; 59
2313
 
2314
00000f6e <_trackFrame>:
151 kaklik 2315
 
2316
;*******************************************************************************************
2317
;   Track Frame handler 
2318
;*******************************************************************************************		
2319
 
2320
_trackFrame:		
2321
		sbi		_SFR_IO_ADDR(PORTD),PD6
174 kaklik 2322
     f6e:	96 9a       	sbi	0x12, 6	; 18
151 kaklik 2323
		sleep   ; ...And we wait...
174 kaklik 2324
     f70:	88 95       	sleep
151 kaklik 2325
 
2326
	; Returning from the interrupt/sleep wakeup will consume
2327
	; 14 clock cycles (7 to wakeup from idle sleep, 3 to vector, and 4 to return)	
2328
 
2329
	; Disable the HREF interrupt
2330
		cbi		_SFR_IO_ADDR(PORTD),PD6
174 kaklik 2331
     f72:	96 98       	cbi	0x12, 6	; 18
151 kaklik 2332
		in 		tmp1, _SFR_IO_ADDR(GICR)
174 kaklik 2333
     f74:	3b b7       	in	r19, 0x3b	; 59
151 kaklik 2334
		andi 	tmp1, HREF_INTERRUPT_DISABLE_MASK
174 kaklik 2335
     f76:	3f 77       	andi	r19, 0x7F	; 127
151 kaklik 2336
		out		_SFR_IO_ADDR(GICR), tmp1
174 kaklik 2337
     f78:	3b bf       	out	0x3b, r19	; 59
151 kaklik 2338
 
2339
	; A couple of NOPs are needed here to sync up the pixel data...the number (2)
2340
	; of NOPs was determined emperically by trial and error.
2341
		nop
174 kaklik 2342
     f7a:	00 00       	nop
2343
	...
2344
 
2345
00000f7e <_acquirePixelBlock>:
151 kaklik 2346
		nop
2347
_acquirePixelBlock:							;							Clock Cycle Count
2348
		in		ZL,RB_PORT         			; sample the red value (PINB)		(1)
174 kaklik 2349
     f7e:	e6 b3       	in	r30, 0x16	; 22
151 kaklik 2350
		in		YL,G_PORT         			; sample the green value (PINC)		(1)
174 kaklik 2351
     f80:	c3 b3       	in	r28, 0x13	; 19
151 kaklik 2352
		andi	YL,0x0F            			; clear the high nibble				(1)
174 kaklik 2353
     f82:	cf 70       	andi	r28, 0x0F	; 15
151 kaklik 2354
		ldd		color,Z+RED_MEM_OFFSET  	; lookup the red membership			(2)
174 kaklik 2355
     f84:	30 81       	ld	r19, Z
151 kaklik 2356
		in		ZL,RB_PORT         			; sample the blue value (PINB)		(1)
174 kaklik 2357
     f86:	e6 b3       	in	r30, 0x16	; 22
151 kaklik 2358
		ldd		greenData,Y+GREEN_MEM_OFFSET; lookup the green membership		(2)
174 kaklik 2359
     f88:	48 89       	ldd	r20, Y+16	; 0x10
151 kaklik 2360
		ldd		blueData,Z+BLUE_MEM_OFFSET	; lookup the blue membership		(2)
174 kaklik 2361
     f8a:	50 a1       	ldd	r21, Z+32	; 0x20
151 kaklik 2362
		and		color,greenData 			; mask memberships together			(1)
174 kaklik 2363
     f8c:	34 23       	and	r19, r20
151 kaklik 2364
		and		color,blueData  			; to produce the final color		(1)
174 kaklik 2365
     f8e:	35 23       	and	r19, r21
151 kaklik 2366
		brts    _cleanUpTrackingLine		; if some interrupt routine has		(1...not set)
174 kaklik 2367
     f90:	76 f0       	brts	.+28     	; 0xfae <_cleanUpTrackingLine>
151 kaklik 2368
											; come in and set our T flag in 
2369
											; SREG, then we need to hop out
2370
											; and blow away this frames data (common cleanup)									
2371
		cp		color,lastColor     		; check to see if the run continues	(1)
174 kaklik 2372
     f92:	32 17       	cp	r19, r18
151 kaklik 2373
		breq    _acquirePixelBlock  		;									(2...equal)
174 kaklik 2374
     f94:	a1 f3       	breq	.-24     	; 0xf7e <_acquirePixelBlock>
151 kaklik 2375
											;									___________
2376
											;								16 clock cycles 		
2377
											; (16 clock cycles = 1 uS = 1 pixelBlock time)
2378
 
2379
		; Toggle the debug line to indicate a color change
2380
		sbi     _SFR_IO_ADDR(PORTD),PD6
174 kaklik 2381
     f96:	96 9a       	sbi	0x12, 6	; 18
151 kaklik 2382
		nop
174 kaklik 2383
     f98:	00 00       	nop
151 kaklik 2384
		cbi		_SFR_IO_ADDR(PORTD),PD6
174 kaklik 2385
     f9a:	96 98       	cbi	0x12, 6	; 18
151 kaklik 2386
 
2387
		mov		tmp2,pixelRunStart				; get the count value of the
174 kaklik 2388
     f9c:	41 2f       	mov	r20, r17
151 kaklik 2389
												; current pixel run
2390
		in		pixelCount,_SFR_IO_ADDR(TCNT1L)	; get the current TCNT1 value 
174 kaklik 2391
     f9e:	0c b5       	in	r16, 0x2c	; 44
151 kaklik 2392
		mov   	pixelRunStart,pixelCount		; reload pixelRunStart for the
174 kaklik 2393
     fa0:	10 2f       	mov	r17, r16
151 kaklik 2394
												; next run
2395
		sub		pixelCount,tmp2     			; pixelCount = TCNT1L - pixelRunStart
174 kaklik 2396
     fa2:	04 1b       	sub	r16, r20
151 kaklik 2397
 
2398
		st		X+,lastColor			; record the color run in the current line buffer
174 kaklik 2399
     fa4:	2d 93       	st	X+, r18
151 kaklik 2400
		st		X+,pixelCount			; with its length
174 kaklik 2401
     fa6:	0d 93       	st	X+, r16
151 kaklik 2402
		mov		lastColor,color			; set lastColor so we can figure out when it changes
174 kaklik 2403
     fa8:	23 2f       	mov	r18, r19
151 kaklik 2404
 
2405
		nop								; waste one more cycle for a total of 16
174 kaklik 2406
     faa:	00 00       	nop
151 kaklik 2407
		rjmp	_acquirePixelBlock	
174 kaklik 2408
     fac:	e8 cf       	rjmp	.-48     	; 0xf7e <_acquirePixelBlock>
2409
 
2410
00000fae <_cleanUpTrackingLine>:
151 kaklik 2411
 
2412
; _cleanUpTrackingLine is used to write the last run length block off to the currentLineBuffer so
2413
; that all 176 pixels in the line are accounted for.
2414
_cleanUpTrackingLine:		
2415
		ldi		pixelCount,0xFF		; the length of the last run is ALWAYS 0xFF minus the last
174 kaklik 2416
     fae:	0f ef       	ldi	r16, 0xFF	; 255
151 kaklik 2417
		sub		pixelCount,pixelRunStart  	; pixelRunStart
174 kaklik 2418
     fb0:	01 1b       	sub	r16, r17
151 kaklik 2419
 
2420
		inc		pixelCount				; increment pixelCount since we actually need to account
174 kaklik 2421
     fb2:	03 95       	inc	r16
151 kaklik 2422
										; for the overflow of TCNT1
2423
 
2424
		st		X+,color				; record the color run in the current line buffer
174 kaklik 2425
     fb4:	3d 93       	st	X+, r19
151 kaklik 2426
		st		X,pixelCount		
174 kaklik 2427
     fb6:	0c 93       	st	X, r16
151 kaklik 2428
		rjmp	_cleanUp
174 kaklik 2429
     fb8:	00 c0       	rjmp	.+0      	; 0xfba <_cleanUp>
2430
 
2431
00000fba <_cleanUp>:
151 kaklik 2432
 
2433
_cleanUpDumpLine:		
2434
		; NOTE: If serial data is received, to interrupt the tracking of a line, we'll
2435
		; get a EV_SERIAL_DATA_RECEIVED event, and the T bit set so we will end the
2436
		; line's processing...however, the PCLK will keep on ticking for the rest of
2437
		; the frame/line, which will cause the TCNT to eventually overflow and
2438
		; interrupt us, generating a EV_ACQUIRE_LINE_COMPLETE event.  We don't want
2439
		; this, so we need to actually turn off the PCLK counting each time we exit
2440
		; this loop, and only turn it on when we begin acquiring lines....
2441
        ; NOT NEEDED FOR NOW...
2442
		;in		tmp1, _SFR_IO_ADDR(TIMSK)			; disable TIMER1 to stop counting
2443
		;andi	tmp1, DISABLE_PCLK_TIMER1_OVERFLOW_BITMASK 	; external PCLK pulses
2444
		;out		_SFR_IO_ADDR(TIMSK),tmp1
2445
 
2446
_cleanUp:
2447
        ; Disable the external clocking of the Timer1 counter 
2448
        in      tmp1, _SFR_IO_ADDR(TCCR1B)
174 kaklik 2449
     fba:	3e b5       	in	r19, 0x2e	; 46
151 kaklik 2450
        andi    tmp1, 0xF8
174 kaklik 2451
     fbc:	38 7f       	andi	r19, 0xF8	; 248
151 kaklik 2452
        out     _SFR_IO_ADDR(TCCR1B),tmp1
174 kaklik 2453
     fbe:	3e bd       	out	0x2e, r19	; 46
151 kaklik 2454
 
2455
		; Toggle the debug line to indicate the line is complete
2456
		sbi     _SFR_IO_ADDR(PORTD),PD6
174 kaklik 2457
     fc0:	96 9a       	sbi	0x12, 6	; 18
151 kaklik 2458
		cbi		_SFR_IO_ADDR(PORTD),PD6
174 kaklik 2459
     fc2:	96 98       	cbi	0x12, 6	; 18
151 kaklik 2460
		clt				; clear out the T bit since we have detected
174 kaklik 2461
     fc4:	e8 94       	clt
2462
 
2463
00000fc6 <_exit>:
151 kaklik 2464
						; the interruption and are exiting to handle it
2465
_exit:
2466
		ret
174 kaklik 2467
     fc6:	08 95       	ret
2468
 
2469
00000fc8 <CamIntAsm_waitForNewDumpFrame>:
151 kaklik 2470
 
2471
;*****************************************************************		
2472
;   	Function Name: CamIntAsm_waitForNewDumpFrame
2473
;       Function Description: This function is responsible for
2474
;       going to sleep until a new frame begins (indicated by
2475
;    	VSYNC transitioning from low to high.  This will wake
2476
;       the "VSYNC sleep" up and allow it to continue with 
2477
;       acquiring a line of pixel data to dump out to the UI.
2478
;       Inputs:  r25 - MSB of currentLineBuffer
2479
;                r24 - LSB of currentLineBuffer
2480
;				 r23 - MSB of prevLineBuffer
2481
;				 r22 - LSB of prevLineBuffer
2482
;       Outputs: none
2483
;       NOTES: This function doesn't really return...it sorta just
2484
;       floats into the acquireDumpLine function after the "VSYNC sleep"
2485
;       is awoken.
2486
;*****************************************************************		
2487
CamIntAsm_waitForNewDumpFrame:
2488
		sbi		_SFR_IO_ADDR(PORTD),PD6  ; For testing...
174 kaklik 2489
     fc8:	96 9a       	sbi	0x12, 6	; 18
151 kaklik 2490
		cbi		_SFR_IO_ADDR(PORTD),PD6
174 kaklik 2491
     fca:	96 98       	cbi	0x12, 6	; 18
151 kaklik 2492
		sleep
174 kaklik 2493
     fcc:	88 95       	sleep
2494
 
2495
00000fce <CamIntAsm_acquireDumpLine>:
151 kaklik 2496
 
2497
;*****************************************************************
2498
; REMEMBER...everything from here on out is critically timed to be
2499
; synchronized with the flow of pixel data from the camera...
2500
;*****************************************************************
2501
 
2502
CamIntAsm_acquireDumpLine:
2503
		brts	_cleanUp
174 kaklik 2504
     fce:	ae f3       	brts	.-22     	; 0xfba <_cleanUp>
151 kaklik 2505
		;sbi		_SFR_IO_ADDR(PORTD),PD6 ; For testing...
2506
		;cbi		_SFR_IO_ADDR(PORTD),PD6
2507
 
2508
		mov   	XH,currLineBuffHigh    	; Load the pointer to the current line
174 kaklik 2509
     fd0:	b9 2f       	mov	r27, r25
151 kaklik 2510
		mov		XL,currLineBuffLow		; buffer into the X pointer regs
174 kaklik 2511
     fd2:	a8 2f       	mov	r26, r24
151 kaklik 2512
 
2513
		mov		YH,prevLineBuffHigh		; Load the pointer to the previous line
174 kaklik 2514
     fd4:	d7 2f       	mov	r29, r23
151 kaklik 2515
		mov		YL,prevLineBuffLow  	; buffer into the Y pointer regs
174 kaklik 2516
     fd6:	c6 2f       	mov	r28, r22
151 kaklik 2517
 
2518
		ldi 	tmp1,PIXEL_RUN_START_INITIAL	; set up the TCNT1 to overflow (and
174 kaklik 2519
     fd8:	30 e5       	ldi	r19, 0x50	; 80
151 kaklik 2520
		ldi 	tmp2,0xFF 						; interrupts) after 176 pixels		
174 kaklik 2521
     fda:	4f ef       	ldi	r20, 0xFF	; 255
151 kaklik 2522
		out 	_SFR_IO_ADDR(TCNT1H),tmp2		
174 kaklik 2523
     fdc:	4d bd       	out	0x2d, r20	; 45
151 kaklik 2524
		out 	_SFR_IO_ADDR(TCNT1L),tmp1		
174 kaklik 2525
     fde:	3c bd       	out	0x2c, r19	; 44
151 kaklik 2526
 
2527
        in      tmp1, _SFR_IO_ADDR(TCCR1B) ; Enable the PCLK line to actually
174 kaklik 2528
     fe0:	3e b5       	in	r19, 0x2e	; 46
151 kaklik 2529
        ori     tmp1, 0x07                 ; feed Timer1
174 kaklik 2530
     fe2:	37 60       	ori	r19, 0x07	; 7
151 kaklik 2531
        out     _SFR_IO_ADDR(TCCR1B),tmp1
174 kaklik 2532
     fe4:	3e bd       	out	0x2e, r19	; 46
151 kaklik 2533
        nop
174 kaklik 2534
     fe6:	00 00       	nop
151 kaklik 2535
 
2536
		in		tmp1, _SFR_IO_ADDR(TIMSK)			; enable TIMER1 to start counting
174 kaklik 2537
     fe8:	39 b7       	in	r19, 0x39	; 57
151 kaklik 2538
		ori		tmp1, ENABLE_PCLK_TIMER1_OVERFLOW_BITMASK 	; external PCLK pulses and interrupt on 
174 kaklik 2539
     fea:	34 60       	ori	r19, 0x04	; 4
151 kaklik 2540
		out		_SFR_IO_ADDR(TIMSK),tmp1			; overflow			
174 kaklik 2541
     fec:	39 bf       	out	0x39, r19	; 57
151 kaklik 2542
 
2543
		in 		tmp1, _SFR_IO_ADDR(GICR)	; enable the HREF interrupt...remember, we
174 kaklik 2544
     fee:	3b b7       	in	r19, 0x3b	; 59
151 kaklik 2545
											; only use this interrupt to synchronize
2546
											; the beginning of the line
2547
		ori 	tmp1, HREF_INTERRUPT_ENABLE_MASK
174 kaklik 2548
     ff0:	30 68       	ori	r19, 0x80	; 128
151 kaklik 2549
		out		_SFR_IO_ADDR(GICR), tmp1
174 kaklik 2550
     ff2:	3b bf       	out	0x3b, r19	; 59
2551
 
2552
00000ff4 <_dumpFrame>:
151 kaklik 2553
 
2554
;*******************************************************************************************
2555
;   Dump Frame handler 
2556
;*******************************************************************************************		
2557
 
2558
_dumpFrame:		
2559
		sbi		_SFR_IO_ADDR(PORTD),PD6
174 kaklik 2560
     ff4:	96 9a       	sbi	0x12, 6	; 18
151 kaklik 2561
		sleep   ; ...And we wait...
174 kaklik 2562
     ff6:	88 95       	sleep
151 kaklik 2563
 
2564
		cbi		_SFR_IO_ADDR(PORTD),PD6
174 kaklik 2565
     ff8:	96 98       	cbi	0x12, 6	; 18
151 kaklik 2566
		in 		tmp1, _SFR_IO_ADDR(GICR)			; disable the HREF interrupt
174 kaklik 2567
     ffa:	3b b7       	in	r19, 0x3b	; 59
151 kaklik 2568
		andi 	tmp1, HREF_INTERRUPT_DISABLE_MASK  	; so we don't get interrupted
174 kaklik 2569
     ffc:	3f 77       	andi	r19, 0x7F	; 127
151 kaklik 2570
		out		_SFR_IO_ADDR(GICR), tmp1			; while dumping the line
174 kaklik 2571
     ffe:	3b bf       	out	0x3b, r19	; 59
2572
	...
2573
 
2574
00001002 <_sampleDumpPixel>:
151 kaklik 2575
 
2576
		nop		; Remember...if we ever remove the "cbi" instruction above,
2577
				; we need to add two more NOPs to cover this
2578
 
2579
; Ok...the following loop needs to run in 8 clock cycles, so we can get every
2580
; pixel in the line...this shouldn't be a problem, since the PCLK timing was
2581
; reduced by a factor of 2 whenever we go to dump a line (this is to give us
2582
; enough time to do the sampling and storing of the pixel data).  In addition,
2583
; it is assumed that we will have to do some minor processing on the data right
2584
; before we send it out, like mask off the top 4-bits of each, and then pack both
2585
; low nibbles into a single byte for transmission...we just don't have time to
2586
; do that here (only 8 instruction cycles :-)  )
2587
_sampleDumpPixel:
2588
		in		tmp1,G_PORT				; sample the G value					(1)
174 kaklik 2589
    1002:	33 b3       	in	r19, 0x13	; 19
151 kaklik 2590
		in		tmp2,RB_PORT			; sample the R/B value					(1)
174 kaklik 2591
    1004:	46 b3       	in	r20, 0x16	; 22
151 kaklik 2592
		st		X+,tmp1					; store to the currLineBuff and inc ptrs(2)
174 kaklik 2593
    1006:	3d 93       	st	X+, r19
151 kaklik 2594
		st		Y+,tmp2					; store to the prevLineBuff and inc ptrs(2)
174 kaklik 2595
    1008:	49 93       	st	Y+, r20
151 kaklik 2596
		brtc	_sampleDumpPixel		; loop back unless flag is set			(2...if not set)
174 kaklik 2597
    100a:	de f7       	brtc	.-10     	; 0x1002 <_sampleDumpPixel>
151 kaklik 2598
										;									___________
2599
										;									8 cycles normally
2600
 
2601
		; if we make it here, it means the T flag is set, and we must have been interrupted
2602
		; so we need to exit (what if we were interrupted for serial? should we disable it?)
2603
		rjmp	_cleanUpDumpLine
174 kaklik 2604
    100c:	d6 cf       	rjmp	.-84     	; 0xfba <_cleanUp>
2605
 
2606
0000100e <__vector_1>:
151 kaklik 2607
 
2608
;***********************************************************
2609
;	Function Name: <interrupt handler for External Interrupt0> 
2610
;	Function Description: This function is responsible
2611
;	for handling a rising edge on the Ext Interrupt 0.  This
2612
;	routine simply returns, since we just want to wake up
2613
;	whenever the VSYNC transitions (meaning the start of a new
2614
;	frame).
2615
;	Inputs:  none
2616
;	Outputs: none
2617
;***********************************************************
2618
SIG_INTERRUPT0:
2619
; This will wake us up when VSYNC transitions high...we just want to return
2620
		reti
174 kaklik 2621
    100e:	18 95       	reti
2622
 
2623
00001010 <__vector_2>:
151 kaklik 2624
 
2625
;***********************************************************
2626
;	Function Name: <interrupt handler for External Interrupt1> 
2627
;	Function Description: This function is responsible
2628
;	for handling a falling edge on the Ext Interrupt 1.  This
2629
;	routine simply returns, since we just want to wake up
2630
;	whenever the HREF transitions (meaning the pixels 
2631
;	are starting after VSYNC transitioned, and we need to
2632
; 	start acquiring the pixel blocks
2633
;	Inputs:  none
2634
;	Outputs: none
2635
;***********************************************************	
2636
SIG_INTERRUPT1:
2637
; This will wake us up when HREF transitions high...we just want to return
2638
		reti
174 kaklik 2639
    1010:	18 95       	reti
2640
 
2641
00001012 <__vector_8>:
151 kaklik 2642
 
2643
;***********************************************************
2644
;	Function Name: <interrupt handler for Timer0 overflow>
2645
;	Function Description: This function is responsible
2646
;	for handling the Timer0 overflow (hooked up to indicate
2647
;	when we have reached the number of HREFs required in a
2648
;	single frame).  We set the T flag in the SREG to
2649
;	indicate to the _acquirePixelBlock routine that it needs
2650
;	to exit, and then set the appropriate action to take in
2651
;	the eventList of the Executive module.
2652
;	Inputs:  none
2653
;	Outputs: none
2654
;   Note: Originally, the HREF pulses were also going to
2655
;   be counted by a hardware counter, but it didn't end up
2656
;   being necessary
2657
;***********************************************************
2658
;SIG_OVERFLOW0:
2659
;		set				; set the T bit in SREG
2660
;		lds		tmp1,eventBitmask
2661
;		ori		tmp1,EV_ACQUIRE_FRAME_COMPLETE
2662
;		sts		eventBitmask,tmp1
2663
;		reti
2664
 
2665
;***********************************************************
2666
;	Function Name: <interrupt handler for Timer1 overflow>
2667
;	Function Description: This function is responsible
2668
;	for handling the Timer1 overflow (hooked up to indicate
2669
;	when we have reached the end of a line of pixel data,
2670
;	since PCLK is hooked up to overflow TCNT1 after 176 
2671
;	pixels).  This routine generates an acquire line complete
2672
;	event in the fastEventBitmask, which is streamlined for
2673
;	efficiency reasons.
2674
;***********************************************************
2675
SIG_OVERFLOW1:				
2676
		lds		tmp1,fastEventBitmask   		; set a flag indicating
174 kaklik 2677
    1012:	30 91 72 00 	lds	r19, 0x0072
151 kaklik 2678
		ori		tmp1,FEV_ACQUIRE_LINE_COMPLETE	; a line is complete
174 kaklik 2679
    1016:	31 60       	ori	r19, 0x01	; 1
151 kaklik 2680
		sts		fastEventBitmask,tmp1
174 kaklik 2681
    1018:	30 93 72 00 	sts	0x0072, r19
151 kaklik 2682
		set		; set the T bit in SREG 
174 kaklik 2683
    101c:	68 94       	set
151 kaklik 2684
		;sbi		_SFR_IO_ADDR(PORTD),PD6 ; For testing...
2685
		;cbi		_SFR_IO_ADDR(PORTD),PD6 ; For testing...
2686
 
2687
		reti
174 kaklik 2688
    101e:	18 95       	reti
2689
 
2690
00001020 <__vector_default>:
151 kaklik 2691
 
2692
; This is the default handler for all interrupts that don't
2693
; have handler routines specified for them.
2694
        .global __vector_default              
2695
__vector_default:
2696
        reti
174 kaklik 2697
    1020:	18 95       	reti
2698
 
2699
00001022 <atoi>:
2700
    1022:	fc 01       	movw	r30, r24
2701
    1024:	88 27       	eor	r24, r24
2702
    1026:	99 27       	eor	r25, r25
2703
    1028:	e8 94       	clt
2704
    102a:	21 91       	ld	r18, Z+
2705
    102c:	22 23       	and	r18, r18
2706
    102e:	e9 f0       	breq	.+58     	; 0x106a <atoi+0x48>
2707
    1030:	20 32       	cpi	r18, 0x20	; 32
2708
    1032:	d9 f3       	breq	.-10     	; 0x102a <atoi+0x8>
2709
    1034:	29 30       	cpi	r18, 0x09	; 9
2710
    1036:	c9 f3       	breq	.-14     	; 0x102a <atoi+0x8>
2711
    1038:	2a 30       	cpi	r18, 0x0A	; 10
2712
    103a:	b9 f3       	breq	.-18     	; 0x102a <atoi+0x8>
2713
    103c:	2c 30       	cpi	r18, 0x0C	; 12
2714
    103e:	a9 f3       	breq	.-22     	; 0x102a <atoi+0x8>
2715
    1040:	2d 30       	cpi	r18, 0x0D	; 13
2716
    1042:	99 f3       	breq	.-26     	; 0x102a <atoi+0x8>
2717
    1044:	26 37       	cpi	r18, 0x76	; 118
2718
    1046:	89 f3       	breq	.-30     	; 0x102a <atoi+0x8>
2719
    1048:	2b 32       	cpi	r18, 0x2B	; 43
2720
    104a:	19 f0       	breq	.+6      	; 0x1052 <atoi+0x30>
2721
    104c:	2d 32       	cpi	r18, 0x2D	; 45
2722
    104e:	21 f4       	brne	.+8      	; 0x1058 <atoi+0x36>
2723
    1050:	68 94       	set
2724
    1052:	21 91       	ld	r18, Z+
2725
    1054:	22 23       	and	r18, r18
2726
    1056:	49 f0       	breq	.+18     	; 0x106a <atoi+0x48>
2727
    1058:	20 33       	cpi	r18, 0x30	; 48
2728
    105a:	3c f0       	brlt	.+14     	; 0x106a <atoi+0x48>
2729
    105c:	2a 33       	cpi	r18, 0x3A	; 58
2730
    105e:	2c f4       	brge	.+10     	; 0x106a <atoi+0x48>
2731
    1060:	20 53       	subi	r18, 0x30	; 48
2732
    1062:	0b d0       	rcall	.+22     	; 0x107a <__mulhi_const_10>
2733
    1064:	82 0f       	add	r24, r18
2734
    1066:	91 1d       	adc	r25, r1
2735
    1068:	f4 cf       	rjmp	.-24     	; 0x1052 <atoi+0x30>
2736
    106a:	81 15       	cp	r24, r1
2737
    106c:	91 05       	cpc	r25, r1
2738
    106e:	21 f0       	breq	.+8      	; 0x1078 <atoi+0x56>
2739
    1070:	1e f4       	brtc	.+6      	; 0x1078 <atoi+0x56>
2740
    1072:	80 95       	com	r24
2741
    1074:	90 95       	com	r25
2742
    1076:	01 96       	adiw	r24, 0x01	; 1
2743
    1078:	08 95       	ret
2744
 
2745
0000107a <__mulhi_const_10>:
2746
    107a:	7a e0       	ldi	r23, 0x0A	; 10
2747
    107c:	97 9f       	mul	r25, r23
2748
    107e:	90 2d       	mov	r25, r0
2749
    1080:	87 9f       	mul	r24, r23
2750
    1082:	80 2d       	mov	r24, r0
2751
    1084:	91 0d       	add	r25, r1
2752
    1086:	11 24       	eor	r1, r1
2753
    1088:	08 95       	ret
2754
 
2755
0000108a <__eeprom_read_byte_1C1D1E>:
2756
    108a:	e1 99       	sbic	0x1c, 1	; 28
2757
    108c:	fe cf       	rjmp	.-4      	; 0x108a <__eeprom_read_byte_1C1D1E>
2758
    108e:	bf bb       	out	0x1f, r27	; 31
2759
    1090:	ae bb       	out	0x1e, r26	; 30
2760
    1092:	e0 9a       	sbi	0x1c, 0	; 28
2761
    1094:	11 96       	adiw	r26, 0x01	; 1
2762
    1096:	0d b2       	in	r0, 0x1d	; 29
2763
    1098:	08 95       	ret
2764
 
2765
0000109a <__eeprom_read_block_1C1D1E>:
2766
    109a:	f7 df       	rcall	.-18     	; 0x108a <__eeprom_read_byte_1C1D1E>
2767
    109c:	01 92       	st	Z+, r0
2768
    109e:	1a 94       	dec	r1
2769
    10a0:	e1 f7       	brne	.-8      	; 0x109a <__eeprom_read_block_1C1D1E>
2770
    10a2:	08 95       	ret
2771
 
2772
000010a4 <__eeprom_write_byte_1C1D1E>:
2773
    10a4:	e1 99       	sbic	0x1c, 1	; 28
2774
    10a6:	fe cf       	rjmp	.-4      	; 0x10a4 <__eeprom_write_byte_1C1D1E>
2775
    10a8:	bf bb       	out	0x1f, r27	; 31
2776
    10aa:	ae bb       	out	0x1e, r26	; 30
2777
    10ac:	0d ba       	out	0x1d, r0	; 29
2778
    10ae:	11 96       	adiw	r26, 0x01	; 1
2779
    10b0:	0f b6       	in	r0, 0x3f	; 63
2780
    10b2:	f8 94       	cli
2781
    10b4:	e2 9a       	sbi	0x1c, 2	; 28
2782
    10b6:	e1 9a       	sbi	0x1c, 1	; 28
2783
    10b8:	0f be       	out	0x3f, r0	; 63
2784
    10ba:	08 95       	ret
2785
 
2786
000010bc <_exit>:
2787
    10bc:	ff cf       	rjmp	.-2      	; 0x10bc <_exit>