Subversion Repositories svnkaklik

Rev

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