Subversion Repositories svnkaklik

Rev

Rev 410 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 410 Rev 484
1
GAS LISTING /tmp/ccQRbLT3.s 			page 1
1
GAS LISTING /tmp/cc0XjEMJ.s 			page 1
2
 
2
 
3
 
3
 
4
   1               		.file	"FrameMgr.c"
4
   1               		.file	"FrameMgr.c"
5
   2               		.arch atmega8
-
 
6
   3               	__SREG__ = 0x3f
5
   2               	__SREG__ = 0x3f
7
   4               	__SP_H__ = 0x3e
6
   3               	__SP_H__ = 0x3e
8
   5               	__SP_L__ = 0x3d
7
   4               	__SP_L__ = 0x3d
9
   6               	__tmp_reg__ = 0
8
   5               	__tmp_reg__ = 0
10
   7               	__zero_reg__ = 1
9
   6               	__zero_reg__ = 1
11
   8               		.global __do_copy_data
10
   7               		.global __do_copy_data
12
   9               		.global __do_clear_bss
11
   8               		.global __do_clear_bss
13
  10               		.stabs	"/home/kaklik/projects/programy/Atmel_C/AVRcam/",100,0,2,.Ltext0
12
   9               		.stabs	"/home/kaklik/projects/programy/C/avr/AVRcam/",100,0,2,.Ltext0
14
  11               		.stabs	"FrameMgr.c",100,0,2,.Ltext0
13
  10               		.stabs	"FrameMgr.c",100,0,2,.Ltext0
15
  12               		.text
14
  11               		.text
16
  13               	.Ltext0:
15
  12               	.Ltext0:
17
  14               		.stabs	"gcc2_compiled.",60,0,0,0
16
  13               		.stabs	"gcc2_compiled.",60,0,0,0
18
  15               		.stabs	"int:t(0,1)=r(0,1);-32768;32767;",128,0,0,0
17
  14               		.stabs	"int:t(0,1)=r(0,1);-32768;32767;",128,0,0,0
19
  16               		.stabs	"char:t(0,2)=@s8;r(0,2);0;255;",128,0,0,0
18
  15               		.stabs	"char:t(0,2)=@s8;r(0,2);0;255;",128,0,0,0
20
  17               		.stabs	"long int:t(0,3)=@s32;r(0,3);020000000000;017777777777;",128,0,0,0
19
  16               		.stabs	"long int:t(0,3)=@s32;r(0,3);020000000000;017777777777;",128,0,0,0
21
  18               		.stabs	"unsigned int:t(0,4)=r(0,4);0;0177777;",128,0,0,0
20
  17               		.stabs	"unsigned int:t(0,4)=r(0,4);0;0177777;",128,0,0,0
22
  19               		.stabs	"long unsigned int:t(0,5)=@s32;r(0,5);0;037777777777;",128,0,0,0
21
  18               		.stabs	"long unsigned int:t(0,5)=@s32;r(0,5);0;037777777777;",128,0,0,0
23
  20               		.stabs	"long long int:t(0,6)=@s64;r(0,6);01000000000000000000000;0777777777777777777777;",128,0,0,
22
  19               		.stabs	"long long int:t(0,6)=@s64;r(0,6);01000000000000000000000;0777777777777777777777;",128,0,0,
24
  21               		.stabs	"long long unsigned int:t(0,7)=@s64;r(0,7);0;01777777777777777777777;",128,0,0,0
23
  20               		.stabs	"long long unsigned int:t(0,7)=@s64;r(0,7);0;01777777777777777777777;",128,0,0,0
25
  22               		.stabs	"short int:t(0,8)=r(0,8);-32768;32767;",128,0,0,0
24
  21               		.stabs	"short int:t(0,8)=r(0,8);-32768;32767;",128,0,0,0
26
  23               		.stabs	"short unsigned int:t(0,9)=r(0,9);0;0177777;",128,0,0,0
25
  22               		.stabs	"short unsigned int:t(0,9)=r(0,9);0;0177777;",128,0,0,0
27
  24               		.stabs	"signed char:t(0,10)=@s8;r(0,10);-128;127;",128,0,0,0
26
  23               		.stabs	"signed char:t(0,10)=@s8;r(0,10);-128;127;",128,0,0,0
28
  25               		.stabs	"unsigned char:t(0,11)=@s8;r(0,11);0;255;",128,0,0,0
27
  24               		.stabs	"unsigned char:t(0,11)=@s8;r(0,11);0;255;",128,0,0,0
29
  26               		.stabs	"float:t(0,12)=r(0,1);4;0;",128,0,0,0
28
  25               		.stabs	"float:t(0,12)=r(0,1);4;0;",128,0,0,0
30
  27               		.stabs	"double:t(0,13)=r(0,1);4;0;",128,0,0,0
29
  26               		.stabs	"double:t(0,13)=r(0,1);4;0;",128,0,0,0
31
  28               		.stabs	"long double:t(0,14)=r(0,1);4;0;",128,0,0,0
30
  27               		.stabs	"long double:t(0,14)=r(0,1);4;0;",128,0,0,0
32
  29               		.stabs	"void:t(0,15)=(0,15)",128,0,0,0
31
  28               		.stabs	"void:t(0,15)=(0,15)",128,0,0,0
33
  30               		.stabs	"/usr/lib/gcc/avr/4.1.0/../../../../avr/include/stdlib.h",130,0,0,0
32
  29               		.stabs	"/usr/lib/gcc/avr/4.2.1/../../../../avr/include/stdlib.h",130,0,0,0
34
  31               		.stabs	"/usr/lib/gcc/avr/4.1.0/include/stddef.h",130,0,0,0
33
  30               		.stabs	"/usr/lib/gcc/avr/4.2.1/include/stddef.h",130,0,0,0
35
  32               		.stabs	"size_t:t(2,1)=(0,4)",128,0,214,0
34
  31               		.stabs	"size_t:t(2,1)=(0,4)",128,0,214,0
36
  33               		.stabs	"wchar_t:t(2,2)=(0,1)",128,0,326,0
35
  32               		.stabs	"wchar_t:t(2,2)=(0,1)",128,0,326,0
37
  34               		.stabn	162,0,0,0
36
  33               		.stabn	162,0,0,0
38
  35               		.stabs	"div_t:t(1,1)=(1,2)=s4quot:(0,1),0,16;rem:(0,1),16,16;;",128,0,69,0
37
  34               		.stabs	"div_t:t(1,1)=(1,2)=s4quot:(0,1),0,16;rem:(0,1),16,16;;",128,0,69,0
39
  36               		.stabs	"ldiv_t:t(1,3)=(1,4)=s8quot:(0,3),0,32;rem:(0,3),32,32;;",128,0,75,0
38
  35               		.stabs	"ldiv_t:t(1,3)=(1,4)=s8quot:(0,3),0,32;rem:(0,3),32,32;;",128,0,75,0
40
  37               		.stabs	"__compar_fn_t:t(1,5)=(1,6)=*(1,7)=f(0,1)",128,0,78,0
39
  36               		.stabs	"__compar_fn_t:t(1,5)=(1,6)=*(1,7)=f(0,1)",128,0,78,0
41
  38               		.stabn	162,0,0,0
40
  37               		.stabn	162,0,0,0
42
  39               		.stabs	"/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/io.h",130,0,0,0
41
  38               		.stabs	"/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/io.h",130,0,0,0
43
  40               		.stabs	"/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/sfr_defs.h",130,0,0,0
42
  39               		.stabs	"/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/sfr_defs.h",130,0,0,0
44
  41               		.stabs	"/usr/lib/gcc/avr/4.1.0/../../../../avr/include/inttypes.h",130,0,0,0
43
  40               		.stabs	"/usr/lib/gcc/avr/4.2.1/../../../../avr/include/inttypes.h",130,0,0,0
45
  42               		.stabs	"/usr/lib/gcc/avr/4.1.0/../../../../avr/include/stdint.h",130,0,0,0
44
  41               		.stabs	"/usr/lib/gcc/avr/4.2.1/../../../../avr/include/stdint.h",130,0,0,0
46
  43               		.stabs	"int8_t:t(6,1)=(0,10)",128,0,116,0
45
  42               		.stabs	"int8_t:t(6,1)=(0,10)",128,0,116,0
47
  44               		.stabs	"uint8_t:t(6,2)=(0,11)",128,0,117,0
46
  43               		.stabs	"uint8_t:t(6,2)=(0,11)",128,0,117,0
48
  45               		.stabs	"int16_t:t(6,3)=(0,1)",128,0,118,0
47
  44               		.stabs	"int16_t:t(6,3)=(0,1)",128,0,118,0
49
  46               		.stabs	"uint16_t:t(6,4)=(0,4)",128,0,119,0
48
  45               		.stabs	"uint16_t:t(6,4)=(0,4)",128,0,119,0
50
  47               		.stabs	"int32_t:t(6,5)=(0,3)",128,0,120,0
49
  46               		.stabs	"int32_t:t(6,5)=(0,3)",128,0,120,0
51
  48               		.stabs	"uint32_t:t(6,6)=(0,5)",128,0,121,0
50
  47               		.stabs	"uint32_t:t(6,6)=(0,5)",128,0,121,0
52
  49               		.stabs	"int64_t:t(6,7)=(0,6)",128,0,122,0
51
  48               		.stabs	"int64_t:t(6,7)=(0,6)",128,0,122,0
53
  50               		.stabs	"uint64_t:t(6,8)=(0,7)",128,0,123,0
52
  49               		.stabs	"uint64_t:t(6,8)=(0,7)",128,0,123,0
54
  51               		.stabs	"intptr_t:t(6,9)=(6,3)",128,0,135,0
53
  50               		.stabs	"intptr_t:t(6,9)=(6,3)",128,0,135,0
55
  52               		.stabs	"uintptr_t:t(6,10)=(6,4)",128,0,140,0
54
  51               		.stabs	"uintptr_t:t(6,10)=(6,4)",128,0,140,0
56
  53               		.stabs	"int_least8_t:t(6,11)=(6,1)",128,0,152,0
55
  52               		.stabs	"int_least8_t:t(6,11)=(6,1)",128,0,152,0
57
  54               		.stabs	"uint_least8_t:t(6,12)=(6,2)",128,0,157,0
56
  53               		.stabs	"uint_least8_t:t(6,12)=(6,2)",128,0,157,0
58
  55               		.stabs	"int_least16_t:t(6,13)=(6,3)",128,0,162,0
57
  54               		.stabs	"int_least16_t:t(6,13)=(6,3)",128,0,162,0
59
  56               		.stabs	"uint_least16_t:t(6,14)=(6,4)",128,0,167,0
58
  55               		.stabs	"uint_least16_t:t(6,14)=(6,4)",128,0,167,0
60
  57               		.stabs	"int_least32_t:t(6,15)=(6,5)",128,0,172,0
59
  56               		.stabs	"int_least32_t:t(6,15)=(6,5)",128,0,172,0
-
 
60
  57               		.stabs	"uint_least32_t:t(6,16)=(6,6)",128,0,177,0
61
GAS LISTING /tmp/ccQRbLT3.s 			page 2
61
GAS LISTING /tmp/cc0XjEMJ.s 			page 2
62
 
62
 
63
 
63
 
64
  58               		.stabs	"uint_least32_t:t(6,16)=(6,6)",128,0,177,0
-
 
65
  59               		.stabs	"int_least64_t:t(6,17)=(6,7)",128,0,182,0
64
  58               		.stabs	"int_least64_t:t(6,17)=(6,7)",128,0,182,0
66
  60               		.stabs	"uint_least64_t:t(6,18)=(6,8)",128,0,187,0
65
  59               		.stabs	"uint_least64_t:t(6,18)=(6,8)",128,0,187,0
67
  61               		.stabs	"int_fast8_t:t(6,19)=(6,1)",128,0,200,0
66
  60               		.stabs	"int_fast8_t:t(6,19)=(6,1)",128,0,200,0
68
  62               		.stabs	"uint_fast8_t:t(6,20)=(6,2)",128,0,205,0
67
  61               		.stabs	"uint_fast8_t:t(6,20)=(6,2)",128,0,205,0
69
  63               		.stabs	"int_fast16_t:t(6,21)=(6,3)",128,0,210,0
68
  62               		.stabs	"int_fast16_t:t(6,21)=(6,3)",128,0,210,0
70
  64               		.stabs	"uint_fast16_t:t(6,22)=(6,4)",128,0,215,0
69
  63               		.stabs	"uint_fast16_t:t(6,22)=(6,4)",128,0,215,0
71
  65               		.stabs	"int_fast32_t:t(6,23)=(6,5)",128,0,220,0
70
  64               		.stabs	"int_fast32_t:t(6,23)=(6,5)",128,0,220,0
72
  66               		.stabs	"uint_fast32_t:t(6,24)=(6,6)",128,0,225,0
71
  65               		.stabs	"uint_fast32_t:t(6,24)=(6,6)",128,0,225,0
73
  67               		.stabs	"int_fast64_t:t(6,25)=(6,7)",128,0,230,0
72
  66               		.stabs	"int_fast64_t:t(6,25)=(6,7)",128,0,230,0
74
  68               		.stabs	"uint_fast64_t:t(6,26)=(6,8)",128,0,235,0
73
  67               		.stabs	"uint_fast64_t:t(6,26)=(6,8)",128,0,235,0
75
  69               		.stabs	"intmax_t:t(6,27)=(6,7)",128,0,249,0
74
  68               		.stabs	"intmax_t:t(6,27)=(6,7)",128,0,249,0
76
  70               		.stabs	"uintmax_t:t(6,28)=(6,8)",128,0,254,0
75
  69               		.stabs	"uintmax_t:t(6,28)=(6,8)",128,0,254,0
77
  71               		.stabn	162,0,0,0
76
  70               		.stabn	162,0,0,0
78
  72               		.stabs	"int_farptr_t:t(5,1)=(6,5)",128,0,76,0
77
  71               		.stabs	"int_farptr_t:t(5,1)=(6,5)",128,0,76,0
79
  73               		.stabs	"uint_farptr_t:t(5,2)=(6,6)",128,0,80,0
78
  72               		.stabs	"uint_farptr_t:t(5,2)=(6,6)",128,0,80,0
-
 
79
  73               		.stabn	162,0,0,0
80
  74               		.stabn	162,0,0,0
80
  74               		.stabn	162,0,0,0
81
  75               		.stabn	162,0,0,0
81
  75               		.stabn	162,0,0,0
82
  76               		.stabn	162,0,0,0
-
 
83
  77               		.stabs	"I2CInterface.h",130,0,0,0
82
  76               		.stabs	"I2CInterface.h",130,0,0,0
84
  78               		.stabs	"CommonDefs.h",130,0,0,0
83
  77               		.stabs	"CommonDefs.h",130,0,0,0
85
  79               		.stabs	"bool_t:t(8,1)=(0,11)",128,0,56,0
84
  78               		.stabs	"bool_t:t(8,1)=(0,11)",128,0,56,0
86
  80               		.stabn	162,0,0,0
85
  79               		.stabn	162,0,0,0
87
  81               		.stabs	"i2cCmd_t:t(7,1)=(7,2)=s2configReg:(0,11),0,8;data:(0,11),8,8;;",128,0,53,0
86
  80               		.stabs	"i2cCmd_t:t(7,1)=(7,2)=s2configReg:(0,11),0,8;data:(0,11),8,8;;",128,0,53,0
88
  82               		.stabn	162,0,0,0
87
  81               		.stabn	162,0,0,0
89
  83               		.stabs	" :T(0,16)=@s8;eST_FrameMgr_idle:0,ST_FrameMgr_TrackingFrame:1,ST_FrameMgr_DumpingFrame:2,;
88
  82               		.stabs	" :T(0,16)=@s8;eST_FrameMgr_idle:0,ST_FrameMgr_TrackingFrame:1,ST_FrameMgr_DumpingFrame:2,;
90
  84               		.stabs	"FrameMgr_State_t:t(0,17)=(0,11)",128,0,72,0
89
  83               		.stabs	"FrameMgr_State_t:t(0,17)=(0,11)",128,0,72,0
91
  85               		.stabs	" :T(0,18)=@s8;enotTracked:0,color1:1,color2:2,color3:3,color4:4,color5:5,color6:6,color7:7
90
  84               		.stabs	" :T(0,18)=@s8;enotTracked:0,color1:1,color2:2,color3:3,color4:4,color5:5,color6:6,color7:7
92
  86               		.stabs	"trackedColor_t:t(0,19)=(0,11)",128,0,127,0
91
  85               		.stabs	"trackedColor_t:t(0,19)=(0,11)",128,0,127,0
93
  87               		.stabs	"trackedObject_t:t(0,20)=(0,21)=s8color:(0,19),0,8;lastLineXStart:(0,11),8,8;lastLineXFinis
92
  86               		.stabs	"trackedObject_t:t(0,20)=(0,21)=s8color:(0,19),0,8;lastLineXStart:(0,11),8,8;lastLineXFinis
94
  88               		.stabs	"FrameMgr_processFrame:F(0,15)",36,0,517,FrameMgr_processFrame
93
  87               		.stabs	"FrameMgr_processFrame:F(0,15)",36,0,517,FrameMgr_processFrame
95
  89               	.global	FrameMgr_processFrame
94
  88               	.global	FrameMgr_processFrame
96
  90               		.type	FrameMgr_processFrame, @function
95
  89               		.type	FrameMgr_processFrame, @function
97
  91               	FrameMgr_processFrame:
96
  90               	FrameMgr_processFrame:
98
  92               		.stabd	46,0,0
97
  91               		.stabd	46,0,0
99
   1:FrameMgr.c    **** /*
98
   1:FrameMgr.c    **** /*
100
   2:FrameMgr.c    ****     Copyright (C) 2004    John Orlando
99
   2:FrameMgr.c    ****     Copyright (C) 2004    John Orlando
101
   3:FrameMgr.c    ****     
100
   3:FrameMgr.c    ****     
102
   4:FrameMgr.c    ****    AVRcam: a small real-time image processing engine.
101
   4:FrameMgr.c    ****    AVRcam: a small real-time image processing engine.
103
   5:FrameMgr.c    **** 
102
   5:FrameMgr.c    **** 
104
   6:FrameMgr.c    ****     This program is free software; you can redistribute it and/or
103
   6:FrameMgr.c    ****     This program is free software; you can redistribute it and/or
105
   7:FrameMgr.c    ****     modify it under the terms of the GNU General Public
104
   7:FrameMgr.c    ****     modify it under the terms of the GNU General Public
106
   8:FrameMgr.c    ****     License as published by the Free Software Foundation; either
105
   8:FrameMgr.c    ****     License as published by the Free Software Foundation; either
107
   9:FrameMgr.c    ****     version 2 of the License, or (at your option) any later version.
106
   9:FrameMgr.c    ****     version 2 of the License, or (at your option) any later version.
108
  10:FrameMgr.c    **** 
107
  10:FrameMgr.c    **** 
109
  11:FrameMgr.c    ****     This program is distributed in the hope that it will be useful,
108
  11:FrameMgr.c    ****     This program is distributed in the hope that it will be useful,
110
  12:FrameMgr.c    ****     but WITHOUT ANY WARRANTY; without even the implied warranty of
109
  12:FrameMgr.c    ****     but WITHOUT ANY WARRANTY; without even the implied warranty of
111
  13:FrameMgr.c    ****     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
110
  13:FrameMgr.c    ****     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
112
  14:FrameMgr.c    ****     General Public License for more details.
111
  14:FrameMgr.c    ****     General Public License for more details.
113
  15:FrameMgr.c    **** 
112
  15:FrameMgr.c    **** 
114
  16:FrameMgr.c    ****     You should have received a copy of the GNU General Public
113
  16:FrameMgr.c    ****     You should have received a copy of the GNU General Public
115
  17:FrameMgr.c    ****     License along with this program; if not, write to the Free Software
114
  17:FrameMgr.c    ****     License along with this program; if not, write to the Free Software
116
  18:FrameMgr.c    ****     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
115
  18:FrameMgr.c    ****     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
117
  19:FrameMgr.c    **** 
116
  19:FrameMgr.c    **** 
118
  20:FrameMgr.c    ****    For more information on the AVRcam, please contact:
117
  20:FrameMgr.c    ****    For more information on the AVRcam, please contact:
119
  21:FrameMgr.c    **** 
118
  21:FrameMgr.c    **** 
120
  22:FrameMgr.c    ****    john@jrobot.net
119
  22:FrameMgr.c    ****    john@jrobot.net
-
 
120
  23:FrameMgr.c    **** 
121
GAS LISTING /tmp/ccQRbLT3.s 			page 3
121
GAS LISTING /tmp/cc0XjEMJ.s 			page 3
122
 
122
 
123
 
123
 
124
  23:FrameMgr.c    **** 
-
 
125
  24:FrameMgr.c    ****    or go to www.jrobot.net for more details regarding the system.
124
  24:FrameMgr.c    ****    or go to www.jrobot.net for more details regarding the system.
126
  25:FrameMgr.c    **** */
125
  25:FrameMgr.c    **** */
127
  26:FrameMgr.c    **** /*********************************************************
126
  26:FrameMgr.c    **** /*********************************************************
128
  27:FrameMgr.c    **** 	Module Name: FrameMgr.c
127
  27:FrameMgr.c    **** 	Module Name: FrameMgr.c
129
  28:FrameMgr.c    **** 	Module Date: 04/10/2004
128
  28:FrameMgr.c    **** 	Module Date: 04/10/2004
130
  29:FrameMgr.c    **** 	Module Auth: John Orlando
129
  29:FrameMgr.c    **** 	Module Auth: John Orlando
131
  30:FrameMgr.c    **** 	
130
  30:FrameMgr.c    **** 	
132
  31:FrameMgr.c    **** 	Description: This modules is responsible for performing
131
  31:FrameMgr.c    **** 	Description: This modules is responsible for performing
133
  32:FrameMgr.c    **** 	both medium and high level processing on image data.
132
  32:FrameMgr.c    **** 	both medium and high level processing on image data.
134
  33:FrameMgr.c    **** 	This is performed at both the line level as well as
133
  33:FrameMgr.c    **** 	This is performed at both the line level as well as
135
  34:FrameMgr.c    **** 	the frame level.  It controls the main flow of the
134
  34:FrameMgr.c    **** 	the frame level.  It controls the main flow of the
136
  35:FrameMgr.c    **** 	system, adhering to all the critical timing 
135
  35:FrameMgr.c    **** 	system, adhering to all the critical timing 
137
  36:FrameMgr.c    **** 	requirements (such as when serial data can be transferred,
136
  36:FrameMgr.c    **** 	requirements (such as when serial data can be transferred,
138
  37:FrameMgr.c    **** 	etc).
137
  37:FrameMgr.c    **** 	etc).
139
  38:FrameMgr.c    ****     
138
  38:FrameMgr.c    ****     
140
  39:FrameMgr.c    ****     Revision History:
139
  39:FrameMgr.c    ****     Revision History:
141
  40:FrameMgr.c    ****     Date        Rel Ver.    Notes
140
  40:FrameMgr.c    ****     Date        Rel Ver.    Notes
142
  41:FrameMgr.c    ****     4/10/2004      0.1     Module created
141
  41:FrameMgr.c    ****     4/10/2004      0.1     Module created
143
  42:FrameMgr.c    ****     6/30/2004      1.0     Initial release for Circuit Cellar
142
  42:FrameMgr.c    ****     6/30/2004      1.0     Initial release for Circuit Cellar
144
  43:FrameMgr.c    ****                            contest.
143
  43:FrameMgr.c    ****                            contest.
145
  44:FrameMgr.c    ****     11/15/2004     1.2     Updated processLine() function so 
144
  44:FrameMgr.c    ****     11/15/2004     1.2     Updated processLine() function so 
146
  45:FrameMgr.c    ****                            it will remove objects less than
145
  45:FrameMgr.c    ****                            it will remove objects less than
147
  46:FrameMgr.c    ****                            a specified length/width (reduces
146
  46:FrameMgr.c    ****                            a specified length/width (reduces
148
  47:FrameMgr.c    ****                            shot noise)
147
  47:FrameMgr.c    ****                            shot noise)
149
  48:FrameMgr.c    **** *********************************************************/
148
  48:FrameMgr.c    **** *********************************************************/
150
  49:FrameMgr.c    **** 
149
  49:FrameMgr.c    **** 
151
  50:FrameMgr.c    **** /*	Includes */
150
  50:FrameMgr.c    **** /*	Includes */
152
  51:FrameMgr.c    **** #include <stdlib.h>
151
  51:FrameMgr.c    **** #include <stdlib.h>
153
  52:FrameMgr.c    **** #include <string.h>
152
  52:FrameMgr.c    **** #include <string.h>
154
  53:FrameMgr.c    **** #include <avr/io.h>
153
  53:FrameMgr.c    **** #include <avr/io.h>
155
  54:FrameMgr.c    **** #include "Executive.h"
154
  54:FrameMgr.c    **** #include "Executive.h"
156
  55:FrameMgr.c    **** #include "UIMgr.h"
155
  55:FrameMgr.c    **** #include "UIMgr.h"
157
  56:FrameMgr.c    **** #include "FrameMgr.h"
156
  56:FrameMgr.c    **** #include "FrameMgr.h"
158
  57:FrameMgr.c    **** #include "CamInterface.h"
157
  57:FrameMgr.c    **** #include "CamInterface.h"
159
  58:FrameMgr.c    **** #include "UartInterface.h"
158
  58:FrameMgr.c    **** #include "UartInterface.h"
160
  59:FrameMgr.c    **** #include "Utility.h"
159
  59:FrameMgr.c    **** #include "Utility.h"
161
  60:FrameMgr.c    **** #include "I2CInterface.h"
160
  60:FrameMgr.c    **** #include "I2CInterface.h"
162
  61:FrameMgr.c    **** #include "CamConfig.h"
161
  61:FrameMgr.c    **** #include "CamConfig.h"
163
  62:FrameMgr.c    **** #include "CommonDefs.h"
162
  62:FrameMgr.c    **** #include "CommonDefs.h"
164
  63:FrameMgr.c    **** 
163
  63:FrameMgr.c    **** 
165
  64:FrameMgr.c    **** /* 	Local Structures and Typedefs */
164
  64:FrameMgr.c    **** /* 	Local Structures and Typedefs */
166
  65:FrameMgr.c    **** enum
165
  65:FrameMgr.c    **** enum
167
  66:FrameMgr.c    **** {
166
  66:FrameMgr.c    **** {
168
  67:FrameMgr.c    **** 	ST_FrameMgr_idle,
167
  67:FrameMgr.c    **** 	ST_FrameMgr_idle,
169
  68:FrameMgr.c    **** 	ST_FrameMgr_TrackingFrame,
168
  68:FrameMgr.c    **** 	ST_FrameMgr_TrackingFrame,
170
  69:FrameMgr.c    **** 	ST_FrameMgr_DumpingFrame
169
  69:FrameMgr.c    **** 	ST_FrameMgr_DumpingFrame
171
  70:FrameMgr.c    **** };
170
  70:FrameMgr.c    **** };
172
  71:FrameMgr.c    **** 
171
  71:FrameMgr.c    **** 
173
  72:FrameMgr.c    **** typedef unsigned char FrameMgr_State_t;
172
  72:FrameMgr.c    **** typedef unsigned char FrameMgr_State_t;
174
  73:FrameMgr.c    **** 
173
  73:FrameMgr.c    **** 
175
  74:FrameMgr.c    **** /*  Definitions */
174
  74:FrameMgr.c    **** /*  Definitions */
176
  75:FrameMgr.c    **** /* The most objects that can be tracked at any one time is 8.  
175
  75:FrameMgr.c    **** /* The most objects that can be tracked at any one time is 8.  
177
  76:FrameMgr.c    **** This number is determined by the number of bytes that can be
176
  76:FrameMgr.c    **** This number is determined by the number of bytes that can be
178
  77:FrameMgr.c    **** sent out during a frame (one byte per line, 144 lines per frame) 
177
  77:FrameMgr.c    **** sent out during a frame (one byte per line, 144 lines per frame) 
179
  78:FrameMgr.c    **** with the number of bytes in a tracked object (7) + some wiggle
178
  78:FrameMgr.c    **** with the number of bytes in a tracked object (7) + some wiggle
180
  79:FrameMgr.c    **** room :-) ... I guess this could be increased to around 20 if
179
  79:FrameMgr.c    **** room :-) ... I guess this could be increased to around 20 if
-
 
180
  80:FrameMgr.c    **** we had enough room and cycles to process objects between lines */
181
GAS LISTING /tmp/ccQRbLT3.s 			page 4
181
GAS LISTING /tmp/cc0XjEMJ.s 			page 4
182
 
182
 
183
 
183
 
184
  80:FrameMgr.c    **** we had enough room and cycles to process objects between lines */
-
 
185
  81:FrameMgr.c    **** #define MAX_TRACKED_OBJECTS	8
184
  81:FrameMgr.c    **** #define MAX_TRACKED_OBJECTS	8
186
  82:FrameMgr.c    **** 
185
  82:FrameMgr.c    **** 
187
  83:FrameMgr.c    **** /* This defines the number of bytes that make up a trackedObject_t
186
  83:FrameMgr.c    **** /* This defines the number of bytes that make up a trackedObject_t
188
  84:FrameMgr.c    **** structure... */
187
  84:FrameMgr.c    **** structure... */
189
  85:FrameMgr.c    **** #define SIZE_OF_TRACKED_OBJECT 8
188
  85:FrameMgr.c    **** #define SIZE_OF_TRACKED_OBJECT 8
190
  86:FrameMgr.c    **** 
189
  86:FrameMgr.c    **** 
191
  87:FrameMgr.c    **** /* This define is used to turn off the timer overflow interrupt
190
  87:FrameMgr.c    **** /* This define is used to turn off the timer overflow interrupt
192
  88:FrameMgr.c    **** that is generated when the PCLK overflows TIMER1 */
191
  88:FrameMgr.c    **** that is generated when the PCLK overflows TIMER1 */
193
  89:FrameMgr.c    **** #define DISABLE_PCLK_TIMER1_OVERFLOW_BITMASK 0xFB
192
  89:FrameMgr.c    **** #define DISABLE_PCLK_TIMER1_OVERFLOW_BITMASK 0xFB
194
  90:FrameMgr.c    **** 
193
  90:FrameMgr.c    **** 
195
  91:FrameMgr.c    **** /* This define is used to determine if a run length is too small
194
  91:FrameMgr.c    **** /* This define is used to determine if a run length is too small
196
  92:FrameMgr.c    **** to be concerned with.  This helps to reduce the number of false
195
  92:FrameMgr.c    **** to be concerned with.  This helps to reduce the number of false
197
  93:FrameMgr.c    **** positives. */
196
  93:FrameMgr.c    **** positives. */
198
  94:FrameMgr.c    **** #define MIN_OBJECT_TRACKING_WIDTH 3
197
  94:FrameMgr.c    **** #define MIN_OBJECT_TRACKING_WIDTH 3
199
  95:FrameMgr.c    **** 
198
  95:FrameMgr.c    **** 
200
  96:FrameMgr.c    **** /* This define is used to determine if an object has enough
199
  96:FrameMgr.c    **** /* This define is used to determine if an object has enough
201
  97:FrameMgr.c    **** height to be considered worth tracking...it is used to reduce
200
  97:FrameMgr.c    **** height to be considered worth tracking...it is used to reduce
202
  98:FrameMgr.c    **** shot noise */
201
  98:FrameMgr.c    **** shot noise */
203
  99:FrameMgr.c    **** #define MIN_OBJECT_TRACKING_HEIGHT 3
202
  99:FrameMgr.c    **** #define MIN_OBJECT_TRACKING_HEIGHT 3
204
 100:FrameMgr.c    **** 
203
 100:FrameMgr.c    **** 
205
 101:FrameMgr.c    **** /* This define is used to indicate how often the filter routine
204
 101:FrameMgr.c    **** /* This define is used to indicate how often the filter routine
206
 102:FrameMgr.c    **** that removes objects less than MIN_OBJECT_TRACKING_HEIGHT should
205
 102:FrameMgr.c    **** that removes objects less than MIN_OBJECT_TRACKING_HEIGHT should
207
 103:FrameMgr.c    **** be executed.  It is measured in a number of lines (7 nominally). */
206
 103:FrameMgr.c    **** be executed.  It is measured in a number of lines (7 nominally). */
208
 104:FrameMgr.c    **** #define RUN_OBJECT_FILTER_MASK 0x07
207
 104:FrameMgr.c    **** #define RUN_OBJECT_FILTER_MASK 0x07
209
 105:FrameMgr.c    **** 
208
 105:FrameMgr.c    **** 
210
 106:FrameMgr.c    **** /* This enum describes the possible colors that can
209
 106:FrameMgr.c    **** /* This enum describes the possible colors that can
211
 107:FrameMgr.c    **** be tracked by the system.  This can't be represented as
210
 107:FrameMgr.c    **** be tracked by the system.  This can't be represented as
212
 108:FrameMgr.c    **** simple color names (red, brown, etc) due to the fact that
211
 108:FrameMgr.c    **** simple color names (red, brown, etc) due to the fact that
213
 109:FrameMgr.c    **** the user sets which colors will be associated with which
212
 109:FrameMgr.c    **** the user sets which colors will be associated with which
214
 110:FrameMgr.c    **** bits.  Remember...after the AND operation of the indexed
213
 110:FrameMgr.c    **** bits.  Remember...after the AND operation of the indexed
215
 111:FrameMgr.c    **** color map values executes, either a single bit indicating
214
 111:FrameMgr.c    **** color map values executes, either a single bit indicating
216
 112:FrameMgr.c    **** the color should be set, or no bits indicating that the
215
 112:FrameMgr.c    **** the color should be set, or no bits indicating that the
217
 113:FrameMgr.c    **** color isn't represented in the color map (notTracked). */
216
 113:FrameMgr.c    **** color isn't represented in the color map (notTracked). */
218
 114:FrameMgr.c    **** enum
217
 114:FrameMgr.c    **** enum
219
 115:FrameMgr.c    **** {
218
 115:FrameMgr.c    **** {
220
 116:FrameMgr.c    **** 	notTracked,
219
 116:FrameMgr.c    **** 	notTracked,
221
 117:FrameMgr.c    **** 	color1,		/* bit 1 color */
220
 117:FrameMgr.c    **** 	color1,		/* bit 1 color */
222
 118:FrameMgr.c    **** 	color2,		/* bit 2 color */
221
 118:FrameMgr.c    **** 	color2,		/* bit 2 color */
223
 119:FrameMgr.c    **** 	color3,		/* bit 3 color */
222
 119:FrameMgr.c    **** 	color3,		/* bit 3 color */
224
 120:FrameMgr.c    **** 	color4,		/* bit 4 color */
223
 120:FrameMgr.c    **** 	color4,		/* bit 4 color */
225
 121:FrameMgr.c    **** 	color5,		/* bit 5 color */
224
 121:FrameMgr.c    **** 	color5,		/* bit 5 color */
226
 122:FrameMgr.c    **** 	color6,		/* bit 6 color */
225
 122:FrameMgr.c    **** 	color6,		/* bit 6 color */
227
 123:FrameMgr.c    **** 	color7,		/* bit 7 color */
226
 123:FrameMgr.c    **** 	color7,		/* bit 7 color */
228
 124:FrameMgr.c    **** 	color8		/* bit 8 color */
227
 124:FrameMgr.c    **** 	color8		/* bit 8 color */
229
 125:FrameMgr.c    **** };
228
 125:FrameMgr.c    **** };
230
 126:FrameMgr.c    **** 
229
 126:FrameMgr.c    **** 
231
 127:FrameMgr.c    **** typedef unsigned char trackedColor_t;
230
 127:FrameMgr.c    **** typedef unsigned char trackedColor_t;
232
 128:FrameMgr.c    **** 
231
 128:FrameMgr.c    **** 
233
 129:FrameMgr.c    **** /* This structure defines the info that needs to be
232
 129:FrameMgr.c    **** /* This structure defines the info that needs to be
234
 130:FrameMgr.c    **** maintained for each trackedObject in the trackingTable */
233
 130:FrameMgr.c    **** maintained for each trackedObject in the trackingTable */
235
 131:FrameMgr.c    **** typedef struct
234
 131:FrameMgr.c    **** typedef struct
236
 132:FrameMgr.c    **** {
235
 132:FrameMgr.c    **** {
237
 133:FrameMgr.c    **** 	trackedColor_t  color;
236
 133:FrameMgr.c    **** 	trackedColor_t  color;
238
 134:FrameMgr.c    **** 	unsigned char lastLineXStart;
237
 134:FrameMgr.c    **** 	unsigned char lastLineXStart;
239
 135:FrameMgr.c    **** 	unsigned char lastLineXFinish;
238
 135:FrameMgr.c    **** 	unsigned char lastLineXFinish;
240
 136:FrameMgr.c    **** 	unsigned char x_upperLeft;
239
 136:FrameMgr.c    **** 	unsigned char x_upperLeft;
-
 
240
 137:FrameMgr.c    **** 	unsigned char y_upperLeft;
241
GAS LISTING /tmp/ccQRbLT3.s 			page 5
241
GAS LISTING /tmp/cc0XjEMJ.s 			page 5
242
 
242
 
243
 
243
 
244
 137:FrameMgr.c    **** 	unsigned char y_upperLeft;
-
 
245
 138:FrameMgr.c    **** 	unsigned char x_lowerRight;
244
 138:FrameMgr.c    **** 	unsigned char x_lowerRight;
246
 139:FrameMgr.c    **** 	unsigned char y_lowerRight;
245
 139:FrameMgr.c    **** 	unsigned char y_lowerRight;
247
 140:FrameMgr.c    **** 	unsigned char objectValid;  /* used to be a fill byte...now it is
246
 140:FrameMgr.c    **** 	unsigned char objectValid;  /* used to be a fill byte...now it is
248
 141:FrameMgr.c    ****                                      used to determine if the object is valid
247
 141:FrameMgr.c    ****                                      used to determine if the object is valid
249
 142:FrameMgr.c    ****                                      or not...it gets invalidated if it is
248
 142:FrameMgr.c    ****                                      or not...it gets invalidated if it is
250
 143:FrameMgr.c    ****                                      determined that it is too small, or
249
 143:FrameMgr.c    ****                                      determined that it is too small, or
251
 144:FrameMgr.c    ****                                      that the object is within another object */
250
 144:FrameMgr.c    ****                                      that the object is within another object */
252
 145:FrameMgr.c    **** } trackedObject_t;
251
 145:FrameMgr.c    **** } trackedObject_t;
253
 146:FrameMgr.c    **** 
252
 146:FrameMgr.c    **** 
254
 147:FrameMgr.c    **** /* These defines are used to index into each individual element in the
253
 147:FrameMgr.c    **** /* These defines are used to index into each individual element in the
255
 148:FrameMgr.c    **** trackedObject_t structure.  This seems to be MUCH more efficient than
254
 148:FrameMgr.c    **** trackedObject_t structure.  This seems to be MUCH more efficient than
256
 149:FrameMgr.c    **** accessing the elements in GCC. */
255
 149:FrameMgr.c    **** accessing the elements in GCC. */
257
 150:FrameMgr.c    **** #define COLOR_OFFSET                0
256
 150:FrameMgr.c    **** #define COLOR_OFFSET                0
258
 151:FrameMgr.c    **** #define LAST_LINE_X_START_OFFSET    1
257
 151:FrameMgr.c    **** #define LAST_LINE_X_START_OFFSET    1
259
 152:FrameMgr.c    **** #define LAST_LINE_X_FINISH_OFFSET   2
258
 152:FrameMgr.c    **** #define LAST_LINE_X_FINISH_OFFSET   2
260
 153:FrameMgr.c    **** #define X_UPPER_LEFT_OFFSET         3
259
 153:FrameMgr.c    **** #define X_UPPER_LEFT_OFFSET         3
261
 154:FrameMgr.c    **** #define Y_UPPER_LEFT_OFFSET         4
260
 154:FrameMgr.c    **** #define Y_UPPER_LEFT_OFFSET         4
262
 155:FrameMgr.c    **** #define X_LOWER_RIGHT_OFFSET        5
261
 155:FrameMgr.c    **** #define X_LOWER_RIGHT_OFFSET        5
263
 156:FrameMgr.c    **** #define Y_LOWER_RIGHT_OFFSET        6
262
 156:FrameMgr.c    **** #define Y_LOWER_RIGHT_OFFSET        6
264
 157:FrameMgr.c    **** #define VALID_OBJECT_OFFSET         7
263
 157:FrameMgr.c    **** #define VALID_OBJECT_OFFSET         7
265
 158:FrameMgr.c    **** 
264
 158:FrameMgr.c    **** 
266
 159:FrameMgr.c    **** /*  Local Variables */
265
 159:FrameMgr.c    **** /*  Local Variables */
267
 160:FrameMgr.c    **** /* The trackedObjectTable is used to hold up to eight tracked objects
266
 160:FrameMgr.c    **** /* The trackedObjectTable is used to hold up to eight tracked objects
268
 161:FrameMgr.c    **** while they are being acquired. */
267
 161:FrameMgr.c    **** while they are being acquired. */
269
 162:FrameMgr.c    **** static trackedObject_t trackedObjectTable[MAX_TRACKED_OBJECTS];
268
 162:FrameMgr.c    **** static trackedObject_t trackedObjectTable[MAX_TRACKED_OBJECTS];
270
 163:FrameMgr.c    **** static trackedObject_t *pCurrentTrackedObjectTable = trackedObjectTable;
269
 163:FrameMgr.c    **** static trackedObject_t *pCurrentTrackedObjectTable = trackedObjectTable;
271
 164:FrameMgr.c    **** static unsigned char lineCount = 0;
270
 164:FrameMgr.c    **** static unsigned char lineCount = 0;
272
 165:FrameMgr.c    **** static FrameMgr_State_t currentState = ST_FrameMgr_idle;
271
 165:FrameMgr.c    **** static FrameMgr_State_t currentState = ST_FrameMgr_idle;
273
 166:FrameMgr.c    **** static unsigned char numCurrTrackedObjects = 0;
272
 166:FrameMgr.c    **** static unsigned char numCurrTrackedObjects = 0;
274
 167:FrameMgr.c    **** static unsigned char numPrevTrackedObjects = 0;
273
 167:FrameMgr.c    **** static unsigned char numPrevTrackedObjects = 0;
275
 168:FrameMgr.c    **** static unsigned char trackedLineCount = 0;
274
 168:FrameMgr.c    **** static unsigned char trackedLineCount = 0;
276
 169:FrameMgr.c    **** 
275
 169:FrameMgr.c    **** 
277
 170:FrameMgr.c    **** /*  Local Functions  */
276
 170:FrameMgr.c    **** /*  Local Functions  */
278
 171:FrameMgr.c    **** static void FrameMgr_findConnectedness(void);
277
 171:FrameMgr.c    **** static void FrameMgr_findConnectedness(void);
279
 172:FrameMgr.c    **** 
278
 172:FrameMgr.c    **** 
280
 173:FrameMgr.c    **** /*  Extern Functions */
279
 173:FrameMgr.c    **** /*  Extern Functions */
281
 174:FrameMgr.c    **** /* These functions are located in assembly files, and thus
280
 174:FrameMgr.c    **** /* These functions are located in assembly files, and thus
282
 175:FrameMgr.c    **** must be externed here so they can be referenced in the source below. */
281
 175:FrameMgr.c    **** must be externed here so they can be referenced in the source below. */
283
 176:FrameMgr.c    **** extern void CamIntAsm_waitForNewTrackingFrame(unsigned char *pBuffer, unsigned char *pMemLookup);
282
 176:FrameMgr.c    **** extern void CamIntAsm_waitForNewTrackingFrame(unsigned char *pBuffer, unsigned char *pMemLookup);
284
 177:FrameMgr.c    **** extern void CamIntAsm_waitForNewDumpFrame(unsigned char *pCurrBuffer, unsigned char *pPrevBuffer);
283
 177:FrameMgr.c    **** extern void CamIntAsm_waitForNewDumpFrame(unsigned char *pCurrBuffer, unsigned char *pPrevBuffer);
285
 178:FrameMgr.c    **** extern void CamIntAsm_acquireTrackingLine(unsigned char *pBuffer, unsigned char *pMemLookup);
284
 178:FrameMgr.c    **** extern void CamIntAsm_acquireTrackingLine(unsigned char *pBuffer, unsigned char *pMemLookup);
286
 179:FrameMgr.c    **** extern void CamIntAsm_acquireDumpLine(unsigned char *pCurrBuffer, unsigned char *pPrevBuffer);
285
 179:FrameMgr.c    **** extern void CamIntAsm_acquireDumpLine(unsigned char *pCurrBuffer, unsigned char *pPrevBuffer);
287
 180:FrameMgr.c    **** 
286
 180:FrameMgr.c    **** 
288
 181:FrameMgr.c    **** /***********************************************************
287
 181:FrameMgr.c    **** /***********************************************************
289
 182:FrameMgr.c    **** 	Function Name: FrameMgr_init
288
 182:FrameMgr.c    **** 	Function Name: FrameMgr_init
290
 183:FrameMgr.c    **** 	Function Description: This function is responsible
289
 183:FrameMgr.c    **** 	Function Description: This function is responsible
291
 184:FrameMgr.c    **** 	for initializing the FrameMgr.  This includes 
290
 184:FrameMgr.c    **** 	for initializing the FrameMgr.  This includes 
292
 185:FrameMgr.c    **** 	setting up the various buffers and data needed to 
291
 185:FrameMgr.c    **** 	setting up the various buffers and data needed to 
293
 186:FrameMgr.c    **** 	process each frame of image data.
292
 186:FrameMgr.c    **** 	process each frame of image data.
294
 187:FrameMgr.c    **** 	Inputs:  none
293
 187:FrameMgr.c    **** 	Inputs:  none
295
 188:FrameMgr.c    **** 	Outputs: none
294
 188:FrameMgr.c    **** 	Outputs: none
296
 189:FrameMgr.c    **** ***********************************************************/	
295
 189:FrameMgr.c    **** ***********************************************************/	
297
 190:FrameMgr.c    **** void FrameMgr_init(void)
296
 190:FrameMgr.c    **** void FrameMgr_init(void)
298
 191:FrameMgr.c    **** {
297
 191:FrameMgr.c    **** {
299
 192:FrameMgr.c    **** 	memset(trackedObjectTable,0x00,sizeof(trackedObjectTable));
298
 192:FrameMgr.c    **** 	memset(trackedObjectTable,0x00,sizeof(trackedObjectTable));
300
 193:FrameMgr.c    **** }
299
 193:FrameMgr.c    **** }
-
 
300
 194:FrameMgr.c    **** 
301
GAS LISTING /tmp/ccQRbLT3.s 			page 6
301
GAS LISTING /tmp/cc0XjEMJ.s 			page 6
302
 
302
 
303
 
303
 
304
 194:FrameMgr.c    **** 
-
 
305
 195:FrameMgr.c    **** 
304
 195:FrameMgr.c    **** 
306
 196:FrameMgr.c    **** /***********************************************************
305
 196:FrameMgr.c    **** /***********************************************************
307
 197:FrameMgr.c    **** 	Function Name: FrameMgr_dispatchEvent
306
 197:FrameMgr.c    **** 	Function Name: FrameMgr_dispatchEvent
308
 198:FrameMgr.c    **** 	Function Description: This function is responsible for
307
 198:FrameMgr.c    **** 	Function Description: This function is responsible for
309
 199:FrameMgr.c    **** 	taking an incoming event and performing the needed
308
 199:FrameMgr.c    **** 	taking an incoming event and performing the needed
310
 200:FrameMgr.c    **** 	actions with it as pertains to the FrameMgr.
309
 200:FrameMgr.c    **** 	actions with it as pertains to the FrameMgr.
311
 201:FrameMgr.c    **** 	Inputs:  event - the generated event
310
 201:FrameMgr.c    **** 	Inputs:  event - the generated event
312
 202:FrameMgr.c    **** 	Outputs: none
311
 202:FrameMgr.c    **** 	Outputs: none
313
 203:FrameMgr.c    **** ***********************************************************/	
312
 203:FrameMgr.c    **** ***********************************************************/	
314
 204:FrameMgr.c    **** void FrameMgr_dispatchEvent(unsigned char event)
313
 204:FrameMgr.c    **** void FrameMgr_dispatchEvent(unsigned char event)
315
 205:FrameMgr.c    **** {	
314
 205:FrameMgr.c    **** {	
316
 206:FrameMgr.c    **** 	switch(event)
315
 206:FrameMgr.c    **** 	switch(event)
317
 207:FrameMgr.c    **** 	{
316
 207:FrameMgr.c    **** 	{
318
 208:FrameMgr.c    **** 		case EV_DUMP_FRAME:
317
 208:FrameMgr.c    **** 		case EV_DUMP_FRAME:
319
 209:FrameMgr.c    ****             /* try re-initializing the camera before we start dumping */
318
 209:FrameMgr.c    ****             /* try re-initializing the camera before we start dumping */
320
 210:FrameMgr.c    ****             
319
 210:FrameMgr.c    ****             
321
 211:FrameMgr.c    **** 			CamConfig_setCamReg(0x11,0x01);  /* reduce the frame rate for dumping*/
320
 211:FrameMgr.c    **** 			CamConfig_setCamReg(0x11,0x01);  /* reduce the frame rate for dumping*/
322
 212:FrameMgr.c    **** 			CamConfig_sendFifoCmds();
321
 212:FrameMgr.c    **** 			CamConfig_sendFifoCmds();
323
 213:FrameMgr.c    **** 			Utility_delay(1000);		/* allow the new frame rate to settle */
322
 213:FrameMgr.c    **** 			Utility_delay(1000);		/* allow the new frame rate to settle */
324
 214:FrameMgr.c    **** 			lineCount = 0;
323
 214:FrameMgr.c    **** 			lineCount = 0;
325
 215:FrameMgr.c    **** 			currentState = ST_FrameMgr_DumpingFrame;
324
 215:FrameMgr.c    **** 			currentState = ST_FrameMgr_DumpingFrame;
326
 216:FrameMgr.c    **** 			//CamIntAsm_waitForNewDumpFrame(currentLineBuffer,previousLineBuffer);
325
 216:FrameMgr.c    **** 			//CamIntAsm_waitForNewDumpFrame(currentLineBuffer,previousLineBuffer);
327
 217:FrameMgr.c    ****             FrameMgr_acquireLine();
326
 217:FrameMgr.c    ****             FrameMgr_acquireLine();
328
 218:FrameMgr.c    **** 			break;
327
 218:FrameMgr.c    **** 			break;
329
 219:FrameMgr.c    **** 		
328
 219:FrameMgr.c    **** 		
330
 220:FrameMgr.c    **** 		case EV_ENABLE_TRACKING:
329
 220:FrameMgr.c    **** 		case EV_ENABLE_TRACKING:
331
 221:FrameMgr.c    **** 			currentState = ST_FrameMgr_TrackingFrame;					
330
 221:FrameMgr.c    **** 			currentState = ST_FrameMgr_TrackingFrame;					
332
 222:FrameMgr.c    **** 			FrameMgr_acquireFrame();
331
 222:FrameMgr.c    **** 			FrameMgr_acquireFrame();
333
 223:FrameMgr.c    **** 			break;
332
 223:FrameMgr.c    **** 			break;
334
 224:FrameMgr.c    **** 			
333
 224:FrameMgr.c    **** 			
335
 225:FrameMgr.c    **** 		case EV_ACQUIRE_FRAME_COMPLETE:
334
 225:FrameMgr.c    **** 		case EV_ACQUIRE_FRAME_COMPLETE:
336
 226:FrameMgr.c    **** 			FrameMgr_processFrame();
335
 226:FrameMgr.c    **** 			FrameMgr_processFrame();
337
 227:FrameMgr.c    **** 			break;
336
 227:FrameMgr.c    **** 			break;
338
 228:FrameMgr.c    **** 		
337
 228:FrameMgr.c    **** 		
339
 229:FrameMgr.c    **** 		case EV_PROCESS_FRAME_COMPLETE:
338
 229:FrameMgr.c    **** 		case EV_PROCESS_FRAME_COMPLETE:
340
 230:FrameMgr.c    **** 			FrameMgr_acquireFrame();
339
 230:FrameMgr.c    **** 			FrameMgr_acquireFrame();
341
 231:FrameMgr.c    **** 			break;
340
 231:FrameMgr.c    **** 			break;
342
 232:FrameMgr.c    **** 
341
 232:FrameMgr.c    **** 
343
 233:FrameMgr.c    **** 		case EV_SERIAL_DATA_RECEIVED:
342
 233:FrameMgr.c    **** 		case EV_SERIAL_DATA_RECEIVED:
344
 234:FrameMgr.c    **** 			if (currentState != ST_FrameMgr_idle)
343
 234:FrameMgr.c    **** 			if (currentState != ST_FrameMgr_idle)
345
 235:FrameMgr.c    **** 			{
344
 235:FrameMgr.c    **** 			{
346
 236:FrameMgr.c    **** 				/* we need to go back to processing line data, since
345
 236:FrameMgr.c    **** 				/* we need to go back to processing line data, since
347
 237:FrameMgr.c    **** 				serial data reception interrupted us....just trash the
346
 237:FrameMgr.c    **** 				serial data reception interrupted us....just trash the
348
 238:FrameMgr.c    **** 				frame and act like the frame has been processed, which
347
 238:FrameMgr.c    **** 				frame and act like the frame has been processed, which
349
 239:FrameMgr.c    **** 				will kick off the system to wait for the next line */
348
 239:FrameMgr.c    **** 				will kick off the system to wait for the next line */
350
 240:FrameMgr.c    **** 				PUBLISH_EVENT(EV_PROCESS_FRAME_COMPLETE);
349
 240:FrameMgr.c    **** 				PUBLISH_EVENT(EV_PROCESS_FRAME_COMPLETE);
351
 241:FrameMgr.c    **** 			}
350
 241:FrameMgr.c    **** 			}
352
 242:FrameMgr.c    **** 			break;
351
 242:FrameMgr.c    **** 			break;
353
 243:FrameMgr.c    **** 			
352
 243:FrameMgr.c    **** 			
354
 244:FrameMgr.c    **** 		case EV_DISABLE_TRACKING:
353
 244:FrameMgr.c    **** 		case EV_DISABLE_TRACKING:
355
 245:FrameMgr.c    **** 			/* tracking needs to be turned off */
354
 245:FrameMgr.c    **** 			/* tracking needs to be turned off */
356
 246:FrameMgr.c    **** 			currentState = ST_FrameMgr_idle;
355
 246:FrameMgr.c    **** 			currentState = ST_FrameMgr_idle;
357
 247:FrameMgr.c    **** 			break;
356
 247:FrameMgr.c    **** 			break;
358
 248:FrameMgr.c    **** 	}
357
 248:FrameMgr.c    **** 	}
359
 249:FrameMgr.c    **** }
358
 249:FrameMgr.c    **** }
360
 250:FrameMgr.c    **** 
359
 250:FrameMgr.c    **** 
-
 
360
 251:FrameMgr.c    **** /***********************************************************
361
GAS LISTING /tmp/ccQRbLT3.s 			page 7
361
GAS LISTING /tmp/cc0XjEMJ.s 			page 7
362
 
362
 
363
 
363
 
364
 251:FrameMgr.c    **** /***********************************************************
-
 
365
 252:FrameMgr.c    **** 	Function Name: FrameMgr_acquireFrame
364
 252:FrameMgr.c    **** 	Function Name: FrameMgr_acquireFrame
366
 253:FrameMgr.c    **** 	Function Description: This function is responsible for
365
 253:FrameMgr.c    **** 	Function Description: This function is responsible for
367
 254:FrameMgr.c    **** 	beginning of the acquisition of a new frame of data
366
 254:FrameMgr.c    **** 	beginning of the acquisition of a new frame of data
368
 255:FrameMgr.c    **** 	from the camera interface. The acquisition of this line 
367
 255:FrameMgr.c    **** 	from the camera interface. The acquisition of this line 
369
 256:FrameMgr.c    **** 	depends on the current state of the FrameMgr.
368
 256:FrameMgr.c    **** 	depends on the current state of the FrameMgr.
370
 257:FrameMgr.c    **** 	Inputs:  none
369
 257:FrameMgr.c    **** 	Inputs:  none
371
 258:FrameMgr.c    **** 	Outputs: none
370
 258:FrameMgr.c    **** 	Outputs: none
372
 259:FrameMgr.c    **** ***********************************************************/	
371
 259:FrameMgr.c    **** ***********************************************************/	
373
 260:FrameMgr.c    **** void FrameMgr_acquireFrame(void)
372
 260:FrameMgr.c    **** void FrameMgr_acquireFrame(void)
374
 261:FrameMgr.c    **** {
373
 261:FrameMgr.c    **** {
375
 262:FrameMgr.c    **** 	if (currentState == ST_FrameMgr_TrackingFrame)
374
 262:FrameMgr.c    **** 	if (currentState == ST_FrameMgr_TrackingFrame)
376
 263:FrameMgr.c    **** 	{
375
 263:FrameMgr.c    **** 	{
377
 264:FrameMgr.c    **** 		trackedLineCount = 0;
376
 264:FrameMgr.c    **** 		trackedLineCount = 0;
378
 265:FrameMgr.c    **** 		numPrevTrackedObjects = numCurrTrackedObjects;
377
 265:FrameMgr.c    **** 		numPrevTrackedObjects = numCurrTrackedObjects;
379
 266:FrameMgr.c    **** 		numCurrTrackedObjects = 0;
378
 266:FrameMgr.c    **** 		numCurrTrackedObjects = 0;
380
 267:FrameMgr.c    **** 		
379
 267:FrameMgr.c    **** 		
381
 268:FrameMgr.c    **** 		/* clear out the tracking table, and wait for the new frame
380
 268:FrameMgr.c    **** 		/* clear out the tracking table, and wait for the new frame
382
 269:FrameMgr.c    **** 		to start */
381
 269:FrameMgr.c    **** 		to start */
383
 270:FrameMgr.c    **** 		memset(trackedObjectTable,0x00,sizeof(trackedObjectTable));
382
 270:FrameMgr.c    **** 		memset(trackedObjectTable,0x00,sizeof(trackedObjectTable));
384
 271:FrameMgr.c    **** 		//CamIntAsm_waitForNewTrackingFrame(currentLineBuffer,colorMap);
383
 271:FrameMgr.c    **** 		//CamIntAsm_waitForNewTrackingFrame(currentLineBuffer,colorMap);
385
 272:FrameMgr.c    ****         WAIT_FOR_VSYNC_HIGH();
384
 272:FrameMgr.c    ****         WAIT_FOR_VSYNC_HIGH();
386
 273:FrameMgr.c    ****         CamIntAsm_acquireTrackingLine(currentLineBuffer,colorMap);
385
 273:FrameMgr.c    ****         CamIntAsm_acquireTrackingLine(currentLineBuffer,colorMap);
387
 274:FrameMgr.c    **** 	}
386
 274:FrameMgr.c    **** 	}
388
 275:FrameMgr.c    **** }
387
 275:FrameMgr.c    **** }
389
 276:FrameMgr.c    **** 
388
 276:FrameMgr.c    **** 
390
 277:FrameMgr.c    **** /***********************************************************
389
 277:FrameMgr.c    **** /***********************************************************
391
 278:FrameMgr.c    **** 	Function Name: FrameMgr_acquireLine
390
 278:FrameMgr.c    **** 	Function Name: FrameMgr_acquireLine
392
 279:FrameMgr.c    **** 	Function Description: This function is responsible for
391
 279:FrameMgr.c    **** 	Function Description: This function is responsible for
393
 280:FrameMgr.c    **** 	acquiring a line of data from the camera interface.
392
 280:FrameMgr.c    **** 	acquiring a line of data from the camera interface.
394
 281:FrameMgr.c    **** 	The acquisition of this line depends on the current
393
 281:FrameMgr.c    **** 	The acquisition of this line depends on the current
395
 282:FrameMgr.c    **** 	state of the FrameMgr.
394
 282:FrameMgr.c    **** 	state of the FrameMgr.
396
 283:FrameMgr.c    **** 	Inputs:  none
395
 283:FrameMgr.c    **** 	Inputs:  none
397
 284:FrameMgr.c    **** 	Outputs: none
396
 284:FrameMgr.c    **** 	Outputs: none
398
 285:FrameMgr.c    **** ***********************************************************/	
397
 285:FrameMgr.c    **** ***********************************************************/	
399
 286:FrameMgr.c    **** void FrameMgr_acquireLine(void)
398
 286:FrameMgr.c    **** void FrameMgr_acquireLine(void)
400
 287:FrameMgr.c    **** {
399
 287:FrameMgr.c    **** {
401
 288:FrameMgr.c    **** 	unsigned char tmpLineCount;
400
 288:FrameMgr.c    **** 	unsigned char tmpLineCount;
402
 289:FrameMgr.c    **** 	
401
 289:FrameMgr.c    **** 	
403
 290:FrameMgr.c    **** 	/* clearing out the buffers takes too long...we should
402
 290:FrameMgr.c    **** 	/* clearing out the buffers takes too long...we should
404
 291:FrameMgr.c    **** 	just overwrite the data here without a problem when
403
 291:FrameMgr.c    **** 	just overwrite the data here without a problem when
405
 292:FrameMgr.c    **** 	we start acquiring...at no point do we check for 
404
 292:FrameMgr.c    **** 	we start acquiring...at no point do we check for 
406
 293:FrameMgr.c    **** 	a 0x00 value in the current or previous lineBuffers,
405
 293:FrameMgr.c    **** 	a 0x00 value in the current or previous lineBuffers,
407
 294:FrameMgr.c    **** 	so it was a bit excessive :-)  */
406
 294:FrameMgr.c    **** 	so it was a bit excessive :-)  */
408
 295:FrameMgr.c    **** 	
407
 295:FrameMgr.c    **** 	
409
 296:FrameMgr.c    **** 	/* check which state we are in and proceed as needed */
408
 296:FrameMgr.c    **** 	/* check which state we are in and proceed as needed */
410
 297:FrameMgr.c    **** 	if (currentState == ST_FrameMgr_DumpingFrame)
409
 297:FrameMgr.c    **** 	if (currentState == ST_FrameMgr_DumpingFrame)
411
 298:FrameMgr.c    **** 	{
410
 298:FrameMgr.c    **** 	{
412
 299:FrameMgr.c    **** 		tmpLineCount = lineCount*2;
411
 299:FrameMgr.c    **** 		tmpLineCount = lineCount*2;
413
 300:FrameMgr.c    ****         
412
 300:FrameMgr.c    ****         
414
 301:FrameMgr.c    ****         /* clearing out the line data in dump mode is ok, and actually
413
 301:FrameMgr.c    ****         /* clearing out the line data in dump mode is ok, and actually
415
 302:FrameMgr.c    ****         is needed, since it is possible for the first dump line in
414
 302:FrameMgr.c    ****         is needed, since it is possible for the first dump line in
416
 303:FrameMgr.c    ****         a frame to come back with the last line captured of the
415
 303:FrameMgr.c    ****         a frame to come back with the last line captured of the
417
 304:FrameMgr.c    ****         last capture session...*/
416
 304:FrameMgr.c    ****         last capture session...*/
418
 305:FrameMgr.c    ****         memset(currentLineBuffer,0x00,LENGTH_OF_LINE_BUFFER);
417
 305:FrameMgr.c    ****         memset(currentLineBuffer,0x00,LENGTH_OF_LINE_BUFFER);
419
 306:FrameMgr.c    ****         memset(previousLineBuffer,0x00,LENGTH_OF_LINE_BUFFER);
418
 306:FrameMgr.c    ****         memset(previousLineBuffer,0x00,LENGTH_OF_LINE_BUFFER);
420
 307:FrameMgr.c    **** 		/* wait for another VSYNC so we know which frame to use 
419
 307:FrameMgr.c    **** 		/* wait for another VSYNC so we know which frame to use 
-
 
420
 308:FrameMgr.c    **** 		to start looking for a line to receive */
421
GAS LISTING /tmp/ccQRbLT3.s 			page 8
421
GAS LISTING /tmp/cc0XjEMJ.s 			page 8
422
 
422
 
423
 
423
 
424
 308:FrameMgr.c    **** 		to start looking for a line to receive */
-
 
425
 309:FrameMgr.c    **** 		WAIT_FOR_VSYNC_HIGH();  
424
 309:FrameMgr.c    **** 		WAIT_FOR_VSYNC_HIGH();  
426
 310:FrameMgr.c    **** 		WAIT_FOR_VSYNC_LOW();
425
 310:FrameMgr.c    **** 		WAIT_FOR_VSYNC_LOW();
427
 311:FrameMgr.c    **** 		
426
 311:FrameMgr.c    **** 		
428
 312:FrameMgr.c    **** 		/* look at lineCount to determine how many HREFs we should
427
 312:FrameMgr.c    **** 		/* look at lineCount to determine how many HREFs we should
429
 313:FrameMgr.c    **** 		wait before we start sampling */
428
 313:FrameMgr.c    **** 		wait before we start sampling */
430
 314:FrameMgr.c    **** 		while(tmpLineCount != 0)
429
 314:FrameMgr.c    **** 		while(tmpLineCount != 0)
431
 315:FrameMgr.c    **** 		{
430
 315:FrameMgr.c    **** 		{
432
 316:FrameMgr.c    **** 			WAIT_FOR_HREF_HIGH(); 
431
 316:FrameMgr.c    **** 			WAIT_FOR_HREF_HIGH(); 
433
 317:FrameMgr.c    **** 			tmpLineCount--;
432
 317:FrameMgr.c    **** 			tmpLineCount--;
434
 318:FrameMgr.c    **** 			WAIT_FOR_HREF_LOW(); 
433
 318:FrameMgr.c    **** 			WAIT_FOR_HREF_LOW(); 
435
 319:FrameMgr.c    **** 		}
434
 319:FrameMgr.c    **** 		}
436
 320:FrameMgr.c    **** 		
435
 320:FrameMgr.c    **** 		
437
 321:FrameMgr.c    **** 		/*  we should now be ready to sample our line...*/
436
 321:FrameMgr.c    **** 		/*  we should now be ready to sample our line...*/
438
 322:FrameMgr.c    **** 		CamIntAsm_acquireDumpLine(currentLineBuffer,previousLineBuffer);
437
 322:FrameMgr.c    **** 		CamIntAsm_acquireDumpLine(currentLineBuffer,previousLineBuffer);
439
 323:FrameMgr.c    **** 	}		
438
 323:FrameMgr.c    **** 	}		
440
 324:FrameMgr.c    **** 	else if (currentState == ST_FrameMgr_TrackingFrame)
439
 324:FrameMgr.c    **** 	else if (currentState == ST_FrameMgr_TrackingFrame)
441
 325:FrameMgr.c    **** 	{
440
 325:FrameMgr.c    **** 	{
442
 326:FrameMgr.c    **** 		WAIT_FOR_HREF_LOW();
441
 326:FrameMgr.c    **** 		WAIT_FOR_HREF_LOW();
443
 327:FrameMgr.c    **** 		CamIntAsm_acquireTrackingLine(currentLineBuffer,colorMap);
442
 327:FrameMgr.c    **** 		CamIntAsm_acquireTrackingLine(currentLineBuffer,colorMap);
444
 328:FrameMgr.c    **** 	}
443
 328:FrameMgr.c    **** 	}
445
 329:FrameMgr.c    **** }
444
 329:FrameMgr.c    **** }
446
 330:FrameMgr.c    **** 
445
 330:FrameMgr.c    **** 
447
 331:FrameMgr.c    **** /***********************************************************
446
 331:FrameMgr.c    **** /***********************************************************
448
 332:FrameMgr.c    **** 	Function Name: FrameMgr_processLine
447
 332:FrameMgr.c    **** 	Function Name: FrameMgr_processLine
449
 333:FrameMgr.c    **** 	Function Description: This function is responsible for
448
 333:FrameMgr.c    **** 	Function Description: This function is responsible for
450
 334:FrameMgr.c    **** 	parsing the received image line and performing either
449
 334:FrameMgr.c    **** 	parsing the received image line and performing either
451
 335:FrameMgr.c    **** 	connected region mapping (if in the Tracking state) or
450
 335:FrameMgr.c    **** 	connected region mapping (if in the Tracking state) or
452
 336:FrameMgr.c    **** 	sending out the raw sampled data (if in the Dumping
451
 336:FrameMgr.c    **** 	sending out the raw sampled data (if in the Dumping
453
 337:FrameMgr.c    **** 	state).
452
 337:FrameMgr.c    **** 	state).
454
 338:FrameMgr.c    **** 	Inputs:  none
453
 338:FrameMgr.c    **** 	Inputs:  none
455
 339:FrameMgr.c    **** 	Outputs: none
454
 339:FrameMgr.c    **** 	Outputs: none
456
 340:FrameMgr.c    **** ***********************************************************/	
455
 340:FrameMgr.c    **** ***********************************************************/	
457
 341:FrameMgr.c    **** void FrameMgr_processLine(void)
456
 341:FrameMgr.c    **** void FrameMgr_processLine(void)
458
 342:FrameMgr.c    **** {
457
 342:FrameMgr.c    **** {
459
 343:FrameMgr.c    **** 	unsigned char i;
458
 343:FrameMgr.c    **** 	unsigned char i;
460
 344:FrameMgr.c    **** 	volatile unsigned char dataToSend;
459
 344:FrameMgr.c    **** 	volatile unsigned char dataToSend;
461
 345:FrameMgr.c    **** 	unsigned char *pTrackedObjectData = (unsigned char *)pCurrentTrackedObjectTable;
460
 345:FrameMgr.c    **** 	unsigned char *pTrackedObjectData = (unsigned char *)pCurrentTrackedObjectTable;
462
 346:FrameMgr.c    **** #ifdef DEBUG_TRACKED_LINE    
461
 346:FrameMgr.c    **** #ifdef DEBUG_TRACKED_LINE    
463
 347:FrameMgr.c    **** 	unsigned char *pSendData;
462
 347:FrameMgr.c    **** 	unsigned char *pSendData;
464
 348:FrameMgr.c    ****     unsigned char asciiBuffer[5];
463
 348:FrameMgr.c    ****     unsigned char asciiBuffer[5];
465
 349:FrameMgr.c    ****     unsigned char pixelCount = 0;
464
 349:FrameMgr.c    ****     unsigned char pixelCount = 0;
466
 350:FrameMgr.c    **** #endif    
465
 350:FrameMgr.c    **** #endif    
467
 351:FrameMgr.c    **** 	
466
 351:FrameMgr.c    **** 	
468
 352:FrameMgr.c    **** 	if (currentState == ST_FrameMgr_DumpingFrame)
467
 352:FrameMgr.c    **** 	if (currentState == ST_FrameMgr_DumpingFrame)
469
 353:FrameMgr.c    **** 	{
468
 353:FrameMgr.c    **** 	{
470
 354:FrameMgr.c    **** 		/* we want to sit in a tight loop and send the acquired data
469
 354:FrameMgr.c    **** 		/* we want to sit in a tight loop and send the acquired data
471
 355:FrameMgr.c    **** 		sitting in current and previous line buffers out the serial
470
 355:FrameMgr.c    **** 		sitting in current and previous line buffers out the serial
472
 356:FrameMgr.c    **** 		port...it is sent out the serial port immediately instead
471
 356:FrameMgr.c    **** 		port...it is sent out the serial port immediately instead
473
 357:FrameMgr.c    **** 		of going into the UIMgr tx fifo because we can't do anything
472
 357:FrameMgr.c    **** 		of going into the UIMgr tx fifo because we can't do anything
474
 358:FrameMgr.c    **** 		until its sent out anyway...may as well just get it out now	*/
473
 358:FrameMgr.c    **** 		until its sent out anyway...may as well just get it out now	*/
475
 359:FrameMgr.c    **** 		
474
 359:FrameMgr.c    **** 		
476
 360:FrameMgr.c    **** 		/* currentLineBuffer is getting "g" previousLineBuffer is getting "b-r" */
475
 360:FrameMgr.c    **** 		/* currentLineBuffer is getting "g" previousLineBuffer is getting "b-r" */
477
 361:FrameMgr.c    **** 		UartInt_txByte(0x0B);			/* send the header byte */
476
 361:FrameMgr.c    **** 		UartInt_txByte(0x0B);			/* send the header byte */
478
 362:FrameMgr.c    **** 		UartInt_txByte(lineCount);		/* send the line count */
477
 362:FrameMgr.c    **** 		UartInt_txByte(lineCount);		/* send the line count */
479
 363:FrameMgr.c    **** 		for (i=0; i<NUM_PIXELS_IN_A_DUMP_LINE; i+=2)
478
 363:FrameMgr.c    **** 		for (i=0; i<NUM_PIXELS_IN_A_DUMP_LINE; i+=2)
480
 364:FrameMgr.c    **** 		{
479
 364:FrameMgr.c    **** 		{
-
 
480
 365:FrameMgr.c    **** 			/* when a dump line is sampled, the upper byte can potentially
481
GAS LISTING /tmp/ccQRbLT3.s 			page 9
481
GAS LISTING /tmp/cc0XjEMJ.s 			page 9
482
 
482
 
483
 
483
 
484
 365:FrameMgr.c    **** 			/* when a dump line is sampled, the upper byte can potentially
-
 
485
 366:FrameMgr.c    **** 			have garbage in it...we don't have time to mask it off as we're
484
 366:FrameMgr.c    **** 			have garbage in it...we don't have time to mask it off as we're
486
 367:FrameMgr.c    **** 			sampling, so it is done here before we send it out...we also
485
 367:FrameMgr.c    **** 			sampling, so it is done here before we send it out...we also
487
 368:FrameMgr.c    **** 			combine the samples together so we really are sending up a
486
 368:FrameMgr.c    **** 			combine the samples together so we really are sending up a
488
 369:FrameMgr.c    **** 			sample for line N as well as line N+1 */
487
 369:FrameMgr.c    **** 			sample for line N as well as line N+1 */
489
 370:FrameMgr.c    **** 			dataToSend = currentLineBuffer[i];
488
 370:FrameMgr.c    **** 			dataToSend = currentLineBuffer[i];
490
 371:FrameMgr.c    **** 			dataToSend &= 0x0F;
489
 371:FrameMgr.c    **** 			dataToSend &= 0x0F;
491
 372:FrameMgr.c    **** 			dataToSend <<= 4;
490
 372:FrameMgr.c    **** 			dataToSend <<= 4;
492
 373:FrameMgr.c    **** 			dataToSend |= (previousLineBuffer[i] & 0x0F);
491
 373:FrameMgr.c    **** 			dataToSend |= (previousLineBuffer[i] & 0x0F);
493
 374:FrameMgr.c    **** 			
492
 374:FrameMgr.c    **** 			
494
 375:FrameMgr.c    **** 			/* dataToSend should be packed now */
493
 375:FrameMgr.c    **** 			/* dataToSend should be packed now */
495
 376:FrameMgr.c    **** 			UartInt_txByte(dataToSend);
494
 376:FrameMgr.c    **** 			UartInt_txByte(dataToSend);
496
 377:FrameMgr.c    **** 			
495
 377:FrameMgr.c    **** 			
497
 378:FrameMgr.c    **** 			/* flip the colors around since we are doing all G on Y and BR on UV */
496
 378:FrameMgr.c    **** 			/* flip the colors around since we are doing all G on Y and BR on UV */
498
 379:FrameMgr.c    **** 			dataToSend = previousLineBuffer[i+1];
497
 379:FrameMgr.c    **** 			dataToSend = previousLineBuffer[i+1];
499
 380:FrameMgr.c    **** 			dataToSend &= 0x0F;
498
 380:FrameMgr.c    **** 			dataToSend &= 0x0F;
500
 381:FrameMgr.c    **** 			dataToSend <<= 4;
499
 381:FrameMgr.c    **** 			dataToSend <<= 4;
501
 382:FrameMgr.c    **** 			dataToSend |= (currentLineBuffer[i+1] & 0x0F);
500
 382:FrameMgr.c    **** 			dataToSend |= (currentLineBuffer[i+1] & 0x0F);
502
 383:FrameMgr.c    **** 			
501
 383:FrameMgr.c    **** 			
503
 384:FrameMgr.c    **** 			/* dataToSend should be packed now */
502
 384:FrameMgr.c    **** 			/* dataToSend should be packed now */
504
 385:FrameMgr.c    **** 			UartInt_txByte(dataToSend);
503
 385:FrameMgr.c    **** 			UartInt_txByte(dataToSend);
505
 386:FrameMgr.c    **** 		}
504
 386:FrameMgr.c    **** 		}
506
 387:FrameMgr.c    **** 		UartInt_txByte(0x0F);  /* send line end */
505
 387:FrameMgr.c    **** 		UartInt_txByte(0x0F);  /* send line end */
507
 388:FrameMgr.c    **** 		/* once all the data is sent, increment out line count by 2 since
506
 388:FrameMgr.c    **** 		/* once all the data is sent, increment out line count by 2 since
508
 389:FrameMgr.c    **** 		we really get 2 lines worth of pixels on each pass */
507
 389:FrameMgr.c    **** 		we really get 2 lines worth of pixels on each pass */
509
 390:FrameMgr.c    **** 		/* Update...increment only by 1, but only send 72 double-lines */
508
 390:FrameMgr.c    **** 		/* Update...increment only by 1, but only send 72 double-lines */
510
 391:FrameMgr.c    **** 		lineCount++;
509
 391:FrameMgr.c    **** 		lineCount++;
511
 392:FrameMgr.c    **** 		
510
 392:FrameMgr.c    **** 		
512
 393:FrameMgr.c    **** 		/* check to see if we have retrieved all of the needed lines */
511
 393:FrameMgr.c    **** 		/* check to see if we have retrieved all of the needed lines */
513
 394:FrameMgr.c    **** 		if (lineCount >= 72)  /* half 144, since we send two lines at a time */
512
 394:FrameMgr.c    **** 		if (lineCount >= 72)  /* half 144, since we send two lines at a time */
514
 395:FrameMgr.c    **** 		{
513
 395:FrameMgr.c    **** 		{
515
 396:FrameMgr.c    **** 			/* we're done, so send the dump complete?...nope, just change
514
 396:FrameMgr.c    **** 			/* we're done, so send the dump complete?...nope, just change
516
 397:FrameMgr.c    **** 			states and we should be fine */
515
 397:FrameMgr.c    **** 			states and we should be fine */
517
 398:FrameMgr.c    **** 			lineCount = 0;
516
 398:FrameMgr.c    **** 			lineCount = 0;
518
 399:FrameMgr.c    **** 			currentState = ST_FrameMgr_idle;
517
 399:FrameMgr.c    **** 			currentState = ST_FrameMgr_idle;
519
 400:FrameMgr.c    **** 			
518
 400:FrameMgr.c    **** 			
520
 401:FrameMgr.c    **** 			/* disable the PCLK counting overflow interrupt */
519
 401:FrameMgr.c    **** 			/* disable the PCLK counting overflow interrupt */
521
 402:FrameMgr.c    **** 			TIMSK &= DISABLE_PCLK_TIMER1_OVERFLOW_BITMASK;
520
 402:FrameMgr.c    **** 			TIMSK &= DISABLE_PCLK_TIMER1_OVERFLOW_BITMASK;
522
 403:FrameMgr.c    **** 			
521
 403:FrameMgr.c    **** 			
523
 404:FrameMgr.c    **** 			CamConfig_setCamReg(0x11,0x00);  /* reset the frame rate to normal*/
522
 404:FrameMgr.c    **** 			CamConfig_setCamReg(0x11,0x00);  /* reset the frame rate to normal*/
524
 405:FrameMgr.c    **** 			CamConfig_sendFifoCmds();
523
 405:FrameMgr.c    **** 			CamConfig_sendFifoCmds();
525
 406:FrameMgr.c    **** 		}
524
 406:FrameMgr.c    **** 		}
526
 407:FrameMgr.c    **** 		else
525
 407:FrameMgr.c    **** 		else
527
 408:FrameMgr.c    **** 		{
526
 408:FrameMgr.c    **** 		{
528
 409:FrameMgr.c    **** 			/* we have more lines to acquire in this frame, so keep on truckin...*/
527
 409:FrameMgr.c    **** 			/* we have more lines to acquire in this frame, so keep on truckin...*/
529
 410:FrameMgr.c    **** 			PUBLISH_FAST_EVENT(FEV_PROCESS_LINE_COMPLETE);
528
 410:FrameMgr.c    **** 			PUBLISH_FAST_EVENT(FEV_PROCESS_LINE_COMPLETE);
530
 411:FrameMgr.c    **** 		}
529
 411:FrameMgr.c    **** 		}
531
 412:FrameMgr.c    **** 	}
530
 412:FrameMgr.c    **** 	}
532
 413:FrameMgr.c    **** 	else if (currentState == ST_FrameMgr_TrackingFrame)
531
 413:FrameMgr.c    **** 	else if (currentState == ST_FrameMgr_TrackingFrame)
533
 414:FrameMgr.c    **** 	{
532
 414:FrameMgr.c    **** 	{
534
 415:FrameMgr.c    **** #ifdef DEBUG_TRACKED_LINE	
533
 415:FrameMgr.c    **** #ifdef DEBUG_TRACKED_LINE	
535
 416:FrameMgr.c    **** 		/* send the received line over serial...this should only send
534
 416:FrameMgr.c    **** 		/* send the received line over serial...this should only send
536
 417:FrameMgr.c    **** 		until a pixelCount == 176 */
535
 417:FrameMgr.c    **** 		until a pixelCount == 176 */
537
 418:FrameMgr.c    **** 		pSendData = currentLineBuffer;
536
 418:FrameMgr.c    **** 		pSendData = currentLineBuffer;
538
 419:FrameMgr.c    **** 		itoa(trackedLineCount,asciiBuffer,10);
537
 419:FrameMgr.c    **** 		itoa(trackedLineCount,asciiBuffer,10);
539
 420:FrameMgr.c    **** 		UIMgr_txBuffer(asciiBuffer,3);
538
 420:FrameMgr.c    **** 		UIMgr_txBuffer(asciiBuffer,3);
540
 421:FrameMgr.c    **** 		UIMgr_txBuffer(" ",1);
539
 421:FrameMgr.c    **** 		UIMgr_txBuffer(" ",1);
-
 
540
 422:FrameMgr.c    **** 		while(pixelCount < ACTUAL_NUM_PIXELS_IN_A_LINE)  
541
GAS LISTING /tmp/ccQRbLT3.s 			page 10
541
GAS LISTING /tmp/cc0XjEMJ.s 			page 10
542
 
542
 
543
 
543
 
544
 422:FrameMgr.c    **** 		while(pixelCount < ACTUAL_NUM_PIXELS_IN_A_LINE)  
-
 
545
 423:FrameMgr.c    **** 		{
544
 423:FrameMgr.c    **** 		{
546
 424:FrameMgr.c    **** 			memset(asciiBuffer,0x00,5);
545
 424:FrameMgr.c    **** 			memset(asciiBuffer,0x00,5);
547
 425:FrameMgr.c    **** 			itoa(*pSendData++,asciiBuffer,10);	/* color is first byte */
546
 425:FrameMgr.c    **** 			itoa(*pSendData++,asciiBuffer,10);	/* color is first byte */
548
 426:FrameMgr.c    **** 			UIMgr_txBuffer(asciiBuffer,3); /* 3 ascii bytes for data */
547
 426:FrameMgr.c    **** 			UIMgr_txBuffer(asciiBuffer,3); /* 3 ascii bytes for data */
549
 427:FrameMgr.c    **** 			UIMgr_txBuffer(" ",1);
548
 427:FrameMgr.c    **** 			UIMgr_txBuffer(" ",1);
550
 428:FrameMgr.c    **** 
549
 428:FrameMgr.c    **** 
551
 429:FrameMgr.c    **** 			pixelCount += *pSendData;	/* run-length is second byte */
550
 429:FrameMgr.c    **** 			pixelCount += *pSendData;	/* run-length is second byte */
552
 430:FrameMgr.c    **** 			memset(asciiBuffer,0x00,5);
551
 430:FrameMgr.c    **** 			memset(asciiBuffer,0x00,5);
553
 431:FrameMgr.c    **** 			itoa(*pSendData++,asciiBuffer,10);
552
 431:FrameMgr.c    **** 			itoa(*pSendData++,asciiBuffer,10);
554
 432:FrameMgr.c    **** 			UIMgr_txBuffer(asciiBuffer,3);
553
 432:FrameMgr.c    **** 			UIMgr_txBuffer(asciiBuffer,3);
555
 433:FrameMgr.c    **** 			UIMgr_txBuffer(" ",1);
554
 433:FrameMgr.c    **** 			UIMgr_txBuffer(" ",1);
556
 434:FrameMgr.c    **** 		}
555
 434:FrameMgr.c    **** 		}
557
 435:FrameMgr.c    **** 		UIMgr_txBuffer("\n\r",2);
556
 435:FrameMgr.c    **** 		UIMgr_txBuffer("\n\r",2);
558
 436:FrameMgr.c    **** 
557
 436:FrameMgr.c    **** 
559
 437:FrameMgr.c    **** 		trackedLineCount++;
558
 437:FrameMgr.c    **** 		trackedLineCount++;
560
 438:FrameMgr.c    **** 		if (trackedLineCount == 144)
559
 438:FrameMgr.c    **** 		if (trackedLineCount == 144)
561
 439:FrameMgr.c    **** 		{
560
 439:FrameMgr.c    **** 		{
562
 440:FrameMgr.c    **** 			UIMgr_txBuffer("  FC  \n\r",8);
561
 440:FrameMgr.c    **** 			UIMgr_txBuffer("  FC  \n\r",8);
563
 441:FrameMgr.c    **** 			trackedLineCount = 0;
562
 441:FrameMgr.c    **** 			trackedLineCount = 0;
564
 442:FrameMgr.c    **** 			PUBLISH_EVENT(EV_PROCESS_FRAME_COMPLETE);
563
 442:FrameMgr.c    **** 			PUBLISH_EVENT(EV_PROCESS_FRAME_COMPLETE);
565
 443:FrameMgr.c    **** 		}
564
 443:FrameMgr.c    **** 		}
566
 444:FrameMgr.c    **** 		else
565
 444:FrameMgr.c    **** 		else
567
 445:FrameMgr.c    **** 		{
566
 445:FrameMgr.c    **** 		{
568
 446:FrameMgr.c    **** 			PUBLISH_EVENT(EV_PROCESS_LINE_COMPLETE);
567
 446:FrameMgr.c    **** 			PUBLISH_EVENT(EV_PROCESS_LINE_COMPLETE);
569
 447:FrameMgr.c    **** 		}	
568
 447:FrameMgr.c    **** 		}	
570
 448:FrameMgr.c    **** #else
569
 448:FrameMgr.c    **** #else
571
 449:FrameMgr.c    ****         /* determine if any of the RLE blocks overlap */
570
 449:FrameMgr.c    ****         /* determine if any of the RLE blocks overlap */
572
 450:FrameMgr.c    **** 		FrameMgr_findConnectedness();
571
 450:FrameMgr.c    **** 		FrameMgr_findConnectedness();
573
 451:FrameMgr.c    ****         
572
 451:FrameMgr.c    ****         
574
 452:FrameMgr.c    ****         /* we also want to remove any objects that are less than
573
 452:FrameMgr.c    ****         /* we also want to remove any objects that are less than
575
 453:FrameMgr.c    ****         a minimum height...we already removed portions of the 
574
 453:FrameMgr.c    ****         a minimum height...we already removed portions of the 
576
 454:FrameMgr.c    ****         run-length that are less than MIN_PIXEL_WIDTH in the
575
 454:FrameMgr.c    ****         run-length that are less than MIN_PIXEL_WIDTH in the
577
 455:FrameMgr.c    ****         findConnectedness() routine...doing it here instead of 
576
 455:FrameMgr.c    ****         findConnectedness() routine...doing it here instead of 
578
 456:FrameMgr.c    ****         a function to speed things up...this may end up slowing down the
577
 456:FrameMgr.c    ****         a function to speed things up...this may end up slowing down the
579
 457:FrameMgr.c    ****         frame rate slightly, and can be removed if this isn't needed */
578
 457:FrameMgr.c    ****         frame rate slightly, and can be removed if this isn't needed */
580
 458:FrameMgr.c    ****   
579
 458:FrameMgr.c    ****   
581
 459:FrameMgr.c    ****         /* run this routine once every 8 lines */       
580
 459:FrameMgr.c    ****         /* run this routine once every 8 lines */       
582
 460:FrameMgr.c    ****         if ( (trackedLineCount & RUN_OBJECT_FILTER_MASK) == RUN_OBJECT_FILTER_MASK)
581
 460:FrameMgr.c    ****         if ( (trackedLineCount & RUN_OBJECT_FILTER_MASK) == RUN_OBJECT_FILTER_MASK)
583
 461:FrameMgr.c    ****         {
582
 461:FrameMgr.c    ****         {
584
 462:FrameMgr.c    ****             for (i=0; i<MAX_TRACKED_OBJECTS; i++)
583
 462:FrameMgr.c    ****             for (i=0; i<MAX_TRACKED_OBJECTS; i++)
585
 463:FrameMgr.c    ****             {
584
 463:FrameMgr.c    ****             {
586
 464:FrameMgr.c    ****                 if ( *(pTrackedObjectData + VALID_OBJECT_OFFSET) == TRUE)
585
 464:FrameMgr.c    ****                 if ( *(pTrackedObjectData + VALID_OBJECT_OFFSET) == TRUE)
587
 465:FrameMgr.c    ****                 {
586
 465:FrameMgr.c    ****                 {
588
 466:FrameMgr.c    ****                     /* check to see if the object is already in
587
 466:FrameMgr.c    ****                     /* check to see if the object is already in
589
 467:FrameMgr.c    ****                     our past...i.e., its last */
588
 467:FrameMgr.c    ****                     our past...i.e., its last */
590
 468:FrameMgr.c    ****                     if ( (*(pTrackedObjectData + Y_LOWER_RIGHT_OFFSET) - 
589
 468:FrameMgr.c    ****                     if ( (*(pTrackedObjectData + Y_LOWER_RIGHT_OFFSET) - 
591
 469:FrameMgr.c    ****                           *(pTrackedObjectData + Y_UPPER_LEFT_OFFSET)) < MIN_OBJECT_TRACKING_HEIGHT
590
 469:FrameMgr.c    ****                           *(pTrackedObjectData + Y_UPPER_LEFT_OFFSET)) < MIN_OBJECT_TRACKING_HEIGHT
592
 470:FrameMgr.c    ****                     {
591
 470:FrameMgr.c    ****                     {
593
 471:FrameMgr.c    ****                         /* the object is less than the minimum height...see if it is adjacent
592
 471:FrameMgr.c    ****                         /* the object is less than the minimum height...see if it is adjacent
594
 472:FrameMgr.c    ****                         to the current line we just processed...if so, leave it here...otherwise,
593
 472:FrameMgr.c    ****                         to the current line we just processed...if so, leave it here...otherwise,
595
 473:FrameMgr.c    ****                         it needs to be invalidated since its too small */
594
 473:FrameMgr.c    ****                         it needs to be invalidated since its too small */
596
 474:FrameMgr.c    ****                         if ( trackedLineCount - *(pTrackedObjectData + Y_LOWER_RIGHT_OFFSET) > 2)
595
 474:FrameMgr.c    ****                         if ( trackedLineCount - *(pTrackedObjectData + Y_LOWER_RIGHT_OFFSET) > 2)
597
 475:FrameMgr.c    ****                         {
596
 475:FrameMgr.c    ****                         {
598
 476:FrameMgr.c    ****                             /* invalidate the object */
597
 476:FrameMgr.c    ****                             /* invalidate the object */
599
 477:FrameMgr.c    ****                             *(pTrackedObjectData + VALID_OBJECT_OFFSET) = FALSE;
598
 477:FrameMgr.c    ****                             *(pTrackedObjectData + VALID_OBJECT_OFFSET) = FALSE;
600
 478:FrameMgr.c    ****                             numCurrTrackedObjects--;
599
 478:FrameMgr.c    ****                             numCurrTrackedObjects--;
-
 
600
 479:FrameMgr.c    ****                         }
601
GAS LISTING /tmp/ccQRbLT3.s 			page 11
601
GAS LISTING /tmp/cc0XjEMJ.s 			page 11
602
 
602
 
603
 
603
 
604
 479:FrameMgr.c    ****                         }
-
 
605
 480:FrameMgr.c    ****                     }
604
 480:FrameMgr.c    ****                     }
606
 481:FrameMgr.c    ****                 }
605
 481:FrameMgr.c    ****                 }
607
 482:FrameMgr.c    ****                 pTrackedObjectData += SIZE_OF_TRACKED_OBJECT;
606
 482:FrameMgr.c    ****                 pTrackedObjectData += SIZE_OF_TRACKED_OBJECT;
608
 483:FrameMgr.c    ****             }
607
 483:FrameMgr.c    ****             }
609
 484:FrameMgr.c    ****         }     
608
 484:FrameMgr.c    ****         }     
610
 485:FrameMgr.c    ****  
609
 485:FrameMgr.c    ****  
611
 486:FrameMgr.c    **** 		trackedLineCount++;
610
 486:FrameMgr.c    **** 		trackedLineCount++;
612
 487:FrameMgr.c    **** 		if (trackedLineCount == ACTUAL_NUM_LINES_IN_A_FRAME)
611
 487:FrameMgr.c    **** 		if (trackedLineCount == ACTUAL_NUM_LINES_IN_A_FRAME)
613
 488:FrameMgr.c    **** 		{
612
 488:FrameMgr.c    **** 		{
614
 489:FrameMgr.c    **** 			/* an entire frame of tracking data has been acquired, so
613
 489:FrameMgr.c    **** 			/* an entire frame of tracking data has been acquired, so
615
 490:FrameMgr.c    **** 			publish an event letting the system know this fact */
614
 490:FrameMgr.c    **** 			publish an event letting the system know this fact */
616
 491:FrameMgr.c    **** 			PUBLISH_EVENT(EV_ACQUIRE_FRAME_COMPLETE);
615
 491:FrameMgr.c    **** 			PUBLISH_EVENT(EV_ACQUIRE_FRAME_COMPLETE);
617
 492:FrameMgr.c    **** 			/* disable the PCLK counting overflow interrupt */
616
 492:FrameMgr.c    **** 			/* disable the PCLK counting overflow interrupt */
618
 493:FrameMgr.c    **** 			TIMSK &= DISABLE_PCLK_TIMER1_OVERFLOW_BITMASK;
617
 493:FrameMgr.c    **** 			TIMSK &= DISABLE_PCLK_TIMER1_OVERFLOW_BITMASK;
619
 494:FrameMgr.c    **** 			trackedLineCount = 0;
618
 494:FrameMgr.c    **** 			trackedLineCount = 0;
620
 495:FrameMgr.c    **** 		}
619
 495:FrameMgr.c    **** 		}
621
 496:FrameMgr.c    **** 		else
620
 496:FrameMgr.c    **** 		else
622
 497:FrameMgr.c    **** 		{
621
 497:FrameMgr.c    **** 		{
623
 498:FrameMgr.c    **** 			PUBLISH_FAST_EVENT(FEV_PROCESS_LINE_COMPLETE);
622
 498:FrameMgr.c    **** 			PUBLISH_FAST_EVENT(FEV_PROCESS_LINE_COMPLETE);
624
 499:FrameMgr.c    **** 		}
623
 499:FrameMgr.c    **** 		}
625
 500:FrameMgr.c    **** #endif		
624
 500:FrameMgr.c    **** #endif		
626
 501:FrameMgr.c    **** 	}
625
 501:FrameMgr.c    **** 	}
627
 502:FrameMgr.c    **** 	else
626
 502:FrameMgr.c    **** 	else
628
 503:FrameMgr.c    **** 	{
627
 503:FrameMgr.c    **** 	{
629
 504:FrameMgr.c    **** 		/* ...and here? */
628
 504:FrameMgr.c    **** 		/* ...and here? */
630
 505:FrameMgr.c    **** 	}
629
 505:FrameMgr.c    **** 	}
631
 506:FrameMgr.c    **** }
630
 506:FrameMgr.c    **** }
632
 507:FrameMgr.c    **** 
631
 507:FrameMgr.c    **** 
633
 508:FrameMgr.c    **** /***********************************************************
632
 508:FrameMgr.c    **** /***********************************************************
634
 509:FrameMgr.c    **** 	Function Name: FrameMgr_processFrame
633
 509:FrameMgr.c    **** 	Function Name: FrameMgr_processFrame
635
 510:FrameMgr.c    **** 	Function Description: This function is responsible for
634
 510:FrameMgr.c    **** 	Function Description: This function is responsible for
636
 511:FrameMgr.c    **** 	parsing the completed frame and performing all actions
635
 511:FrameMgr.c    **** 	parsing the completed frame and performing all actions
637
 512:FrameMgr.c    **** 	needed at this level.
636
 512:FrameMgr.c    **** 	needed at this level.
638
 513:FrameMgr.c    **** 	Inputs:  none
637
 513:FrameMgr.c    **** 	Inputs:  none
639
 514:FrameMgr.c    **** 	Outputs: none
638
 514:FrameMgr.c    **** 	Outputs: none
640
 515:FrameMgr.c    **** ***********************************************************/	
639
 515:FrameMgr.c    **** ***********************************************************/	
641
 516:FrameMgr.c    **** void FrameMgr_processFrame(void)
640
 516:FrameMgr.c    **** void FrameMgr_processFrame(void)
642
 517:FrameMgr.c    **** {
641
 517:FrameMgr.c    **** {
643
  93               		.stabn	68,0,517,.LM0-FrameMgr_processFrame
642
  92               		.stabn	68,0,517,.LM0-.LFBB1
644
  94               	.LM0:
643
  93               	.LM0:
-
 
644
  94               	.LFBB1:
645
  95               	/* prologue: frame size=0 */
645
  95               	/* prologue: frame size=0 */
646
  96 0000 DF92      		push r13
646
  96 0000 DF92      		push r13
647
  97 0002 EF92      		push r14
647
  97 0002 EF92      		push r14
648
  98 0004 FF92      		push r15
648
  98 0004 FF92      		push r15
649
  99 0006 0F93      		push r16
649
  99 0006 0F93      		push r16
650
 100 0008 1F93      		push r17
650
 100 0008 1F93      		push r17
651
 101 000a CF93      		push r28
651
 101 000a CF93      		push r28
652
 102 000c DF93      		push r29
652
 102 000c DF93      		push r29
653
 103               	/* prologue end (size=7) */
653
 103               	/* prologue end (size=7) */
654
 518:FrameMgr.c    **** 	unsigned char i,k,color;
654
 518:FrameMgr.c    **** 	unsigned char i,k,color;
655
 519:FrameMgr.c    **** #if DEBUG_FRAME_DATA    
655
 519:FrameMgr.c    **** #if DEBUG_FRAME_DATA    
656
 520:FrameMgr.c    **** 	unsigned char asciiBuffer[5];
656
 520:FrameMgr.c    **** 	unsigned char asciiBuffer[5];
657
 521:FrameMgr.c    ****     unsigned char j;
657
 521:FrameMgr.c    ****     unsigned char j;
658
 522:FrameMgr.c    **** #endif    
658
 522:FrameMgr.c    **** #endif    
659
 523:FrameMgr.c    **** 	unsigned char *pTableData = (unsigned char *)pCurrentTrackedObjectTable;
659
 523:FrameMgr.c    **** 	unsigned char *pTableData = (unsigned char *)pCurrentTrackedObjectTable;
660
 104               		.stabn	68,0,523,.LM1-FrameMgr_processFrame
660
 104               		.stabn	68,0,523,.LM1-.LFBB1
661
GAS LISTING /tmp/ccQRbLT3.s 			page 12
661
GAS LISTING /tmp/cc0XjEMJ.s 			page 12
662
 
662
 
663
 
663
 
664
 105               	.LM1:
664
 105               	.LM1:
665
 106 000e 2091 0000 		lds r18,pCurrentTrackedObjectTable
665
 106 000e 2091 0000 		lds r18,pCurrentTrackedObjectTable
666
 107 0012 3091 0000 		lds r19,(pCurrentTrackedObjectTable)+1
666
 107 0012 3091 0000 		lds r19,(pCurrentTrackedObjectTable)+1
667
 524:FrameMgr.c    **** 	unsigned char tmpUpperLeftX,tmpUpperLeftY,tmpLowerRightX,tmpLowerRightY;
667
 524:FrameMgr.c    **** 	unsigned char tmpUpperLeftX,tmpUpperLeftY,tmpLowerRightX,tmpLowerRightY;
668
 525:FrameMgr.c    **** 	
668
 525:FrameMgr.c    **** 	
669
 526:FrameMgr.c    **** #if DEBUG_FRAME_DATA	
669
 526:FrameMgr.c    **** #if DEBUG_FRAME_DATA	
670
 527:FrameMgr.c    **** 	/* we want to send all of the currently tracked table out
670
 527:FrameMgr.c    **** 	/* we want to send all of the currently tracked table out
671
 528:FrameMgr.c    **** 	the serial port for debugging */
671
 528:FrameMgr.c    **** 	the serial port for debugging */
672
 529:FrameMgr.c    **** 	for (i=0; i<numCurrTrackedObjects; i++)
672
 529:FrameMgr.c    **** 	for (i=0; i<numCurrTrackedObjects; i++)
673
 530:FrameMgr.c    **** 	{
673
 530:FrameMgr.c    **** 	{
674
 531:FrameMgr.c    **** 		UIMgr_txBuffer("----------\r\n",12);
674
 531:FrameMgr.c    **** 		UIMgr_txBuffer("----------\r\n",12);
675
 532:FrameMgr.c    **** 		for (j=0; j<SIZE_OF_TRACKED_OBJECT; j++)
675
 532:FrameMgr.c    **** 		for (j=0; j<SIZE_OF_TRACKED_OBJECT; j++)
676
 533:FrameMgr.c    **** 		{
676
 533:FrameMgr.c    **** 		{
677
 534:FrameMgr.c    **** 			memset(asciiBuffer,0x00,5);
677
 534:FrameMgr.c    **** 			memset(asciiBuffer,0x00,5);
678
 535:FrameMgr.c    **** 			itoa(*pTableData++,asciiBuffer,10);
678
 535:FrameMgr.c    **** 			itoa(*pTableData++,asciiBuffer,10);
679
 536:FrameMgr.c    **** 			UIMgr_txBuffer(asciiBuffer,3); /* 3 ascii bytes for data
679
 536:FrameMgr.c    **** 			UIMgr_txBuffer(asciiBuffer,3); /* 3 ascii bytes for data
680
 537:FrameMgr.c    **** 														+ 1 space */
680
 537:FrameMgr.c    **** 														+ 1 space */
681
 538:FrameMgr.c    **** 			UIMgr_txBuffer("\r\n",2);
681
 538:FrameMgr.c    **** 			UIMgr_txBuffer("\r\n",2);
682
 539:FrameMgr.c    **** 		}
682
 539:FrameMgr.c    **** 		}
683
 540:FrameMgr.c    **** 	}
683
 540:FrameMgr.c    **** 	}
684
 541:FrameMgr.c    **** 	
684
 541:FrameMgr.c    **** 	
685
 542:FrameMgr.c    **** 	/* finally, send a new line */
685
 542:FrameMgr.c    **** 	/* finally, send a new line */
686
 543:FrameMgr.c    **** 	UIMgr_txBuffer("\r\n",2);
686
 543:FrameMgr.c    **** 	UIMgr_txBuffer("\r\n",2);
687
 544:FrameMgr.c    **** 	
687
 544:FrameMgr.c    **** 	
688
 545:FrameMgr.c    **** 	memset(asciiBuffer,0x00,5);
688
 545:FrameMgr.c    **** 	memset(asciiBuffer,0x00,5);
689
 546:FrameMgr.c    **** 	itoa(numCurrTrackedObjects,asciiBuffer,10);
689
 546:FrameMgr.c    **** 	itoa(numCurrTrackedObjects,asciiBuffer,10);
690
 547:FrameMgr.c    **** 	UIMgr_txBuffer(asciiBuffer,3);
690
 547:FrameMgr.c    **** 	UIMgr_txBuffer(asciiBuffer,3);
691
 548:FrameMgr.c    **** 	UIMgr_txBuffer(" PFC\r\n",5);
691
 548:FrameMgr.c    **** 	UIMgr_txBuffer(" PFC\r\n",5);
692
 549:FrameMgr.c    **** 
692
 549:FrameMgr.c    **** 
693
 550:FrameMgr.c    **** #else	
693
 550:FrameMgr.c    **** #else	
694
 551:FrameMgr.c    **** 	/* we only send tracking packets if there are tracked objects */	        
694
 551:FrameMgr.c    **** 	/* we only send tracking packets if there are tracked objects */	        
695
 552:FrameMgr.c    ****     
695
 552:FrameMgr.c    ****     
696
 553:FrameMgr.c    **** 	if (numCurrTrackedObjects > 0)
696
 553:FrameMgr.c    **** 	if (numCurrTrackedObjects > 0)
697
 108               		.stabn	68,0,553,.LM2-FrameMgr_processFrame
697
 108               		.stabn	68,0,553,.LM2-.LFBB1
698
 109               	.LM2:
698
 109               	.LM2:
699
 110 0016 8091 0000 		lds r24,numCurrTrackedObjects
699
 110 0016 8091 0000 		lds r24,numCurrTrackedObjects
700
 111 001a 8823      		tst r24
700
 111 001a 8823      		tst r24
701
 112 001c 09F4      		brne .+2
701
 112 001c 01F4      		brne .+2
702
 113 001e 3FC0      		rjmp .L2
702
 113 001e 00C0      		rjmp .L2
703
 114               		.stabn	68,0,523,.LM3-FrameMgr_processFrame
703
 114               		.stabn	68,0,523,.LM3-.LFBB1
704
 115               	.LM3:
704
 115               	.LM3:
705
 116 0020 E901      		movw r28,r18
705
 116 0020 E901      		movw r28,r18
706
 554:FrameMgr.c    **** 	{		
706
 554:FrameMgr.c    **** 	{		
707
 555:FrameMgr.c    **** 		UIMgr_writeTxFifo(0x0A);					/* header byte for a tracking packet */
707
 555:FrameMgr.c    **** 		UIMgr_writeTxFifo(0x0A);					/* header byte for a tracking packet */
708
 117               		.stabn	68,0,555,.LM4-FrameMgr_processFrame
708
 117               		.stabn	68,0,555,.LM4-.LFBB1
709
 118               	.LM4:
709
 118               	.LM4:
710
 119 0022 8AE0      		ldi r24,lo8(10)
710
 119 0022 8AE0      		ldi r24,lo8(10)
711
 120 0024 00D0      		rcall UIMgr_writeTxFifo
711
 120 0024 00D0      		rcall UIMgr_writeTxFifo
712
 556:FrameMgr.c    ****         /* reset the pointer */
712
 556:FrameMgr.c    ****         /* reset the pointer */
713
 557:FrameMgr.c    ****         pTableData = (unsigned char *)pCurrentTrackedObjectTable;
713
 557:FrameMgr.c    ****         pTableData = (unsigned char *)pCurrentTrackedObjectTable;
714
 558:FrameMgr.c    ****         
714
 558:FrameMgr.c    ****         
715
 559:FrameMgr.c    **** 		UIMgr_writeTxFifo(numCurrTrackedObjects);	/* num of objects tracked */
715
 559:FrameMgr.c    **** 		UIMgr_writeTxFifo(numCurrTrackedObjects);	/* num of objects tracked */
716
 121               		.stabn	68,0,559,.LM5-FrameMgr_processFrame
716
 121               		.stabn	68,0,559,.LM5-.LFBB1
717
 122               	.LM5:
717
 122               	.LM5:
718
 123 0026 8091 0000 		lds r24,numCurrTrackedObjects
718
 123 0026 8091 0000 		lds r24,numCurrTrackedObjects
719
 124 002a 00D0      		rcall UIMgr_writeTxFifo
719
 124 002a 00D0      		rcall UIMgr_writeTxFifo
720
 125 002c DD24      		clr r13
720
 125 002c DD24      		clr r13
721
GAS LISTING /tmp/ccQRbLT3.s 			page 13
721
GAS LISTING /tmp/cc0XjEMJ.s 			page 13
722
 
722
 
723
 
723
 
724
 126               	.L4:
724
 126               	.L4:
725
 560:FrameMgr.c    **** 		for (i=0; i<MAX_TRACKED_OBJECTS; i++)
725
 560:FrameMgr.c    **** 		for (i=0; i<MAX_TRACKED_OBJECTS; i++)
726
 561:FrameMgr.c    **** 		{
726
 561:FrameMgr.c    **** 		{
727
 562:FrameMgr.c    ****             /* we only want to process objects that have their objectValid flag
727
 562:FrameMgr.c    ****             /* we only want to process objects that have their objectValid flag
728
 563:FrameMgr.c    ****             set to TRUE */
728
 563:FrameMgr.c    ****             set to TRUE */
729
 564:FrameMgr.c    ****             if ( *(pTableData + VALID_OBJECT_OFFSET) == TRUE)
729
 564:FrameMgr.c    ****             if ( *(pTableData + VALID_OBJECT_OFFSET) == TRUE)
730
 127               		.stabn	68,0,564,.LM6-FrameMgr_processFrame
730
 127               		.stabn	68,0,564,.LM6-.LFBB1
731
 128               	.LM6:
731
 128               	.LM6:
732
 129 002e 8F81      		ldd r24,Y+7
732
 129 002e 8F81      		ldd r24,Y+7
733
 130 0030 8130      		cpi r24,lo8(1)
733
 130 0030 8130      		cpi r24,lo8(1)
734
 131 0032 69F5      		brne .L5
734
 131 0032 01F4      		brne .L5
735
 565:FrameMgr.c    ****             {
735
 565:FrameMgr.c    ****             {
736
 566:FrameMgr.c    ****                 /* the object is valid...convert the color from bit position to value...remember, 
736
 566:FrameMgr.c    ****                 /* the object is valid...convert the color from bit position to value...remember, 
737
 567:FrameMgr.c    ****                 each bit in the "color" byte corresponds to a color */
737
 567:FrameMgr.c    ****                 each bit in the "color" byte corresponds to a color */
738
 568:FrameMgr.c    ****                 k=0;
738
 568:FrameMgr.c    ****                 k=0;
739
 569:FrameMgr.c    ****                 color = *(pTableData + COLOR_OFFSET);
739
 569:FrameMgr.c    ****                 color = *(pTableData + COLOR_OFFSET);
740
 132               		.stabn	68,0,569,.LM7-FrameMgr_processFrame
740
 132               		.stabn	68,0,569,.LM7-.LFBB1
741
 133               	.LM7:
741
 133               	.LM7:
742
 134 0034 8881      		ld r24,Y
742
 134 0034 8881      		ld r24,Y
743
 570:FrameMgr.c    ****                 if (color == 128) k=0;
743
 570:FrameMgr.c    ****                 if (color == 128) k=0;
744
 135               		.stabn	68,0,570,.LM8-FrameMgr_processFrame
744
 135               		.stabn	68,0,570,.LM8-.LFBB1
745
 136               	.LM8:
745
 136               	.LM8:
746
 137 0036 8038      		cpi r24,lo8(-128)
746
 137 0036 8038      		cpi r24,lo8(-128)
747
 138 0038 E1F0      		breq .L7
747
 138 0038 01F0      		breq .L7
748
 571:FrameMgr.c    ****                 else if (color == 64) k=1;
748
 571:FrameMgr.c    ****                 else if (color == 64) k=1;
749
 139               		.stabn	68,0,571,.LM9-FrameMgr_processFrame
749
 139               		.stabn	68,0,571,.LM9-.LFBB1
750
 140               	.LM9:
750
 140               	.LM9:
751
 141 003a 8034      		cpi r24,lo8(64)
751
 141 003a 8034      		cpi r24,lo8(64)
752
 142 003c 11F4      		brne .L9
752
 142 003c 01F4      		brne .L9
753
 143 003e 81E0      		ldi r24,lo8(1)
753
 143 003e 81E0      		ldi r24,lo8(1)
754
 144 0040 19C0      		rjmp .L11
754
 144 0040 00C0      		rjmp .L11
755
 145               	.L9:
755
 145               	.L9:
756
 572:FrameMgr.c    ****                 else if (color == 32) k=2;
756
 572:FrameMgr.c    ****                 else if (color == 32) k=2;
757
 146               		.stabn	68,0,572,.LM10-FrameMgr_processFrame
757
 146               		.stabn	68,0,572,.LM10-.LFBB1
758
 147               	.LM10:
758
 147               	.LM10:
759
 148 0042 8032      		cpi r24,lo8(32)
759
 148 0042 8032      		cpi r24,lo8(32)
760
 149 0044 11F4      		brne .L12
760
 149 0044 01F4      		brne .L12
761
 150 0046 82E0      		ldi r24,lo8(2)
761
 150 0046 82E0      		ldi r24,lo8(2)
762
 151 0048 15C0      		rjmp .L11
762
 151 0048 00C0      		rjmp .L11
763
 152               	.L12:
763
 152               	.L12:
764
 573:FrameMgr.c    ****                 else if (color == 16) k=3;
764
 573:FrameMgr.c    ****                 else if (color == 16) k=3;
765
 153               		.stabn	68,0,573,.LM11-FrameMgr_processFrame
765
 153               		.stabn	68,0,573,.LM11-.LFBB1
766
 154               	.LM11:
766
 154               	.LM11:
767
 155 004a 8031      		cpi r24,lo8(16)
767
 155 004a 8031      		cpi r24,lo8(16)
768
 156 004c 11F4      		brne .L14
768
 156 004c 01F4      		brne .L14
769
 157 004e 83E0      		ldi r24,lo8(3)
769
 157 004e 83E0      		ldi r24,lo8(3)
770
 158 0050 11C0      		rjmp .L11
770
 158 0050 00C0      		rjmp .L11
771
 159               	.L14:
771
 159               	.L14:
772
 574:FrameMgr.c    ****                 else if (color == 8)  k=4;
772
 574:FrameMgr.c    ****                 else if (color == 8)  k=4;
773
 160               		.stabn	68,0,574,.LM12-FrameMgr_processFrame
773
 160               		.stabn	68,0,574,.LM12-.LFBB1
774
 161               	.LM12:
774
 161               	.LM12:
775
 162 0052 8830      		cpi r24,lo8(8)
775
 162 0052 8830      		cpi r24,lo8(8)
776
 163 0054 11F4      		brne .L16
776
 163 0054 01F4      		brne .L16
777
 164 0056 84E0      		ldi r24,lo8(4)
777
 164 0056 84E0      		ldi r24,lo8(4)
778
 165 0058 0DC0      		rjmp .L11
778
 165 0058 00C0      		rjmp .L11
779
 166               	.L16:
779
 166               	.L16:
780
 575:FrameMgr.c    ****                 else if (color == 4)  k=5;
780
 575:FrameMgr.c    ****                 else if (color == 4)  k=5;
781
GAS LISTING /tmp/ccQRbLT3.s 			page 14
781
GAS LISTING /tmp/cc0XjEMJ.s 			page 14
782
 
782
 
783
 
783
 
784
 167               		.stabn	68,0,575,.LM13-FrameMgr_processFrame
784
 167               		.stabn	68,0,575,.LM13-.LFBB1
785
 168               	.LM13:
785
 168               	.LM13:
786
 169 005a 8430      		cpi r24,lo8(4)
786
 169 005a 8430      		cpi r24,lo8(4)
787
 170 005c 11F4      		brne .L18
787
 170 005c 01F4      		brne .L18
788
 171 005e 85E0      		ldi r24,lo8(5)
788
 171 005e 85E0      		ldi r24,lo8(5)
789
 172 0060 09C0      		rjmp .L11
789
 172 0060 00C0      		rjmp .L11
790
 173               	.L18:
790
 173               	.L18:
791
 576:FrameMgr.c    ****                 else if (color == 2)  k=6;
791
 576:FrameMgr.c    ****                 else if (color == 2)  k=6;
792
 174               		.stabn	68,0,576,.LM14-FrameMgr_processFrame
792
 174               		.stabn	68,0,576,.LM14-.LFBB1
793
 175               	.LM14:
793
 175               	.LM14:
794
 176 0062 8230      		cpi r24,lo8(2)
794
 176 0062 8230      		cpi r24,lo8(2)
795
 177 0064 11F4      		brne .L20
795
 177 0064 01F4      		brne .L20
796
 178 0066 86E0      		ldi r24,lo8(6)
796
 178 0066 86E0      		ldi r24,lo8(6)
797
 179 0068 05C0      		rjmp .L11
797
 179 0068 00C0      		rjmp .L11
798
 180               	.L20:
798
 180               	.L20:
799
 577:FrameMgr.c    ****                 else if (color == 1)  k=7;
799
 577:FrameMgr.c    ****                 else if (color == 1)  k=7;
800
 181               		.stabn	68,0,577,.LM15-FrameMgr_processFrame
800
 181               		.stabn	68,0,577,.LM15-.LFBB1
801
 182               	.LM15:
801
 182               	.LM15:
802
 183 006a 8130      		cpi r24,lo8(1)
802
 183 006a 8130      		cpi r24,lo8(1)
803
 184 006c 11F4      		brne .L7
803
 184 006c 01F4      		brne .L7
804
 185 006e 87E0      		ldi r24,lo8(7)
804
 185 006e 87E0      		ldi r24,lo8(7)
805
 186 0070 01C0      		rjmp .L11
805
 186 0070 00C0      		rjmp .L11
806
 187               	.L7:
806
 187               	.L7:
807
 188 0072 80E0      		ldi r24,lo8(0)
807
 188 0072 80E0      		ldi r24,lo8(0)
808
 189               	.L11:
808
 189               	.L11:
809
 578:FrameMgr.c    ****                 
809
 578:FrameMgr.c    ****                 
810
 579:FrameMgr.c    ****                 tmpUpperLeftX = *(pTableData + X_UPPER_LEFT_OFFSET);	    /* get the upper left X */
810
 579:FrameMgr.c    ****                 tmpUpperLeftX = *(pTableData + X_UPPER_LEFT_OFFSET);	    /* get the upper left X */
811
 190               		.stabn	68,0,579,.LM16-FrameMgr_processFrame
811
 190               		.stabn	68,0,579,.LM16-.LFBB1
812
 191               	.LM16:
812
 191               	.LM16:
813
 192 0074 1B81      		ldd r17,Y+3
813
 192 0074 1B81      		ldd r17,Y+3
814
 580:FrameMgr.c    ****                 tmpUpperLeftY = *(pTableData + Y_UPPER_LEFT_OFFSET);		/* get the upper left Y */		
814
 580:FrameMgr.c    ****                 tmpUpperLeftY = *(pTableData + Y_UPPER_LEFT_OFFSET);		/* get the upper left Y */		
815
 193               		.stabn	68,0,580,.LM17-FrameMgr_processFrame
815
 193               		.stabn	68,0,580,.LM17-.LFBB1
816
 194               	.LM17:
816
 194               	.LM17:
817
 195 0076 0C81      		ldd r16,Y+4
817
 195 0076 0C81      		ldd r16,Y+4
818
 581:FrameMgr.c    ****                 tmpLowerRightX = *(pTableData + X_LOWER_RIGHT_OFFSET);		/* get the lower right X */
818
 581:FrameMgr.c    ****                 tmpLowerRightX = *(pTableData + X_LOWER_RIGHT_OFFSET);		/* get the lower right X */
819
 196               		.stabn	68,0,581,.LM18-FrameMgr_processFrame
819
 196               		.stabn	68,0,581,.LM18-.LFBB1
820
 197               	.LM18:
820
 197               	.LM18:
821
 198 0078 FD80      		ldd r15,Y+5
821
 198 0078 FD80      		ldd r15,Y+5
822
 582:FrameMgr.c    ****                 tmpLowerRightY = *(pTableData + Y_LOWER_RIGHT_OFFSET);		/* get the lower right Y */
822
 582:FrameMgr.c    ****                 tmpLowerRightY = *(pTableData + Y_LOWER_RIGHT_OFFSET);		/* get the lower right Y */
823
 199               		.stabn	68,0,582,.LM19-FrameMgr_processFrame
823
 199               		.stabn	68,0,582,.LM19-.LFBB1
824
 200               	.LM19:
824
 200               	.LM19:
825
 201 007a EE80      		ldd r14,Y+6
825
 201 007a EE80      		ldd r14,Y+6
826
 583:FrameMgr.c    ****                 
826
 583:FrameMgr.c    ****                 
827
 584:FrameMgr.c    ****                 UIMgr_writeTxFifo(k);				  	/* send the color first */
827
 584:FrameMgr.c    ****                 UIMgr_writeTxFifo(k);				  	/* send the color first */
828
 202               		.stabn	68,0,584,.LM20-FrameMgr_processFrame
828
 202               		.stabn	68,0,584,.LM20-.LFBB1
829
 203               	.LM20:
829
 203               	.LM20:
830
 204 007c 00D0      		rcall UIMgr_writeTxFifo
830
 204 007c 00D0      		rcall UIMgr_writeTxFifo
831
 585:FrameMgr.c    ****                 UIMgr_writeTxFifo(tmpUpperLeftX);
831
 585:FrameMgr.c    ****                 UIMgr_writeTxFifo(tmpUpperLeftX);
832
 205               		.stabn	68,0,585,.LM21-FrameMgr_processFrame
832
 205               		.stabn	68,0,585,.LM21-.LFBB1
833
 206               	.LM21:
833
 206               	.LM21:
834
 207 007e 812F      		mov r24,r17
834
 207 007e 812F      		mov r24,r17
835
 208 0080 00D0      		rcall UIMgr_writeTxFifo
835
 208 0080 00D0      		rcall UIMgr_writeTxFifo
836
 586:FrameMgr.c    ****                 UIMgr_writeTxFifo(tmpUpperLeftY);
836
 586:FrameMgr.c    ****                 UIMgr_writeTxFifo(tmpUpperLeftY);
837
 209               		.stabn	68,0,586,.LM22-FrameMgr_processFrame
837
 209               		.stabn	68,0,586,.LM22-.LFBB1
838
 210               	.LM22:
838
 210               	.LM22:
839
 211 0082 802F      		mov r24,r16
839
 211 0082 802F      		mov r24,r16
840
 212 0084 00D0      		rcall UIMgr_writeTxFifo
840
 212 0084 00D0      		rcall UIMgr_writeTxFifo
841
GAS LISTING /tmp/ccQRbLT3.s 			page 15
841
GAS LISTING /tmp/cc0XjEMJ.s 			page 15
842
 
842
 
843
 
843
 
844
 587:FrameMgr.c    ****                 UIMgr_writeTxFifo(tmpLowerRightX);
844
 587:FrameMgr.c    ****                 UIMgr_writeTxFifo(tmpLowerRightX);
845
 213               		.stabn	68,0,587,.LM23-FrameMgr_processFrame
845
 213               		.stabn	68,0,587,.LM23-.LFBB1
846
 214               	.LM23:
846
 214               	.LM23:
847
 215 0086 8F2D      		mov r24,r15
847
 215 0086 8F2D      		mov r24,r15
848
 216 0088 00D0      		rcall UIMgr_writeTxFifo
848
 216 0088 00D0      		rcall UIMgr_writeTxFifo
849
 588:FrameMgr.c    ****                 UIMgr_writeTxFifo(tmpLowerRightY);			
849
 588:FrameMgr.c    ****                 UIMgr_writeTxFifo(tmpLowerRightY);			
850
 217               		.stabn	68,0,588,.LM24-FrameMgr_processFrame
850
 217               		.stabn	68,0,588,.LM24-.LFBB1
851
 218               	.LM24:
851
 218               	.LM24:
852
 219 008a 8E2D      		mov r24,r14
852
 219 008a 8E2D      		mov r24,r14
853
 220 008c 00D0      		rcall UIMgr_writeTxFifo
853
 220 008c 00D0      		rcall UIMgr_writeTxFifo
854
 221               	.L5:
854
 221               	.L5:
855
 222               		.stabn	68,0,560,.LM25-FrameMgr_processFrame
855
 222               		.stabn	68,0,560,.LM25-.LFBB1
856
 223               	.LM25:
856
 223               	.LM25:
857
 224 008e D394      		inc r13
857
 224 008e D394      		inc r13
858
 225 0090 88E0      		ldi r24,lo8(8)
858
 225 0090 88E0      		ldi r24,lo8(8)
859
 226 0092 D816      		cp r13,r24
859
 226 0092 D816      		cp r13,r24
860
 227 0094 11F0      		breq .L23
860
 227 0094 01F0      		breq .L23
861
 589:FrameMgr.c    ****             }
861
 589:FrameMgr.c    ****             }
862
 590:FrameMgr.c    **** 
862
 590:FrameMgr.c    **** 
863
 591:FrameMgr.c    ****             /* move our pointer up to the beginning of the next object */
863
 591:FrameMgr.c    ****             /* move our pointer up to the beginning of the next object */
864
 592:FrameMgr.c    ****             pTableData += SIZE_OF_TRACKED_OBJECT;
864
 592:FrameMgr.c    ****             pTableData += SIZE_OF_TRACKED_OBJECT;
865
 228               		.stabn	68,0,592,.LM26-FrameMgr_processFrame
865
 228               		.stabn	68,0,592,.LM26-.LFBB1
866
 229               	.LM26:
866
 229               	.LM26:
867
 230 0096 2896      		adiw r28,8
867
 230 0096 2896      		adiw r28,8
868
 231 0098 CACF      		rjmp .L4
868
 231 0098 00C0      		rjmp .L4
869
 232               	.L23:
869
 232               	.L23:
870
 593:FrameMgr.c    ****         }
870
 593:FrameMgr.c    ****         }
871
 594:FrameMgr.c    **** 		
871
 594:FrameMgr.c    **** 		
872
 595:FrameMgr.c    **** 		/* all done...send the end of tracking packets char */
872
 595:FrameMgr.c    **** 		/* all done...send the end of tracking packets char */
873
 596:FrameMgr.c    **** 		UIMgr_writeTxFifo(0xFF);
873
 596:FrameMgr.c    **** 		UIMgr_writeTxFifo(0xFF);
874
 233               		.stabn	68,0,596,.LM27-FrameMgr_processFrame
874
 233               		.stabn	68,0,596,.LM27-.LFBB1
875
 234               	.LM27:
875
 234               	.LM27:
876
 235 009a 8FEF      		ldi r24,lo8(-1)
876
 235 009a 8FEF      		ldi r24,lo8(-1)
877
 236 009c 00D0      		rcall UIMgr_writeTxFifo
877
 236 009c 00D0      		rcall UIMgr_writeTxFifo
878
 237               	.L2:
878
 237               	.L2:
879
 597:FrameMgr.c    **** 	}	
879
 597:FrameMgr.c    **** 	}	
880
 598:FrameMgr.c    **** #endif	
880
 598:FrameMgr.c    **** #endif	
881
 599:FrameMgr.c    **** 
881
 599:FrameMgr.c    **** 
882
 600:FrameMgr.c    ****     /* the tracked object table will be cleared out right before we start
882
 600:FrameMgr.c    ****     /* the tracked object table will be cleared out right before we start
883
 601:FrameMgr.c    ****     to wait for VSYNC to indicate a new frame...so it doesn't need to be
883
 601:FrameMgr.c    ****     to wait for VSYNC to indicate a new frame...so it doesn't need to be
884
 602:FrameMgr.c    ****     done now */
884
 602:FrameMgr.c    ****     done now */
885
 603:FrameMgr.c    ****     
885
 603:FrameMgr.c    ****     
886
 604:FrameMgr.c    **** 	/* schedule the next action to acquire a new frame */	
886
 604:FrameMgr.c    **** 	/* schedule the next action to acquire a new frame */	
887
 605:FrameMgr.c    **** 	PUBLISH_EVENT(EV_PROCESS_FRAME_COMPLETE);
887
 605:FrameMgr.c    **** 	PUBLISH_EVENT(EV_PROCESS_FRAME_COMPLETE);
888
 238               		.stabn	68,0,605,.LM28-FrameMgr_processFrame
888
 238               		.stabn	68,0,605,.LM28-.LFBB1
889
 239               	.LM28:
889
 239               	.LM28:
890
 240 009e 84E0      		ldi r24,lo8(4)
890
 240 009e 84E0      		ldi r24,lo8(4)
891
 241 00a0 00D0      		rcall Exec_writeEventFifo
891
 241 00a0 00D0      		rcall Exec_writeEventFifo
892
 242               	/* epilogue: frame size=0 */
892
 242               	/* epilogue: frame size=0 */
893
 243 00a2 DF91      		pop r29
893
 243 00a2 DF91      		pop r29
894
 244 00a4 CF91      		pop r28
894
 244 00a4 CF91      		pop r28
895
 245 00a6 1F91      		pop r17
895
 245 00a6 1F91      		pop r17
896
 246 00a8 0F91      		pop r16
896
 246 00a8 0F91      		pop r16
897
 247 00aa FF90      		pop r15
897
 247 00aa FF90      		pop r15
898
 248 00ac EF90      		pop r14
898
 248 00ac EF90      		pop r14
899
 249 00ae DF90      		pop r13
899
 249 00ae DF90      		pop r13
900
 250 00b0 0895      		ret
900
 250 00b0 0895      		ret
901
GAS LISTING /tmp/ccQRbLT3.s 			page 16
901
GAS LISTING /tmp/cc0XjEMJ.s 			page 16
902
 
902
 
903
 
903
 
904
 251               	/* epilogue end (size=8) */
904
 251               	/* epilogue end (size=8) */
905
 252               	/* function FrameMgr_processFrame size 88 (73) */
905
 252               	/* function FrameMgr_processFrame size 88 (73) */
906
 253               		.size	FrameMgr_processFrame, .-FrameMgr_processFrame
906
 253               		.size	FrameMgr_processFrame, .-FrameMgr_processFrame
907
 254               		.stabs	"i:r(0,11)",64,0,518,13
907
 254               		.stabs	"i:r(0,11)",64,0,518,13
908
 255               		.stabs	"k:r(0,11)",64,0,518,24
908
 255               		.stabs	"k:r(0,11)",64,0,518,24
909
 256               		.stabs	"color:r(0,11)",64,0,518,24
909
 256               		.stabs	"color:r(0,11)",64,0,518,24
910
 257               		.stabs	"pTableData:r(0,22)=*(0,11)",64,0,523,28
910
 257               		.stabs	"pTableData:r(0,22)=*(0,11)",64,0,523,28
911
 258               		.stabs	"tmpUpperLeftX:r(0,11)",64,0,524,17
911
 258               		.stabs	"tmpUpperLeftX:r(0,11)",64,0,524,17
912
 259               		.stabs	"tmpUpperLeftY:r(0,11)",64,0,524,16
912
 259               		.stabs	"tmpUpperLeftY:r(0,11)",64,0,524,16
913
 260               		.stabs	"tmpLowerRightX:r(0,11)",64,0,524,15
913
 260               		.stabs	"tmpLowerRightX:r(0,11)",64,0,524,15
914
 261               		.stabs	"tmpLowerRightY:r(0,11)",64,0,524,14
914
 261               		.stabs	"tmpLowerRightY:r(0,11)",64,0,524,14
915
 262               		.stabn	192,0,0,FrameMgr_processFrame-FrameMgr_processFrame
915
 262               		.stabn	192,0,0,.LFBB1-.LFBB1
916
 263               		.stabn	224,0,0,.Lscope0-FrameMgr_processFrame
916
 263               		.stabn	224,0,0,.Lscope1-.LFBB1
917
 264               	.Lscope0:
917
 264               	.Lscope1:
918
 265               		.stabs	"",36,0,0,.Lscope0-FrameMgr_processFrame
918
 265               		.stabs	"",36,0,0,.Lscope1-.LFBB1
919
 266               		.stabd	78,0,0
919
 266               		.stabd	78,0,0
920
 267               		.stabs	"FrameMgr_processLine:F(0,15)",36,0,342,FrameMgr_processLine
920
 267               		.stabs	"FrameMgr_processLine:F(0,15)",36,0,342,FrameMgr_processLine
921
 268               	.global	FrameMgr_processLine
921
 268               	.global	FrameMgr_processLine
922
 269               		.type	FrameMgr_processLine, @function
922
 269               		.type	FrameMgr_processLine, @function
923
 270               	FrameMgr_processLine:
923
 270               	FrameMgr_processLine:
924
 271               		.stabd	46,0,0
924
 271               		.stabd	46,0,0
925
 272               		.stabn	68,0,342,.LM29-FrameMgr_processLine
925
 272               		.stabn	68,0,342,.LM29-.LFBB2
926
 273               	.LM29:
926
 273               	.LM29:
-
 
927
 274               	.LFBB2:
927
 274               	/* prologue: frame size=1 */
928
 275               	/* prologue: frame size=1 */
928
 275 00b2 2F92      		push r2
929
 276 00b2 2F92      		push r2
929
 276 00b4 3F92      		push r3
930
 277 00b4 3F92      		push r3
930
 277 00b6 4F92      		push r4
931
 278 00b6 4F92      		push r4
931
 278 00b8 5F92      		push r5
932
 279 00b8 5F92      		push r5
932
 279 00ba 6F92      		push r6
933
 280 00ba 6F92      		push r6
933
 280 00bc 7F92      		push r7
934
 281 00bc 7F92      		push r7
934
 281 00be 8F92      		push r8
935
 282 00be 8F92      		push r8
935
 282 00c0 9F92      		push r9
936
 283 00c0 9F92      		push r9
936
 283 00c2 AF92      		push r10
-
 
937
 284 00c4 BF92      		push r11
937
 284 00c2 BF92      		push r11
938
 285 00c6 CF92      		push r12
938
 285 00c4 CF92      		push r12
939
 286 00c8 DF92      		push r13
939
 286 00c6 DF92      		push r13
940
 287 00ca EF92      		push r14
940
 287 00c8 EF92      		push r14
941
 288 00cc FF92      		push r15
941
 288 00ca FF92      		push r15
942
 289 00ce 0F93      		push r16
942
 289 00cc 0F93      		push r16
943
 290 00d0 1F93      		push r17
943
 290 00ce 1F93      		push r17
944
 291 00d2 CF93      		push r28
944
 291 00d0 CF93      		push r28
945
 292 00d4 DF93      		push r29
945
 292 00d2 DF93      		push r29
946
 293 00d6 CDB7      		in r28,__SP_L__
946
 293 00d4 CDB7      		in r28,__SP_L__
947
 294 00d8 DEB7      		in r29,__SP_H__
947
 294 00d6 DEB7      		in r29,__SP_H__
948
 295 00da 2197      		sbiw r28,1
948
 295 00d8 2197      		sbiw r28,1
949
 296 00dc 0FB6      		in __tmp_reg__,__SREG__
949
 296 00da 0FB6      		in __tmp_reg__,__SREG__
950
 297 00de F894      		cli
950
 297 00dc F894      		cli
951
 298 00e0 DEBF      		out __SP_H__,r29
951
 298 00de DEBF      		out __SP_H__,r29
952
 299 00e2 0FBE      		out __SREG__,__tmp_reg__
952
 299 00e0 0FBE      		out __SREG__,__tmp_reg__
953
 300 00e4 CDBF      		out __SP_L__,r28
953
 300 00e2 CDBF      		out __SP_L__,r28
954
 301               	/* prologue end (size=26) */
954
 301               	/* prologue end (size=25) */
955
 302               		.stabn	68,0,345,.LM30-FrameMgr_processLine
955
 302               		.stabn	68,0,345,.LM30-.LFBB2
956
 303               	.LM30:
956
 303               	.LM30:
957
 304 00e6 0091 0000 		lds r16,pCurrentTrackedObjectTable
957
 304 00e4 4091 0000 		lds r20,pCurrentTrackedObjectTable
958
 305 00ea 1091 0000 		lds r17,(pCurrentTrackedObjectTable)+1
958
 305 00e8 5091 0000 		lds r21,(pCurrentTrackedObjectTable)+1
959
 306               		.stabn	68,0,352,.LM31-FrameMgr_processLine
959
 306               		.stabn	68,0,352,.LM31-.LFBB2
960
 307               	.LM31:
960
 307               	.LM31:
961
GAS LISTING /tmp/ccQRbLT3.s 			page 17
961
GAS LISTING /tmp/cc0XjEMJ.s 			page 17
962
 
962
 
963
 
963
 
964
 308 00ee 8091 0000 		lds r24,currentState
964
 308 00ec 8091 0000 		lds r24,currentState
965
 309 00f2 8230      		cpi r24,lo8(2)
965
 309 00f0 8230      		cpi r24,lo8(2)
966
 310 00f4 09F0      		breq .+2
966
 310 00f2 01F0      		breq .+2
967
 311 00f6 6AC0      		rjmp .L27
967
 311 00f4 00C0      		rjmp .L27
968
 312               		.stabn	68,0,361,.LM32-FrameMgr_processLine
968
 312               		.stabn	68,0,361,.LM32-.LFBB2
969
 313               	.LM32:
969
 313               	.LM32:
970
 314 00f8 8BE0      		ldi r24,lo8(11)
970
 314 00f6 8BE0      		ldi r24,lo8(11)
971
 315 00fa 00D0      		rcall UartInt_txByte
971
 315 00f8 00D0      		rcall UartInt_txByte
972
 316               		.stabn	68,0,362,.LM33-FrameMgr_processLine
972
 316               		.stabn	68,0,362,.LM33-.LFBB2
973
 317               	.LM33:
973
 317               	.LM33:
974
 318 00fc 8091 0000 		lds r24,lineCount
974
 318 00fa 8091 0000 		lds r24,lineCount
975
 319 0100 00D0      		rcall UartInt_txByte
975
 319 00fe 00D0      		rcall UartInt_txByte
976
 320 0102 0F2E      		mov __tmp_reg__,r31
976
 320 0100 00E0      		ldi r16,lo8(currentLineBuffer)
977
 321 0104 F0E0      		ldi r31,lo8(currentLineBuffer)
977
 321 0102 10E0      		ldi r17,hi8(currentLineBuffer)
978
 322 0106 CF2E      		mov r12,r31
978
 322 0104 0F2E      		mov __tmp_reg__,r31
979
 323 0108 F0E0      		ldi r31,hi8(currentLineBuffer)
979
 323 0106 F0E0      		ldi r31,lo8(previousLineBuffer)
980
 324 010a DF2E      		mov r13,r31
980
 324 0108 EF2E      		mov r14,r31
981
 325 010c F02D      		mov r31,__tmp_reg__
981
 325 010a F0E0      		ldi r31,hi8(previousLineBuffer)
982
 326 010e 00E0      		ldi r16,lo8(0)
982
 326 010c FF2E      		mov r15,r31
983
 327 0110 10E0      		ldi r17,hi8(0)
983
 327 010e F02D      		mov r31,__tmp_reg__
984
 328 0112 0F2E      		mov __tmp_reg__,r31
984
 328               		.stabn	68,0,363,.LM34-.LFBB2
985
 329 0114 F0E0      		ldi r31,lo8(previousLineBuffer)
985
 329               	.LM34:
986
 330 0116 EF2E      		mov r14,r31
986
 330 0110 0F2E      		mov __tmp_reg__,r31
987
 331 0118 F0E0      		ldi r31,hi8(previousLineBuffer)
987
 331 0112 F0E0      		ldi r31,lo8(currentLineBuffer+176)
988
 332 011a FF2E      		mov r15,r31
988
 332 0114 CF2E      		mov r12,r31
989
 333 011c F02D      		mov r31,__tmp_reg__
989
 333 0116 F0E0      		ldi r31,hi8(currentLineBuffer+176)
990
 334               	.L29:
990
 334 0118 DF2E      		mov r13,r31
991
 335               		.stabn	68,0,370,.LM34-FrameMgr_processLine
991
 335 011a F02D      		mov r31,__tmp_reg__
992
 336               	.LM34:
992
 336               	.L29:
993
 337 011e F601      		movw r30,r12
993
 337               		.stabn	68,0,370,.LM35-.LFBB2
994
 338 0120 8081      		ld r24,Z
994
 338               	.LM35:
995
 339 0122 8983      		std Y+1,r24
995
 339 011c D801      		movw r26,r16
996
 340               		.stabn	68,0,371,.LM35-FrameMgr_processLine
996
 340 011e 8C91      		ld r24,X
997
 341               	.LM35:
997
 341 0120 8983      		std Y+1,r24
998
 342 0124 8981      		ldd r24,Y+1
998
 342               		.stabn	68,0,371,.LM36-.LFBB2
999
 343 0126 8F70      		andi r24,lo8(15)
999
 343               	.LM36:
1000
 344 0128 8983      		std Y+1,r24
1000
 344 0122 8981      		ldd r24,Y+1
1001
 345               		.stabn	68,0,372,.LM36-FrameMgr_processLine
1001
 345 0124 8F70      		andi r24,lo8(15)
1002
 346               	.LM36:
1002
 346 0126 8983      		std Y+1,r24
1003
 347 012a 8981      		ldd r24,Y+1
1003
 347               		.stabn	68,0,372,.LM37-.LFBB2
1004
 348 012c 8295      		swap r24
1004
 348               	.LM37:
1005
 349 012e 807F      		andi r24,0xf0
1005
 349 0128 8981      		ldd r24,Y+1
1006
 350 0130 8983      		std Y+1,r24
1006
 350 012a 8295      		swap r24
1007
 351               		.stabn	68,0,373,.LM37-FrameMgr_processLine
1007
 351 012c 807F      		andi r24,0xf0
1008
 352               	.LM37:
1008
 352 012e 8983      		std Y+1,r24
1009
 353 0132 9981      		ldd r25,Y+1
1009
 353               		.stabn	68,0,373,.LM38-.LFBB2
1010
 354 0134 F701      		movw r30,r14
1010
 354               	.LM38:
1011
 355 0136 8081      		ld r24,Z
1011
 355 0130 9981      		ldd r25,Y+1
1012
 356 0138 8F70      		andi r24,lo8(15)
1012
 356 0132 F701      		movw r30,r14
1013
 357 013a 892B      		or r24,r25
1013
 357 0134 8081      		ld r24,Z
1014
 358 013c 8983      		std Y+1,r24
1014
 358 0136 8F70      		andi r24,lo8(15)
1015
 359               		.stabn	68,0,376,.LM38-FrameMgr_processLine
1015
 359 0138 892B      		or r24,r25
1016
 360               	.LM38:
1016
 360 013a 8983      		std Y+1,r24
1017
 361 013e 8981      		ldd r24,Y+1
1017
 361               		.stabn	68,0,376,.LM39-.LFBB2
1018
 362 0140 00D0      		rcall UartInt_txByte
1018
 362               	.LM39:
1019
 363               		.stabn	68,0,379,.LM39-FrameMgr_processLine
1019
 363 013c 8981      		ldd r24,Y+1
1020
 364               	.LM39:
1020
 364 013e 00D0      		rcall UartInt_txByte
1021
GAS LISTING /tmp/ccQRbLT3.s 			page 18
1021
GAS LISTING /tmp/cc0XjEMJ.s 			page 18
1022
 
1022
 
1023
 
1023
 
1024
 365 0142 D801      		movw r26,r16
1024
 365               		.stabn	68,0,379,.LM40-.LFBB2
1025
 366 0144 1196      		adiw r26,1
1025
 366               	.LM40:
1026
 367 0146 FD01      		movw r30,r26
1026
 367 0140 F701      		movw r30,r14
1027
 368 0148 E050      		subi r30,lo8(-(previousLineBuffer))
1027
 368 0142 8181      		ldd r24,Z+1
1028
 369 014a F040      		sbci r31,hi8(-(previousLineBuffer))
1028
 369 0144 8983      		std Y+1,r24
1029
 370 014c 8081      		ld r24,Z
1029
 370               		.stabn	68,0,380,.LM41-.LFBB2
1030
 371 014e 8983      		std Y+1,r24
1030
 371               	.LM41:
1031
 372               		.stabn	68,0,380,.LM40-FrameMgr_processLine
1031
 372 0146 8981      		ldd r24,Y+1
1032
 373               	.LM40:
1032
 373 0148 8F70      		andi r24,lo8(15)
1033
 374 0150 8981      		ldd r24,Y+1
1033
 374 014a 8983      		std Y+1,r24
1034
 375 0152 8F70      		andi r24,lo8(15)
1034
 375               		.stabn	68,0,381,.LM42-.LFBB2
1035
 376 0154 8983      		std Y+1,r24
1035
 376               	.LM42:
1036
 377               		.stabn	68,0,381,.LM41-FrameMgr_processLine
1036
 377 014c 8981      		ldd r24,Y+1
1037
 378               	.LM41:
1037
 378 014e 8295      		swap r24
1038
 379 0156 8981      		ldd r24,Y+1
1038
 379 0150 807F      		andi r24,0xf0
1039
 380 0158 8295      		swap r24
1039
 380 0152 8983      		std Y+1,r24
1040
 381 015a 807F      		andi r24,0xf0
1040
 381               		.stabn	68,0,382,.LM43-.LFBB2
1041
 382 015c 8983      		std Y+1,r24
1041
 382               	.LM43:
1042
 383               		.stabn	68,0,382,.LM42-FrameMgr_processLine
1042
 383 0154 9981      		ldd r25,Y+1
1043
 384               	.LM42:
1043
 384 0156 F801      		movw r30,r16
1044
 385 015e 9981      		ldd r25,Y+1
1044
 385 0158 8181      		ldd r24,Z+1
1045
 386 0160 A050      		subi r26,lo8(-(currentLineBuffer))
1045
 386 015a 8F70      		andi r24,lo8(15)
1046
 387 0162 B040      		sbci r27,hi8(-(currentLineBuffer))
1046
 387 015c 892B      		or r24,r25
1047
 388 0164 8C91      		ld r24,X
1047
 388 015e 8983      		std Y+1,r24
1048
 389 0166 8F70      		andi r24,lo8(15)
1048
 389               		.stabn	68,0,385,.LM44-.LFBB2
1049
 390 0168 892B      		or r24,r25
1049
 390               	.LM44:
1050
 391 016a 8983      		std Y+1,r24
1050
 391 0160 8981      		ldd r24,Y+1
1051
 392               		.stabn	68,0,385,.LM43-FrameMgr_processLine
1051
 392 0162 00D0      		rcall UartInt_txByte
1052
 393               	.LM43:
1052
 393 0164 0E5F      		subi r16,lo8(-(2))
1053
 394 016c 8981      		ldd r24,Y+1
1053
 394 0166 1F4F      		sbci r17,hi8(-(2))
1054
 395 016e 00D0      		rcall UartInt_txByte
1054
 395 0168 82E0      		ldi r24,lo8(2)
1055
 396 0170 82E0      		ldi r24,lo8(2)
1055
 396 016a 90E0      		ldi r25,hi8(2)
1056
 397 0172 90E0      		ldi r25,hi8(2)
1056
 397 016c E80E      		add r14,r24
1057
 398 0174 C80E      		add r12,r24
1057
 398 016e F91E      		adc r15,r25
1058
 399 0176 D91E      		adc r13,r25
1058
 399               		.stabn	68,0,363,.LM45-.LFBB2
1059
 400 0178 0E5F      		subi r16,lo8(-(2))
1059
 400               	.LM45:
1060
 401 017a 1F4F      		sbci r17,hi8(-(2))
1060
 401 0170 0C15      		cp r16,r12
1061
 402 017c E80E      		add r14,r24
1061
 402 0172 1D05      		cpc r17,r13
1062
 403 017e F91E      		adc r15,r25
1062
 403 0174 01F4      		brne .L29
1063
 404               		.stabn	68,0,363,.LM44-FrameMgr_processLine
1063
 404               		.stabn	68,0,387,.LM46-.LFBB2
1064
 405               	.LM44:
1064
 405               	.LM46:
1065
 406 0180 003B      		cpi r16,176
1065
 406 0176 8FE0      		ldi r24,lo8(15)
1066
 407 0182 1105      		cpc r17,__zero_reg__
1066
 407 0178 00D0      		rcall UartInt_txByte
1067
 408 0184 61F6      		brne .L29
1067
 408               		.stabn	68,0,391,.LM47-.LFBB2
1068
 409               		.stabn	68,0,387,.LM45-FrameMgr_processLine
1068
 409               	.LM47:
1069
 410               	.LM45:
1069
 410 017a 8091 0000 		lds r24,lineCount
1070
 411 0186 8FE0      		ldi r24,lo8(15)
1070
 411 017e 8F5F      		subi r24,lo8(-(1))
1071
 412 0188 00D0      		rcall UartInt_txByte
1071
 412 0180 8093 0000 		sts lineCount,r24
1072
 413               		.stabn	68,0,391,.LM46-FrameMgr_processLine
1072
 413               		.stabn	68,0,394,.LM48-.LFBB2
1073
 414               	.LM46:
1073
 414               	.LM48:
1074
 415 018a 8091 0000 		lds r24,lineCount
1074
 415 0184 8834      		cpi r24,lo8(72)
1075
 416 018e 8F5F      		subi r24,lo8(-(1))
1075
 416 0186 00F0      		brlo .L31
1076
 417 0190 8093 0000 		sts lineCount,r24
1076
 417               		.stabn	68,0,398,.LM49-.LFBB2
1077
 418               		.stabn	68,0,394,.LM47-FrameMgr_processLine
1077
 418               	.LM49:
1078
 419               	.LM47:
1078
 419 0188 1092 0000 		sts lineCount,__zero_reg__
1079
 420 0194 8834      		cpi r24,lo8(72)
1079
 420               		.stabn	68,0,399,.LM50-.LFBB2
1080
 421 0196 60F0      		brlo .L31
1080
 421               	.LM50:
1081
GAS LISTING /tmp/ccQRbLT3.s 			page 19
1081
GAS LISTING /tmp/cc0XjEMJ.s 			page 19
1082
 
1082
 
1083
 
1083
 
1084
 422               		.stabn	68,0,398,.LM48-FrameMgr_processLine
1084
 422 018c 1092 0000 		sts currentState,__zero_reg__
1085
 423               	.LM48:
1085
 423               		.stabn	68,0,402,.LM51-.LFBB2
1086
 424 0198 1092 0000 		sts lineCount,__zero_reg__
1086
 424               	.LM51:
1087
 425               		.stabn	68,0,399,.LM49-FrameMgr_processLine
1087
 425 0190 89B7      		in r24,89-0x20
1088
 426               	.LM49:
1088
 426 0192 8B7F      		andi r24,lo8(-5)
1089
 427 019c 1092 0000 		sts currentState,__zero_reg__
1089
 427 0194 89BF      		out 89-0x20,r24
1090
 428               		.stabn	68,0,402,.LM50-FrameMgr_processLine
1090
 428               		.stabn	68,0,404,.LM52-.LFBB2
1091
 429               	.LM50:
1091
 429               	.LM52:
1092
 430 01a0 89B7      		in r24,89-0x20
1092
 430 0196 60E0      		ldi r22,lo8(0)
1093
 431 01a2 8B7F      		andi r24,lo8(-5)
1093
 431 0198 81E1      		ldi r24,lo8(17)
1094
 432 01a4 89BF      		out 89-0x20,r24
1094
 432 019a 00D0      		rcall CamConfig_setCamReg
1095
 433               		.stabn	68,0,404,.LM51-FrameMgr_processLine
1095
 433               		.stabn	68,0,405,.LM53-.LFBB2
1096
 434               	.LM51:
1096
 434               	.LM53:
1097
 435 01a6 60E0      		ldi r22,lo8(0)
1097
 435 019c 00D0      		rcall CamConfig_sendFifoCmds
1098
 436 01a8 81E1      		ldi r24,lo8(17)
1098
 436 019e 00C0      		rjmp .L72
1099
 437 01aa 00D0      		rcall CamConfig_setCamReg
1099
 437               	.L31:
1100
 438               		.stabn	68,0,405,.LM52-FrameMgr_processLine
1100
 438               		.stabn	68,0,410,.LM54-.LFBB2
1101
 439               	.LM52:
1101
 439               	.LM54:
1102
 440 01ac 00D0      		rcall CamConfig_sendFifoCmds
1102
 440 01a0 8091 0000 		lds r24,fastEventBitmask
1103
 441 01ae C8C0      		rjmp .L71
1103
 441 01a4 8260      		ori r24,lo8(2)
1104
 442               	.L31:
1104
 442 01a6 8093 0000 		sts fastEventBitmask,r24
1105
 443               		.stabn	68,0,410,.LM53-FrameMgr_processLine
1105
 443 01aa 00C0      		rjmp .L72
1106
 444               	.LM53:
1106
 444               	.L27:
1107
 445 01b0 8091 0000 		lds r24,fastEventBitmask
1107
 445               		.stabn	68,0,413,.LM55-.LFBB2
1108
 446 01b4 8260      		ori r24,lo8(2)
1108
 446               	.LM55:
1109
 447 01b6 8093 0000 		sts fastEventBitmask,r24
1109
 447 01ac 8130      		cpi r24,lo8(1)
1110
 448 01ba C2C0      		rjmp .L71
1110
 448 01ae 01F0      		breq .+2
1111
 449               	.L72:
1111
 449 01b0 00C0      		rjmp .L72
1112
 450               		.stabn	68,0,491,.LM54-FrameMgr_processLine
1112
 450               	.LBB4:
1113
 451               	.LM54:
1113
 451               	.LBB5:
1114
 452 01bc 80E2      		ldi r24,lo8(32)
-
 
1115
 453 01be 00D0      		rcall Exec_writeEventFifo
-
 
1116
 454               		.stabn	68,0,493,.LM55-FrameMgr_processLine
-
 
1117
 455               	.LM55:
-
 
1118
 456 01c0 89B7      		in r24,89-0x20
-
 
1119
 457 01c2 8B7F      		andi r24,lo8(-5)
-
 
1120
 458 01c4 89BF      		out 89-0x20,r24
-
 
1121
 459               		.stabn	68,0,494,.LM56-FrameMgr_processLine
-
 
1122
 460               	.LM56:
-
 
1123
 461 01c6 1092 0000 		sts trackedLineCount,__zero_reg__
-
 
1124
 462 01ca BAC0      		rjmp .L71
-
 
1125
 463               	.L27:
-
 
1126
 464               		.stabn	68,0,413,.LM57-FrameMgr_processLine
-
 
1127
 465               	.LM57:
-
 
1128
 466 01cc 8130      		cpi r24,lo8(1)
-
 
1129
 467 01ce 09F0      		breq .+2
-
 
1130
 468 01d0 B7C0      		rjmp .L71
-
 
1131
 469               	.LBB4:
-
 
1132
 470               	.LBB5:
-
 
1133
 606:FrameMgr.c    **** }
1114
 606:FrameMgr.c    **** }
1134
 607:FrameMgr.c    **** 
1115
 607:FrameMgr.c    **** 
1135
 608:FrameMgr.c    **** /***********************************************************
1116
 608:FrameMgr.c    **** /***********************************************************
1136
 609:FrameMgr.c    **** 	Function Name: FrameMgr_findConnectedness
1117
 609:FrameMgr.c    **** 	Function Name: FrameMgr_findConnectedness
1137
 610:FrameMgr.c    **** 	Function Description: This function is responsible for
1118
 610:FrameMgr.c    **** 	Function Description: This function is responsible for
1138
 611:FrameMgr.c    **** 	finding the connectedness between two particular run-
1119
 611:FrameMgr.c    **** 	finding the connectedness between two particular run-
1139
 612:FrameMgr.c    **** 	length encoded lines of pixel data.  It updates the
1120
 612:FrameMgr.c    **** 	length encoded lines of pixel data.  It updates the
1140
 613:FrameMgr.c    **** 	trackingTable as needed.
1121
 613:FrameMgr.c    **** 	trackingTable as needed.
1141
GAS LISTING /tmp/ccQRbLT3.s 			page 20
-
 
1142
 
-
 
1143
 
-
 
1144
 614:FrameMgr.c    **** 	Inputs:  none
1122
 614:FrameMgr.c    **** 	Inputs:  none
1145
 615:FrameMgr.c    **** 	Outputs: none
1123
 615:FrameMgr.c    **** 	Outputs: none
1146
 616:FrameMgr.c    **** ***********************************************************/	
1124
 616:FrameMgr.c    **** ***********************************************************/	
1147
 617:FrameMgr.c    **** static void FrameMgr_findConnectedness(void)
1125
 617:FrameMgr.c    **** static void FrameMgr_findConnectedness(void)
1148
 618:FrameMgr.c    **** {
1126
 618:FrameMgr.c    **** {
1149
 619:FrameMgr.c    **** 	trackedColor_t currColor;
1127
 619:FrameMgr.c    **** 	trackedColor_t currColor;
1150
 620:FrameMgr.c    **** 	unsigned char *pCurrLineColorInfo = currentLineBuffer;
1128
 620:FrameMgr.c    **** 	unsigned char *pCurrLineColorInfo = currentLineBuffer;
1151
 621:FrameMgr.c    **** 	unsigned char *pTrackedObjectData;
1129
 621:FrameMgr.c    **** 	unsigned char *pTrackedObjectData;
1152
 622:FrameMgr.c    **** 	register unsigned char currPixelRunStart=0;
1130
 622:FrameMgr.c    **** 	register unsigned char currPixelRunStart=0;
1153
 623:FrameMgr.c    **** 	register unsigned char currPixelRunFinish=0; 
1131
 623:FrameMgr.c    **** 	register unsigned char currPixelRunFinish=0; 
1154
 624:FrameMgr.c    **** 	register unsigned char lastLineXStart=0;
1132
 624:FrameMgr.c    **** 	register unsigned char lastLineXStart=0;
1155
 625:FrameMgr.c    **** 	register unsigned char lastLineXFinish=0;  
1133
 625:FrameMgr.c    **** 	register unsigned char lastLineXFinish=0;  
1156
 626:FrameMgr.c    **** 	register unsigned char runLength=1;
1134
 626:FrameMgr.c    **** 	register unsigned char runLength=1;
1157
 627:FrameMgr.c    **** 	unsigned char i;
1135
 627:FrameMgr.c    **** 	unsigned char i;
1158
 628:FrameMgr.c    **** 	bool_t colorConnected;	
1136
 628:FrameMgr.c    **** 	bool_t colorConnected;	
1159
 629:FrameMgr.c    **** 	
1137
 629:FrameMgr.c    **** 	
1160
 630:FrameMgr.c    **** 	do
1138
 630:FrameMgr.c    **** 	do
1161
 631:FrameMgr.c    **** 	{
1139
 631:FrameMgr.c    **** 	{
1162
 632:FrameMgr.c    **** 		/* grab both the current color and the number of pixels
1140
 632:FrameMgr.c    **** 		/* grab both the current color and the number of pixels
-
 
1141
GAS LISTING /tmp/cc0XjEMJ.s 			page 20
-
 
1142
 
-
 
1143
 
1163
 633:FrameMgr.c    **** 		in the run...remember, pixels start at 1, not 0! */
1144
 633:FrameMgr.c    **** 		in the run...remember, pixels start at 1, not 0! */
1164
 634:FrameMgr.c    **** 		colorConnected = FALSE;
1145
 634:FrameMgr.c    **** 		colorConnected = FALSE;
1165
 635:FrameMgr.c    **** 		currColor = *pCurrLineColorInfo++;
1146
 635:FrameMgr.c    **** 		currColor = *pCurrLineColorInfo++;
1166
 636:FrameMgr.c    **** 		currPixelRunStart += runLength;
1147
 636:FrameMgr.c    **** 		currPixelRunStart += runLength;
1167
 637:FrameMgr.c    **** 		runLength = *pCurrLineColorInfo++;
1148
 637:FrameMgr.c    **** 		runLength = *pCurrLineColorInfo++;
1168
 638:FrameMgr.c    **** 		currPixelRunFinish += runLength;
1149
 638:FrameMgr.c    **** 		currPixelRunFinish += runLength;
1169
 639:FrameMgr.c    ****       
1150
 639:FrameMgr.c    ****       
1170
 640:FrameMgr.c    ****         /* make sure that the run-length is at least as wide as
1151
 640:FrameMgr.c    ****         /* make sure that the run-length is at least as wide as
1171
 641:FrameMgr.c    ****         the minimum horizontal tracking width, and we care about the color */ 
1152
 641:FrameMgr.c    ****         the minimum horizontal tracking width, and we care about the color */ 
1172
 642:FrameMgr.c    ****         
1153
 642:FrameMgr.c    ****         
1173
 643:FrameMgr.c    **** 		if ( (currColor != notTracked) && (runLength > MIN_OBJECT_TRACKING_WIDTH) )
1154
 643:FrameMgr.c    **** 		if ( (currColor != notTracked) && (runLength > MIN_OBJECT_TRACKING_WIDTH) )
1174
 644:FrameMgr.c    **** 		{			
1155
 644:FrameMgr.c    **** 		{			
1175
 645:FrameMgr.c    ****             /* this run contains a color we care about, so 
1156
 645:FrameMgr.c    ****             /* this run contains a color we care about, so 
1176
 646:FrameMgr.c    **** 			either it will begin a new tracked object, or it
1157
 646:FrameMgr.c    **** 			either it will begin a new tracked object, or it
1177
 647:FrameMgr.c    **** 			is connected to a currently tracked object...
1158
 647:FrameMgr.c    **** 			is connected to a currently tracked object...
1178
 648:FrameMgr.c    **** 			compare it with each object in the tracking
1159
 648:FrameMgr.c    **** 			compare it with each object in the tracking
1179
 649:FrameMgr.c    **** 			table...we can't just look at the numTrackedObjects because
1160
 649:FrameMgr.c    **** 			table...we can't just look at the numTrackedObjects because
1180
 650:FrameMgr.c    ****             it is entirely possible that the first couple of objects could
1161
 650:FrameMgr.c    ****             it is entirely possible that the first couple of objects could
1181
 651:FrameMgr.c    ****             be invalid...
1162
 651:FrameMgr.c    ****             be invalid...
1182
 652:FrameMgr.c    **** 
1163
 652:FrameMgr.c    **** 
1183
 653:FrameMgr.c    ****             NOTE: Instead of accessing each element in the trackedObjectTable
1164
 653:FrameMgr.c    ****             NOTE: Instead of accessing each element in the trackedObjectTable
1184
 654:FrameMgr.c    ****             through the 'i' index, and then accessing the fields in each structure,
1165
 654:FrameMgr.c    ****             through the 'i' index, and then accessing the fields in each structure,
1185
 655:FrameMgr.c    ****             a pointer to each entry is established each time through the loop, followed
1166
 655:FrameMgr.c    ****             a pointer to each entry is established each time through the loop, followed
1186
 656:FrameMgr.c    ****             by accessing the elements through specified offsets.  GCC seems to be
1167
 656:FrameMgr.c    ****             by accessing the elements through specified offsets.  GCC seems to be
1187
 657:FrameMgr.c    ****             able to optimize this code much better than simply accessing the elements
1168
 657:FrameMgr.c    ****             able to optimize this code much better than simply accessing the elements
1188
 658:FrameMgr.c    ****             of each structure in the array the more normal way...*/
1169
 658:FrameMgr.c    ****             of each structure in the array the more normal way...*/
1189
 659:FrameMgr.c    ****             
1170
 659:FrameMgr.c    ****             
1190
 660:FrameMgr.c    ****             pTrackedObjectData = (unsigned char *)pCurrentTrackedObjectTable;
1171
 660:FrameMgr.c    ****             pTrackedObjectData = (unsigned char *)pCurrentTrackedObjectTable;
1191
 661:FrameMgr.c    **** 			for (i=0; i<MAX_TRACKED_OBJECTS; i++)
1172
 661:FrameMgr.c    **** 			for (i=0; i<MAX_TRACKED_OBJECTS; i++)
1192
 662:FrameMgr.c    **** 			{
1173
 662:FrameMgr.c    **** 			{
1193
 663:FrameMgr.c    **** 				if ( (currColor == *(pTrackedObjectData + COLOR_OFFSET)) && 
1174
 663:FrameMgr.c    **** 				if ( (currColor == *(pTrackedObjectData + COLOR_OFFSET)) && 
-
 
1175
 452               		.stabn	68,0,663,.LM56-.LFBB2
-
 
1176
 453               	.LM56:
-
 
1177
 454 01b2 B090 0000 		lds r11,trackedLineCount
-
 
1178
 455 01b6 EB2C      		mov r14,r11
-
 
1179
 456 01b8 FF24      		clr r15
-
 
1180
 457 01ba 3701      		movw r6,r14
-
 
1181
 458 01bc 0894      		sec
-
 
1182
 459 01be 6108      		sbc r6,__zero_reg__
-
 
1183
 460 01c0 7108      		sbc r7,__zero_reg__
-
 
1184
 461 01c2 0091 0000 		lds r16,numCurrTrackedObjects
-
 
1185
 462 01c6 10E0      		ldi r17,lo8(0)
-
 
1186
 463 01c8 60E0      		ldi r22,lo8(0)
-
 
1187
 464 01ca 71E0      		ldi r23,lo8(1)
-
 
1188
 465 01cc 0F2E      		mov __tmp_reg__,r31
-
 
1189
 466 01ce F0E0      		ldi r31,lo8(currentLineBuffer)
-
 
1190
 467 01d0 2F2E      		mov r2,r31
-
 
1191
 468 01d2 F0E0      		ldi r31,hi8(currentLineBuffer)
-
 
1192
 469 01d4 3F2E      		mov r3,r31
-
 
1193
 470 01d6 F02D      		mov r31,__tmp_reg__
-
 
1194
 471               	.L35:
-
 
1195
 472               		.stabn	68,0,635,.LM57-.LFBB2
-
 
1196
 473               	.LM57:
-
 
1197
 474 01d8 D101      		movw r26,r2
-
 
1198
 475 01da 3C91      		ld r19,X
-
 
1199
 476               		.stabn	68,0,636,.LM58-.LFBB2
-
 
1200
 477               	.LM58:
-
 
1201
GAS LISTING /tmp/cc0XjEMJ.s 			page 21
-
 
1202
 
-
 
1203
 
-
 
1204
 478 01dc 170F      		add r17,r23
-
 
1205
 479               		.stabn	68,0,637,.LM59-.LFBB2
-
 
1206
 480               	.LM59:
-
 
1207
 481 01de F101      		movw r30,r2
-
 
1208
 482 01e0 7181      		ldd r23,Z+1
-
 
1209
 483 01e2 82E0      		ldi r24,lo8(2)
-
 
1210
 484 01e4 90E0      		ldi r25,hi8(2)
-
 
1211
 485 01e6 280E      		add r2,r24
-
 
1212
 486 01e8 391E      		adc r3,r25
-
 
1213
 487               		.stabn	68,0,638,.LM60-.LFBB2
-
 
1214
 488               	.LM60:
-
 
1215
 489 01ea 670F      		add r22,r23
-
 
1216
 490               		.stabn	68,0,643,.LM61-.LFBB2
-
 
1217
 491               	.LM61:
-
 
1218
 492 01ec 3323      		tst r19
-
 
1219
 493 01ee 01F4      		brne .+2
-
 
1220
 494 01f0 00C0      		rjmp .L36
-
 
1221
 495 01f2 7430      		cpi r23,lo8(4)
-
 
1222
 496 01f4 00F4      		brsh .+2
-
 
1223
 497 01f6 00C0      		rjmp .L36
-
 
1224
 498 01f8 FA01      		movw r30,r20
-
 
1225
 499 01fa 20E0      		ldi r18,lo8(0)
-
 
1226
 500               	.L39:
-
 
1227
 501               		.stabn	68,0,663,.LM62-.LFBB2
-
 
1228
 502               	.LM62:
-
 
1229
 503 01fc 8081      		ld r24,Z
-
 
1230
 504 01fe 8317      		cp r24,r19
-
 
1231
 505 0200 01F4      		brne .L40
-
 
1232
 506 0202 8781      		ldd r24,Z+7
-
 
1233
 507 0204 8130      		cpi r24,lo8(1)
-
 
1234
 508 0206 01F4      		brne .L40
-
 
1235
 509 0208 0F2E      		mov __tmp_reg__,r31
-
 
1236
 510 020a F6E0      		ldi r31,lo8(6)
-
 
1237
 511 020c CF2E      		mov r12,r31
-
 
1238
 512 020e DD24      		clr r13
-
 
1239
 513 0210 F02D      		mov r31,__tmp_reg__
-
 
1240
 514 0212 CE0E      		add r12,r30
-
 
1241
 515 0214 DF1E      		adc r13,r31
-
 
1242
 516 0216 8681      		ldd r24,Z+6
-
 
1243
 517 0218 9927      		clr r25
-
 
1244
 518 021a 8615      		cp r24,r6
-
 
1245
 519 021c 9705      		cpc r25,r7
-
 
1246
 520 021e 01F4      		brne .L40
-
 
1247
 521 0220 2F01      		movw r4,r30
-
 
1248
 522 0222 0894      		sec
-
 
1249
 523 0224 411C      		adc r4,__zero_reg__
-
 
1250
 524 0226 511C      		adc r5,__zero_reg__
1194
 664:FrameMgr.c    ****                      (*(pTrackedObjectData + VALID_OBJECT_OFFSET) == TRUE) &&
1251
 664:FrameMgr.c    ****                      (*(pTrackedObjectData + VALID_OBJECT_OFFSET) == TRUE) &&
1195
 665:FrameMgr.c    ****                      (*(pTrackedObjectData + Y_LOWER_RIGHT_OFFSET) == trackedLineCount - 1) )
1252
 665:FrameMgr.c    ****                      (*(pTrackedObjectData + Y_LOWER_RIGHT_OFFSET) == trackedLineCount - 1) )
1196
 666:FrameMgr.c    **** 				{
1253
 666:FrameMgr.c    **** 				{
1197
 667:FrameMgr.c    **** 					/* found a color match and the object is valid...check to see if there is
1254
 667:FrameMgr.c    **** 					/* found a color match and the object is valid...check to see if there is
1198
 668:FrameMgr.c    **** 					connectedness */
1255
 668:FrameMgr.c    **** 					connectedness */
1199
 669:FrameMgr.c    **** 					lastLineXStart = *(pTrackedObjectData + LAST_LINE_X_START_OFFSET);
1256
 669:FrameMgr.c    **** 					lastLineXStart = *(pTrackedObjectData + LAST_LINE_X_START_OFFSET);
1200
 670:FrameMgr.c    **** 					lastLineXFinish = *(pTrackedObjectData + LAST_LINE_X_FINISH_OFFSET);
1257
 525               		.stabn	68,0,669,.LM63-.LFBB2
-
 
1258
 526               	.LM63:
-
 
1259
 527 0228 8181      		ldd r24,Z+1
-
 
1260
 528 022a 8824      		clr r8
1201
GAS LISTING /tmp/ccQRbLT3.s 			page 21
1261
GAS LISTING /tmp/cc0XjEMJ.s 			page 22
1202
 
1262
 
1203
 
1263
 
-
 
1264
 529 022c 9924      		clr r9
-
 
1265
 530 022e 6894      		set
-
 
1266
 531 0230 81F8      		bld r8,1
-
 
1267
 532 0232 8E0E      		add r8,r30
-
 
1268
 533 0234 9F1E      		adc r9,r31
-
 
1269
 670:FrameMgr.c    **** 					lastLineXFinish = *(pTrackedObjectData + LAST_LINE_X_FINISH_OFFSET);
-
 
1270
 534               		.stabn	68,0,670,.LM64-.LFBB2
-
 
1271
 535               	.LM64:
-
 
1272
 536 0236 9281      		ldd r25,Z+2
1204
 671:FrameMgr.c    **** 					
1273
 671:FrameMgr.c    **** 					
1205
 672:FrameMgr.c    **** 					/* Check for the 5 following types of line connectedness:
1274
 672:FrameMgr.c    **** 					/* Check for the 5 following types of line connectedness:
1206
 673:FrameMgr.c    **** 					---------------------
1275
 673:FrameMgr.c    **** 					---------------------
1207
 674:FrameMgr.c    **** 					|                   |
1276
 674:FrameMgr.c    **** 					|                   |
1208
 675:FrameMgr.c    **** 					---------------------
1277
 675:FrameMgr.c    **** 					---------------------
1209
 676:FrameMgr.c    **** 					         -------------------------
1278
 676:FrameMgr.c    **** 					         -------------------------
1210
 677:FrameMgr.c    **** 							 |                       |
1279
 677:FrameMgr.c    **** 							 |                       |
1211
 678:FrameMgr.c    **** 							 -------------------------  */
1280
 678:FrameMgr.c    **** 							 -------------------------  */
1212
 679:FrameMgr.c    **** 					if ( (	(currPixelRunStart >= lastLineXStart) &&
1281
 679:FrameMgr.c    **** 					if ( (	(currPixelRunStart >= lastLineXStart) &&
-
 
1282
 537               		.stabn	68,0,679,.LM65-.LFBB2
-
 
1283
 538               	.LM65:
-
 
1284
 539 0238 1817      		cp r17,r24
-
 
1285
 540 023a 00F0      		brlo .L44
-
 
1286
 541 023c 9117      		cp r25,r17
-
 
1287
 542 023e 00F4      		brsh .L46
-
 
1288
 543               	.L44:
-
 
1289
 544 0240 6817      		cp r22,r24
-
 
1290
 545 0242 00F0      		brlo .L47
-
 
1291
 546 0244 9617      		cp r25,r22
-
 
1292
 547 0246 00F4      		brsh .L46
-
 
1293
 548               	.L47:
-
 
1294
 549 0248 8117      		cp r24,r17
-
 
1295
 550 024a 00F0      		brlo .L40
-
 
1296
 551 024c 6917      		cp r22,r25
-
 
1297
 552 024e 00F0      		brlo .L40
-
 
1298
 553               	.L46:
1213
 680:FrameMgr.c    **** 							(currPixelRunStart <= lastLineXFinish) )  ||
1299
 680:FrameMgr.c    **** 							(currPixelRunStart <= lastLineXFinish) )  ||
1214
 681:FrameMgr.c    **** 							
1300
 681:FrameMgr.c    **** 							
1215
 682:FrameMgr.c    **** 					/*               ---------------------
1301
 682:FrameMgr.c    **** 					/*               ---------------------
1216
 683:FrameMgr.c    **** 					                 |                   |
1302
 683:FrameMgr.c    **** 					                 |                   |
1217
 684:FrameMgr.c    **** 									 ---------------------
1303
 684:FrameMgr.c    **** 									 ---------------------
1218
 685:FrameMgr.c    **** 						-------------------
1304
 685:FrameMgr.c    **** 						-------------------
1219
 686:FrameMgr.c    **** 						|                 |
1305
 686:FrameMgr.c    **** 						|                 |
1220
 687:FrameMgr.c    **** 						-------------------  
1306
 687:FrameMgr.c    **** 						-------------------  
1221
 688:FrameMgr.c    **** 						                   OR
1307
 688:FrameMgr.c    **** 						                   OR
1222
 689:FrameMgr.c    **** 						     ------------------------------
1308
 689:FrameMgr.c    **** 						     ------------------------------
1223
 690:FrameMgr.c    **** 							 |                            |
1309
 690:FrameMgr.c    **** 							 |                            |
1224
 691:FrameMgr.c    **** 							 ------------------------------
1310
 691:FrameMgr.c    **** 							 ------------------------------
1225
 692:FrameMgr.c    **** 							              ---------
1311
 692:FrameMgr.c    **** 							              ---------
1226
 693:FrameMgr.c    **** 										  |       |
1312
 693:FrameMgr.c    **** 										  |       |
1227
 694:FrameMgr.c    **** 										  ---------  */
1313
 694:FrameMgr.c    **** 										  ---------  */
1228
 695:FrameMgr.c    **** 						 (	(currPixelRunFinish >= lastLineXStart) && 
1314
 695:FrameMgr.c    **** 						 (	(currPixelRunFinish >= lastLineXStart) && 
1229
 696:FrameMgr.c    **** 							(currPixelRunFinish <= lastLineXFinish) ) ||
1315
 696:FrameMgr.c    **** 							(currPixelRunFinish <= lastLineXFinish) ) ||
1230
 697:FrameMgr.c    **** 							
1316
 697:FrameMgr.c    **** 							
1231
 698:FrameMgr.c    **** 							
1317
 698:FrameMgr.c    **** 							
1232
 699:FrameMgr.c    **** 					/*     -------------------------------
1318
 699:FrameMgr.c    **** 					/*     -------------------------------
1233
 700:FrameMgr.c    **** 					       |                             |
1319
 700:FrameMgr.c    **** 					       |                             |
1234
 701:FrameMgr.c    **** 						   -------------------------------
1320
 701:FrameMgr.c    **** 						   -------------------------------
-
 
1321
GAS LISTING /tmp/cc0XjEMJ.s 			page 23
-
 
1322
 
-
 
1323
 
1235
 702:FrameMgr.c    **** 						   -------------------------------
1324
 702:FrameMgr.c    **** 						   -------------------------------
1236
 703:FrameMgr.c    **** 						   |                             |
1325
 703:FrameMgr.c    **** 						   |                             |
1237
 704:FrameMgr.c    **** 						   -------------------------------
1326
 704:FrameMgr.c    **** 						   -------------------------------
1238
 705:FrameMgr.c    **** 						                  OR
1327
 705:FrameMgr.c    **** 						                  OR
1239
 706:FrameMgr.c    **** 								     -------------
1328
 706:FrameMgr.c    **** 								     -------------
1240
 707:FrameMgr.c    **** 									 |           |
1329
 707:FrameMgr.c    **** 									 |           |
1241
 708:FrameMgr.c    **** 									 -------------
1330
 708:FrameMgr.c    **** 									 -------------
1242
 709:FrameMgr.c    **** 							-------------------------------
1331
 709:FrameMgr.c    **** 							-------------------------------
1243
 710:FrameMgr.c    **** 							|                             |
1332
 710:FrameMgr.c    **** 							|                             |
1244
 711:FrameMgr.c    **** 							-------------------------------   */
1333
 711:FrameMgr.c    **** 							-------------------------------   */
1245
 712:FrameMgr.c    **** 						 (  (currPixelRunStart <= lastLineXStart) &&
1334
 712:FrameMgr.c    **** 						 (  (currPixelRunStart <= lastLineXStart) &&
1246
 713:FrameMgr.c    **** 							(currPixelRunFinish >= lastLineXFinish) ) )
1335
 713:FrameMgr.c    **** 							(currPixelRunFinish >= lastLineXFinish) ) )
1247
 714:FrameMgr.c    **** 					{
1336
 714:FrameMgr.c    **** 					{
1248
 715:FrameMgr.c    **** 						/* THERE IS CONNECTEDNESS...update the lastLineXStart and lastLineXFinish
1337
 715:FrameMgr.c    **** 						/* THERE IS CONNECTEDNESS...update the lastLineXStart and lastLineXFinish
1249
 716:FrameMgr.c    **** 						data pointed to by pTrackedObjectData */
1338
 716:FrameMgr.c    **** 						data pointed to by pTrackedObjectData */
1250
 717:FrameMgr.c    **** 						*(pTrackedObjectData + LAST_LINE_X_START_OFFSET) = currPixelRunStart;
1339
 717:FrameMgr.c    **** 						*(pTrackedObjectData + LAST_LINE_X_START_OFFSET) = currPixelRunStart;
-
 
1340
 554               		.stabn	68,0,717,.LM66-.LFBB2
-
 
1341
 555               	.LM66:
-
 
1342
 556 0250 D201      		movw r26,r4
-
 
1343
 557 0252 1C93      		st X,r17
1251
 718:FrameMgr.c    **** 						*(pTrackedObjectData + LAST_LINE_X_FINISH_OFFSET) = currPixelRunFinish;
1344
 718:FrameMgr.c    **** 						*(pTrackedObjectData + LAST_LINE_X_FINISH_OFFSET) = currPixelRunFinish;
-
 
1345
 558               		.stabn	68,0,718,.LM67-.LFBB2
-
 
1346
 559               	.LM67:
-
 
1347
 560 0254 D401      		movw r26,r8
-
 
1348
 561 0256 6C93      		st X,r22
1252
 719:FrameMgr.c    **** 						
1349
 719:FrameMgr.c    **** 						
1253
 720:FrameMgr.c    **** 						/* check if the bounding box needs to be updated */
1350
 720:FrameMgr.c    **** 						/* check if the bounding box needs to be updated */
1254
 721:FrameMgr.c    **** 						if (*(pTrackedObjectData + X_UPPER_LEFT_OFFSET) > currPixelRunStart)
1351
 721:FrameMgr.c    **** 						if (*(pTrackedObjectData + X_UPPER_LEFT_OFFSET) > currPixelRunStart)
-
 
1352
 562               		.stabn	68,0,721,.LM68-.LFBB2
-
 
1353
 563               	.LM68:
-
 
1354
 564 0258 8381      		ldd r24,Z+3
-
 
1355
 565 025a 1817      		cp r17,r24
-
 
1356
 566 025c 00F4      		brsh .L50
1255
 722:FrameMgr.c    **** 						{
1357
 722:FrameMgr.c    **** 						{
1256
 723:FrameMgr.c    **** 							/* need to update the bounding box for the upper left point to 
1358
 723:FrameMgr.c    **** 							/* need to update the bounding box for the upper left point to 
1257
 724:FrameMgr.c    **** 							enclose this new left-most point...we never have to update the
1359
 724:FrameMgr.c    **** 							enclose this new left-most point...we never have to update the
1258
 725:FrameMgr.c    **** 							upper left Y point, since each scan line we process moves from
1360
 725:FrameMgr.c    **** 							upper left Y point, since each scan line we process moves from
1259
 726:FrameMgr.c    **** 							top to bottom */
1361
 726:FrameMgr.c    **** 							top to bottom */
1260
 727:FrameMgr.c    **** 							*(pTrackedObjectData + X_UPPER_LEFT_OFFSET) = currPixelRunStart;
1362
 727:FrameMgr.c    **** 							*(pTrackedObjectData + X_UPPER_LEFT_OFFSET) = currPixelRunStart;
-
 
1363
 567               		.stabn	68,0,727,.LM69-.LFBB2
-
 
1364
 568               	.LM69:
1261
GAS LISTING /tmp/ccQRbLT3.s 			page 22
1365
 569 025e 1383      		std Z+3,r17
1262
 
-
 
1263
 
-
 
-
 
1366
 570               	.L50:
1264
 728:FrameMgr.c    **** 						}
1367
 728:FrameMgr.c    **** 						}
1265
 729:FrameMgr.c    **** 
1368
 729:FrameMgr.c    **** 
1266
 730:FrameMgr.c    **** 						if ( *(pTrackedObjectData + X_LOWER_RIGHT_OFFSET) < currPixelRunFinish)
1369
 730:FrameMgr.c    **** 						if ( *(pTrackedObjectData + X_LOWER_RIGHT_OFFSET) < currPixelRunFinish)
-
 
1370
 571               		.stabn	68,0,730,.LM70-.LFBB2
-
 
1371
 572               	.LM70:
-
 
1372
 573 0260 8581      		ldd r24,Z+5
-
 
1373
 574 0262 8617      		cp r24,r22
-
 
1374
 575 0264 00F4      		brsh .L52
1267
 731:FrameMgr.c    **** 						{
1375
 731:FrameMgr.c    **** 						{
1268
 732:FrameMgr.c    **** 							/* need to update the bounding box for the lower right X point to
1376
 732:FrameMgr.c    **** 							/* need to update the bounding box for the lower right X point to
1269
 733:FrameMgr.c    **** 							enclose this new right-most point */
1377
 733:FrameMgr.c    **** 							enclose this new right-most point */
1270
 734:FrameMgr.c    **** 							*(pTrackedObjectData + X_LOWER_RIGHT_OFFSET) = currPixelRunFinish;
1378
 734:FrameMgr.c    **** 							*(pTrackedObjectData + X_LOWER_RIGHT_OFFSET) = currPixelRunFinish;
-
 
1379
 576               		.stabn	68,0,734,.LM71-.LFBB2
-
 
1380
 577               	.LM71:
-
 
1381
GAS LISTING /tmp/cc0XjEMJ.s 			page 24
-
 
1382
 
-
 
1383
 
-
 
1384
 578 0266 6583      		std Z+5,r22
-
 
1385
 579               	.L52:
1271
 735:FrameMgr.c    **** 						}
1386
 735:FrameMgr.c    **** 						}
1272
 736:FrameMgr.c    **** 						
1387
 736:FrameMgr.c    **** 						
1273
 737:FrameMgr.c    **** 						/* the lower right 'y' point always gets updated when connectedness is found */
1388
 737:FrameMgr.c    **** 						/* the lower right 'y' point always gets updated when connectedness is found */
1274
 738:FrameMgr.c    **** 						*(pTrackedObjectData + Y_LOWER_RIGHT_OFFSET) = trackedLineCount;
1389
 738:FrameMgr.c    **** 						*(pTrackedObjectData + Y_LOWER_RIGHT_OFFSET) = trackedLineCount;
-
 
1390
 580               		.stabn	68,0,738,.LM72-.LFBB2
-
 
1391
 581               	.LM72:
-
 
1392
 582 0268 F601      		movw r30,r12
-
 
1393
 583 026a B082      		st Z,r11
-
 
1394
 584 026c 00C0      		rjmp .L36
-
 
1395
 585               	.L40:
-
 
1396
 586               		.stabn	68,0,661,.LM73-.LFBB2
-
 
1397
 587               	.LM73:
-
 
1398
 588 026e 2F5F      		subi r18,lo8(-(1))
-
 
1399
 589 0270 2830      		cpi r18,lo8(8)
-
 
1400
 590 0272 01F4      		brne .+2
-
 
1401
 591 0274 00C0      		rjmp .L54
1275
 739:FrameMgr.c    **** 						
1402
 739:FrameMgr.c    **** 						
1276
 740:FrameMgr.c    **** 						/* set a flag indicating that that color run is part of another
1403
 740:FrameMgr.c    **** 						/* set a flag indicating that that color run is part of another
1277
 741:FrameMgr.c    **** 						object and thus doesn't need to be added as a new entry into the
1404
 741:FrameMgr.c    **** 						object and thus doesn't need to be added as a new entry into the
1278
 742:FrameMgr.c    **** 						tracking table */
1405
 742:FrameMgr.c    **** 						tracking table */
1279
 743:FrameMgr.c    **** 						colorConnected = TRUE;
1406
 743:FrameMgr.c    **** 						colorConnected = TRUE;
1280
 744:FrameMgr.c    **** 						break;
1407
 744:FrameMgr.c    **** 						break;
1281
 745:FrameMgr.c    **** 					}
1408
 745:FrameMgr.c    **** 					}
1282
 746:FrameMgr.c    **** 				}
1409
 746:FrameMgr.c    **** 				}
1283
 747:FrameMgr.c    ****                 
1410
 747:FrameMgr.c    ****                 
1284
 748:FrameMgr.c    ****                 /* go to the next object */
1411
 748:FrameMgr.c    ****                 /* go to the next object */
1285
 749:FrameMgr.c    ****                 pTrackedObjectData += SIZE_OF_TRACKED_OBJECT;
1412
 749:FrameMgr.c    ****                 pTrackedObjectData += SIZE_OF_TRACKED_OBJECT;
-
 
1413
 592               		.stabn	68,0,749,.LM74-.LFBB2
-
 
1414
 593               	.LM74:
-
 
1415
 594 0276 3896      		adiw r30,8
-
 
1416
 595 0278 00C0      		rjmp .L39
-
 
1417
 596               	.L56:
-
 
1418
 597 027a FA01      		movw r30,r20
-
 
1419
 598 027c 90E0      		ldi r25,lo8(0)
-
 
1420
 599               	.L57:
1286
 750:FrameMgr.c    **** 			}
1421
 750:FrameMgr.c    **** 			}
1287
 751:FrameMgr.c    **** 			
1422
 751:FrameMgr.c    **** 			
1288
 752:FrameMgr.c    **** 			if (colorConnected == FALSE)
1423
 752:FrameMgr.c    **** 			if (colorConnected == FALSE)
1289
 753:FrameMgr.c    **** 			{
1424
 753:FrameMgr.c    **** 			{
1290
 754:FrameMgr.c    **** 				/* a new entry needs to be made to the tracking table, since we have
1425
 754:FrameMgr.c    **** 				/* a new entry needs to be made to the tracking table, since we have
1291
 755:FrameMgr.c    **** 				a run-length with a color, and it isn't connected to anything...but we
1426
 755:FrameMgr.c    **** 				a run-length with a color, and it isn't connected to anything...but we
1292
 756:FrameMgr.c    **** 				can only do this if there is space left in the trackedObject table */
1427
 756:FrameMgr.c    **** 				can only do this if there is space left in the trackedObject table */
1293
 757:FrameMgr.c    **** 				if (numCurrTrackedObjects < MAX_TRACKED_OBJECTS)
1428
 757:FrameMgr.c    **** 				if (numCurrTrackedObjects < MAX_TRACKED_OBJECTS)
1294
 758:FrameMgr.c    **** 				{                
1429
 758:FrameMgr.c    **** 				{                
1295
 759:FrameMgr.c    ****                     /* space is available...add the object...but first we need to find an
1430
 759:FrameMgr.c    ****                     /* space is available...add the object...but first we need to find an
1296
 760:FrameMgr.c    ****                     invalid object in the object tracking table */
1431
 760:FrameMgr.c    ****                     invalid object in the object tracking table */
1297
 761:FrameMgr.c    ****                     pTrackedObjectData = (unsigned char *)pCurrentTrackedObjectTable;
1432
 761:FrameMgr.c    ****                     pTrackedObjectData = (unsigned char *)pCurrentTrackedObjectTable;
1298
 762:FrameMgr.c    ****                     for (i=0; i<MAX_TRACKED_OBJECTS; i++)
1433
 762:FrameMgr.c    ****                     for (i=0; i<MAX_TRACKED_OBJECTS; i++)
1299
 763:FrameMgr.c    ****                     {
1434
 763:FrameMgr.c    ****                     {
1300
 764:FrameMgr.c    ****                         if ( *(pTrackedObjectData + VALID_OBJECT_OFFSET) == FALSE)  break;
1435
 764:FrameMgr.c    ****                         if ( *(pTrackedObjectData + VALID_OBJECT_OFFSET) == FALSE)  break;
-
 
1436
 600               		.stabn	68,0,764,.LM75-.LFBB2
-
 
1437
 601               	.LM75:
-
 
1438
 602 027e 8781      		ldd r24,Z+7
-
 
1439
 603 0280 8823      		tst r24
-
 
1440
 604 0282 01F0      		breq .L58
-
 
1441
GAS LISTING /tmp/cc0XjEMJ.s 			page 25
-
 
1442
 
-
 
1443
 
1301
 765:FrameMgr.c    ****                         
1444
 765:FrameMgr.c    ****                         
1302
 766:FrameMgr.c    ****                         /* if we haven't broken above, then the object must have been valid...
1445
 766:FrameMgr.c    ****                         /* if we haven't broken above, then the object must have been valid...
1303
 767:FrameMgr.c    ****                         go ahead and move the pointer to the next object to check it */
1446
 767:FrameMgr.c    ****                         go ahead and move the pointer to the next object to check it */
1304
 768:FrameMgr.c    ****                         pTrackedObjectData += SIZE_OF_TRACKED_OBJECT;
1447
 768:FrameMgr.c    ****                         pTrackedObjectData += SIZE_OF_TRACKED_OBJECT;
-
 
1448
 605               		.stabn	68,0,768,.LM76-.LFBB2
-
 
1449
 606               	.LM76:
-
 
1450
 607 0284 3896      		adiw r30,8
-
 
1451
 608               		.stabn	68,0,762,.LM77-.LFBB2
-
 
1452
 609               	.LM77:
-
 
1453
 610 0286 9F5F      		subi r25,lo8(-(1))
-
 
1454
 611 0288 9830      		cpi r25,lo8(8)
-
 
1455
 612 028a 01F4      		brne .L57
-
 
1456
 613               	.L58:
1305
 769:FrameMgr.c    ****                     }
1457
 769:FrameMgr.c    ****                     }
1306
 770:FrameMgr.c    ****                     
1458
 770:FrameMgr.c    ****                     
1307
 771:FrameMgr.c    **** 					
1459
 771:FrameMgr.c    **** 					
1308
 772:FrameMgr.c    **** 					/* now that we have a pointer to the tracked object to be updated, update all
1460
 772:FrameMgr.c    **** 					/* now that we have a pointer to the tracked object to be updated, update all
1309
 773:FrameMgr.c    **** 					the fields */
1461
 773:FrameMgr.c    **** 					the fields */
1310
 774:FrameMgr.c    **** 					*(pTrackedObjectData + COLOR_OFFSET)                = currColor;			/* color */
1462
 774:FrameMgr.c    **** 					*(pTrackedObjectData + COLOR_OFFSET)                = currColor;			/* color */
-
 
1463
 614               		.stabn	68,0,774,.LM78-.LFBB2
-
 
1464
 615               	.LM78:
-
 
1465
 616 028c 3083      		st Z,r19
1311
 775:FrameMgr.c    **** 					*(pTrackedObjectData + LAST_LINE_X_START_OFFSET)    = currPixelRunStart; 	/* lastLineXStart */
1466
 775:FrameMgr.c    **** 					*(pTrackedObjectData + LAST_LINE_X_START_OFFSET)    = currPixelRunStart; 	/* lastLineXStart */
-
 
1467
 617               		.stabn	68,0,775,.LM79-.LFBB2
-
 
1468
 618               	.LM79:
-
 
1469
 619 028e 1183      		std Z+1,r17
1312
 776:FrameMgr.c    **** 					*(pTrackedObjectData + LAST_LINE_X_FINISH_OFFSET)   = currPixelRunFinish;	/* lastLineXFinish *
1470
 776:FrameMgr.c    **** 					*(pTrackedObjectData + LAST_LINE_X_FINISH_OFFSET)   = currPixelRunFinish;	/* lastLineXFinish *
-
 
1471
 620               		.stabn	68,0,776,.LM80-.LFBB2
-
 
1472
 621               	.LM80:
-
 
1473
 622 0290 6283      		std Z+2,r22
1313
 777:FrameMgr.c    **** 					*(pTrackedObjectData + X_UPPER_LEFT_OFFSET)         = currPixelRunStart;	/* x_upperLeft */
1474
 777:FrameMgr.c    **** 					*(pTrackedObjectData + X_UPPER_LEFT_OFFSET)         = currPixelRunStart;	/* x_upperLeft */
-
 
1475
 623               		.stabn	68,0,777,.LM81-.LFBB2
-
 
1476
 624               	.LM81:
-
 
1477
 625 0292 1383      		std Z+3,r17
1314
 778:FrameMgr.c    **** 					*(pTrackedObjectData + Y_UPPER_LEFT_OFFSET)         = trackedLineCount;	/* y_upperLeft */
1478
 778:FrameMgr.c    **** 					*(pTrackedObjectData + Y_UPPER_LEFT_OFFSET)         = trackedLineCount;	/* y_upperLeft */
1315
 471               		.stabn	68,0,778,.LM58-FrameMgr_processLine
-
 
1316
 472               	.LM58:
-
 
1317
 473 01d2 F090 0000 		lds r15,trackedLineCount
-
 
1318
 474               		.stabn	68,0,663,.LM59-FrameMgr_processLine
-
 
1319
 475               	.LM59:
-
 
1320
 476 01d6 CF2C      		mov r12,r15
-
 
1321
GAS LISTING /tmp/ccQRbLT3.s 			page 23
-
 
1322
 
-
 
1323
 
-
 
1324
 477 01d8 DD24      		clr r13
-
 
1325
 478 01da 3601      		movw r6,r12
-
 
1326
 479 01dc 0894      		sec
-
 
1327
 480 01de 6108      		sbc r6,__zero_reg__
-
 
1328
 481 01e0 7108      		sbc r7,__zero_reg__
-
 
1329
 482 01e2 7091 0000 		lds r23,numCurrTrackedObjects
-
 
1330
 483 01e6 0F2E      		mov __tmp_reg__,r31
-
 
1331
 484 01e8 F0E0      		ldi r31,lo8(currentLineBuffer)
-
 
1332
 485 01ea 2F2E      		mov r2,r31
-
 
1333
 486 01ec F0E0      		ldi r31,hi8(currentLineBuffer)
-
 
1334
 487 01ee 3F2E      		mov r3,r31
-
 
1335
 488 01f0 F02D      		mov r31,__tmp_reg__
-
 
1336
 489 01f2 50E0      		ldi r21,lo8(0)
-
 
1337
 490 01f4 40E0      		ldi r20,lo8(0)
-
 
1338
 491 01f6 61E0      		ldi r22,lo8(1)
-
 
1339
 492 01f8 EF2C      		mov r14,r15
-
 
1340
 493 01fa E394      		inc r14
-
 
1341
 494               	.L35:
-
 
1342
 495               		.stabn	68,0,635,.LM60-FrameMgr_processLine
-
 
1343
 496               	.LM60:
-
 
1344
 497 01fc F101      		movw r30,r2
-
 
1345
 498 01fe 3081      		ld r19,Z
-
 
1346
 499               		.stabn	68,0,636,.LM61-FrameMgr_processLine
-
 
1347
 500               	.LM61:
-
 
1348
 501 0200 560F      		add r21,r22
-
 
1349
 502               		.stabn	68,0,637,.LM62-FrameMgr_processLine
-
 
1350
 503               	.LM62:
-
 
1351
 504 0202 6181      		ldd r22,Z+1
-
 
1352
 505 0204 82E0      		ldi r24,lo8(2)
-
 
1353
 506 0206 90E0      		ldi r25,hi8(2)
-
 
1354
 507 0208 280E      		add r2,r24
-
 
1355
 508 020a 391E      		adc r3,r25
-
 
1356
 509               		.stabn	68,0,638,.LM63-FrameMgr_processLine
-
 
1357
 510               	.LM63:
-
 
1358
 511 020c 460F      		add r20,r22
-
 
1359
 512               		.stabn	68,0,643,.LM64-FrameMgr_processLine
-
 
1360
 513               	.LM64:
-
 
1361
 514 020e 3323      		tst r19
-
 
1362
 515 0210 09F4      		brne .+2
-
 
1363
 516 0212 5CC0      		rjmp .L36
-
 
1364
 517 0214 6430      		cpi r22,lo8(4)
-
 
1365
 518 0216 08F4      		brsh .+2
-
 
1366
 519 0218 59C0      		rjmp .L36
-
 
1367
 520 021a D801      		movw r26,r16
-
 
1368
 521 021c 20E0      		ldi r18,lo8(0)
-
 
1369
 522               	.L39:
-
 
1370
 523               		.stabn	68,0,663,.LM65-FrameMgr_processLine
-
 
1371
 524               	.LM65:
-
 
1372
 525 021e 8C91      		ld r24,X
-
 
1373
 526 0220 3817      		cp r19,r24
-
 
1374
 527 0222 C9F5      		brne .L40
-
 
1375
 528 0224 FD01      		movw r30,r26
-
 
1376
 529 0226 8781      		ldd r24,Z+7
-
 
1377
 530 0228 8130      		cpi r24,lo8(1)
-
 
1378
 531 022a A9F5      		brne .L40
-
 
1379
 532 022c 0F2E      		mov __tmp_reg__,r31
-
 
1380
 533 022e F6E0      		ldi r31,lo8(6)
-
 
1381
GAS LISTING /tmp/ccQRbLT3.s 			page 24
-
 
1382
 
-
 
1383
 
-
 
1384
 534 0230 AF2E      		mov r10,r31
-
 
1385
 535 0232 BB24      		clr r11
-
 
1386
 536 0234 F02D      		mov r31,__tmp_reg__
-
 
1387
 537 0236 AA0E      		add r10,r26
-
 
1388
 538 0238 BB1E      		adc r11,r27
-
 
1389
 539 023a 8681      		ldd r24,Z+6
-
 
1390
 540 023c 9927      		clr r25
-
 
1391
 541 023e 8615      		cp r24,r6
-
 
1392
 542 0240 9705      		cpc r25,r7
-
 
1393
 543 0242 49F5      		brne .L40
-
 
1394
 544 0244 2D01      		movw r4,r26
-
 
1395
 545 0246 0894      		sec
-
 
1396
 546 0248 411C      		adc r4,__zero_reg__
-
 
1397
 547 024a 511C      		adc r5,__zero_reg__
-
 
1398
 548               		.stabn	68,0,669,.LM66-FrameMgr_processLine
-
 
1399
 549               	.LM66:
-
 
1400
 550 024c 8181      		ldd r24,Z+1
-
 
1401
 551 024e 8824      		clr r8
-
 
1402
 552 0250 9924      		clr r9
-
 
1403
 553 0252 6894      		set
-
 
1404
 554 0254 81F8      		bld r8,1
-
 
1405
 555 0256 8A0E      		add r8,r26
-
 
1406
 556 0258 9B1E      		adc r9,r27
-
 
1407
 557               		.stabn	68,0,670,.LM67-FrameMgr_processLine
-
 
1408
 558               	.LM67:
-
 
1409
 559 025a 9281      		ldd r25,Z+2
-
 
1410
 560               		.stabn	68,0,679,.LM68-FrameMgr_processLine
-
 
1411
 561               	.LM68:
-
 
1412
 562 025c 5817      		cp r21,r24
-
 
1413
 563 025e 10F0      		brlo .L44
-
 
1414
 564 0260 9517      		cp r25,r21
-
 
1415
 565 0262 40F4      		brsh .L46
-
 
1416
 566               	.L44:
-
 
1417
 567 0264 4817      		cp r20,r24
-
 
1418
 568 0266 10F0      		brlo .L47
-
 
1419
 569 0268 9417      		cp r25,r20
-
 
1420
 570 026a 20F4      		brsh .L46
-
 
1421
 571               	.L47:
-
 
1422
 572 026c 8517      		cp r24,r21
-
 
1423
 573 026e 98F0      		brlo .L40
-
 
1424
 574 0270 4917      		cp r20,r25
-
 
1425
 575 0272 88F0      		brlo .L40
-
 
1426
 576               	.L46:
-
 
1427
 577               		.stabn	68,0,717,.LM69-FrameMgr_processLine
-
 
1428
 578               	.LM69:
-
 
1429
 579 0274 F201      		movw r30,r4
-
 
1430
 580 0276 5083      		st Z,r21
-
 
1431
 581               		.stabn	68,0,718,.LM70-FrameMgr_processLine
-
 
1432
 582               	.LM70:
-
 
1433
 583 0278 F401      		movw r30,r8
-
 
1434
 584 027a 4083      		st Z,r20
-
 
1435
 585               		.stabn	68,0,721,.LM71-FrameMgr_processLine
-
 
1436
 586               	.LM71:
-
 
1437
 587 027c FD01      		movw r30,r26
-
 
1438
 588 027e 8381      		ldd r24,Z+3
-
 
1439
 589 0280 5817      		cp r21,r24
-
 
1440
 590 0282 08F4      		brsh .L50
-
 
1441
GAS LISTING /tmp/ccQRbLT3.s 			page 25
-
 
1442
 
-
 
1443
 
-
 
1444
 591               		.stabn	68,0,727,.LM72-FrameMgr_processLine
-
 
1445
 592               	.LM72:
-
 
1446
 593 0284 5383      		std Z+3,r21
-
 
1447
 594               	.L50:
-
 
1448
 595               		.stabn	68,0,730,.LM73-FrameMgr_processLine
-
 
1449
 596               	.LM73:
-
 
1450
 597 0286 FD01      		movw r30,r26
-
 
1451
 598 0288 8581      		ldd r24,Z+5
-
 
1452
 599 028a 8417      		cp r24,r20
-
 
1453
 600 028c 08F4      		brsh .L52
-
 
1454
 601               		.stabn	68,0,734,.LM74-FrameMgr_processLine
-
 
1455
 602               	.LM74:
-
 
1456
 603 028e 4583      		std Z+5,r20
-
 
1457
 604               	.L52:
-
 
1458
 605               		.stabn	68,0,738,.LM75-FrameMgr_processLine
-
 
1459
 606               	.LM75:
-
 
1460
 607 0290 F501      		movw r30,r10
-
 
1461
 608 0292 F082      		st Z,r15
-
 
1462
 609 0294 1BC0      		rjmp .L36
-
 
1463
 610               	.L40:
-
 
1464
 611               		.stabn	68,0,661,.LM76-FrameMgr_processLine
-
 
1465
 612               	.LM76:
-
 
1466
 613 0296 2F5F      		subi r18,lo8(-(1))
-
 
1467
 614 0298 2830      		cpi r18,lo8(8)
-
 
1468
 615 029a 09F4      		brne .+2
-
 
1469
 616 029c 4DC0      		rjmp .L54
-
 
1470
 617               		.stabn	68,0,749,.LM77-FrameMgr_processLine
-
 
1471
 618               	.LM77:
-
 
1472
 619 029e 1896      		adiw r26,8
-
 
1473
 620 02a0 BECF      		rjmp .L39
-
 
1474
 621               	.L56:
-
 
1475
 622 02a2 D801      		movw r26,r16
-
 
1476
 623 02a4 90E0      		ldi r25,lo8(0)
-
 
1477
 624               	.L57:
-
 
1478
 625               		.stabn	68,0,764,.LM78-FrameMgr_processLine
-
 
1479
 626               	.LM78:
-
 
1480
 627 02a6 FD01      		movw r30,r26
-
 
1481
 628 02a8 8781      		ldd r24,Z+7
-
 
1482
 629 02aa 8823      		tst r24
-
 
1483
 630 02ac 21F0      		breq .L58
-
 
1484
 631               		.stabn	68,0,768,.LM79-FrameMgr_processLine
-
 
1485
 632               	.LM79:
-
 
1486
 633 02ae 1896      		adiw r26,8
-
 
1487
 634               		.stabn	68,0,762,.LM80-FrameMgr_processLine
-
 
1488
 635               	.LM80:
-
 
1489
 636 02b0 9F5F      		subi r25,lo8(-(1))
-
 
1490
 637 02b2 9830      		cpi r25,lo8(8)
-
 
1491
 638 02b4 C1F7      		brne .L57
-
 
1492
 639               	.L58:
-
 
1493
 640               		.stabn	68,0,774,.LM81-FrameMgr_processLine
-
 
1494
 641               	.LM81:
-
 
1495
 642 02b6 3C93      		st X,r19
-
 
1496
 643               		.stabn	68,0,775,.LM82-FrameMgr_processLine
1479
 626               		.stabn	68,0,778,.LM82-.LFBB2
1497
 644               	.LM82:
1480
 627               	.LM82:
1498
 645 02b8 FD01      		movw r30,r26
-
 
1499
 646 02ba 5183      		std Z+1,r21
-
 
1500
 647               		.stabn	68,0,776,.LM83-FrameMgr_processLine
-
 
1501
GAS LISTING /tmp/ccQRbLT3.s 			page 26
-
 
1502
 
-
 
1503
 
-
 
1504
 648               	.LM83:
-
 
1505
 649 02bc 4283      		std Z+2,r20
-
 
1506
 650               		.stabn	68,0,777,.LM84-FrameMgr_processLine
-
 
1507
 651               	.LM84:
-
 
1508
 652 02be 5383      		std Z+3,r21
-
 
1509
 653               		.stabn	68,0,778,.LM85-FrameMgr_processLine
-
 
1510
 654               	.LM85:
-
 
1511
 655 02c0 F482      		std Z+4,r15
1481
 628 0294 B482      		std Z+4,r11
1512
 779:FrameMgr.c    **** 					*(pTrackedObjectData + X_LOWER_RIGHT_OFFSET)        = currPixelRunFinish;	/* x_lowerRight */
1482
 779:FrameMgr.c    **** 					*(pTrackedObjectData + X_LOWER_RIGHT_OFFSET)        = currPixelRunFinish;	/* x_lowerRight */
1513
 656               		.stabn	68,0,779,.LM86-FrameMgr_processLine
1483
 629               		.stabn	68,0,779,.LM83-.LFBB2
1514
 657               	.LM86:
1484
 630               	.LM83:
1515
 658 02c2 4583      		std Z+5,r20
1485
 631 0296 6583      		std Z+5,r22
1516
 780:FrameMgr.c    **** 					*(pTrackedObjectData + Y_LOWER_RIGHT_OFFSET)        = trackedLineCount;	/* y_lowerRight */
1486
 780:FrameMgr.c    **** 					*(pTrackedObjectData + Y_LOWER_RIGHT_OFFSET)        = trackedLineCount;	/* y_lowerRight */
1517
 659               		.stabn	68,0,780,.LM87-FrameMgr_processLine
1487
 632               		.stabn	68,0,780,.LM84-.LFBB2
1518
 660               	.LM87:
1488
 633               	.LM84:
1519
 661 02c4 F682      		std Z+6,r15
1489
 634 0298 B682      		std Z+6,r11
1520
 781:FrameMgr.c    ****                     *(pTrackedObjectData + VALID_OBJECT_OFFSET)         = TRUE;                /* o
1490
 781:FrameMgr.c    ****                     *(pTrackedObjectData + VALID_OBJECT_OFFSET)         = TRUE;                /* o
1521
 662               		.stabn	68,0,781,.LM88-FrameMgr_processLine
1491
 635               		.stabn	68,0,781,.LM85-.LFBB2
1522
 663               	.LM88:
1492
 636               	.LM85:
1523
 664 02c6 81E0      		ldi r24,lo8(1)
1493
 637 029a 81E0      		ldi r24,lo8(1)
1524
 665 02c8 8783      		std Z+7,r24
1494
 638 029c 8783      		std Z+7,r24
1525
 782:FrameMgr.c    **** 						
1495
 782:FrameMgr.c    **** 						
1526
 783:FrameMgr.c    **** 					numCurrTrackedObjects++;
1496
 783:FrameMgr.c    **** 					numCurrTrackedObjects++;
1527
 666               		.stabn	68,0,783,.LM89-FrameMgr_processLine
1497
 639               		.stabn	68,0,783,.LM86-.LFBB2
1528
 667               	.LM89:
1498
 640               	.LM86:
1529
 668 02ca 7F5F      		subi r23,lo8(-(1))
1499
 641 029e 0F5F      		subi r16,lo8(-(1))
1530
 669               	.L36:
1500
 642               	.L36:
-
 
1501
GAS LISTING /tmp/cc0XjEMJ.s 			page 26
-
 
1502
 
-
 
1503
 
1531
 784:FrameMgr.c    **** 				}
1504
 784:FrameMgr.c    **** 				}
1532
 785:FrameMgr.c    **** 			}
1505
 785:FrameMgr.c    **** 			}
1533
 786:FrameMgr.c    ****             
1506
 786:FrameMgr.c    ****             
1534
 787:FrameMgr.c    ****             /* move the pointer to the beginning of the next tracked object */
1507
 787:FrameMgr.c    ****             /* move the pointer to the beginning of the next tracked object */
1535
 788:FrameMgr.c    ****             pTrackedObjectData += SIZE_OF_TRACKED_OBJECT;
1508
 788:FrameMgr.c    ****             pTrackedObjectData += SIZE_OF_TRACKED_OBJECT;
1536
 789:FrameMgr.c    **** 		}
1509
 789:FrameMgr.c    **** 		}
1537
 790:FrameMgr.c    **** 	} while(currPixelRunFinish < ACTUAL_NUM_PIXELS_IN_A_LINE);
1510
 790:FrameMgr.c    **** 	} while(currPixelRunFinish < ACTUAL_NUM_PIXELS_IN_A_LINE);
1538
 670               		.stabn	68,0,790,.LM90-FrameMgr_processLine
1511
 643               		.stabn	68,0,790,.LM87-.LFBB2
1539
 671               	.LM90:
1512
 644               	.LM87:
1540
 672 02cc 403B      		cpi r20,lo8(-80)
1513
 645 02a0 603B      		cpi r22,lo8(-80)
1541
 673 02ce 08F4      		brsh .+2
1514
 646 02a2 00F4      		brsh .+2
1542
 674 02d0 95CF      		rjmp .L35
1515
 647 02a4 00C0      		rjmp .L35
1543
 675 02d2 7093 0000 		sts numCurrTrackedObjects,r23
1516
 648 02a6 0093 0000 		sts numCurrTrackedObjects,r16
1544
 676               	.LBE5:
1517
 649               	.LBE5:
1545
 677               	.LBE4:
1518
 650               	.LBE4:
1546
 678               		.stabn	68,0,460,.LM91-FrameMgr_processLine
1519
 651               		.stabn	68,0,460,.LM88-.LFBB2
1547
 679               	.LM91:
1520
 652               	.LM88:
1548
 680 02d6 C601      		movw r24,r12
1521
 653 02aa C701      		movw r24,r14
1549
 681 02d8 8770      		andi r24,lo8(7)
1522
 654 02ac 8770      		andi r24,lo8(7)
1550
 682 02da 9070      		andi r25,hi8(7)
1523
 655 02ae 9070      		andi r25,hi8(7)
1551
 683 02dc 0797      		sbiw r24,7
1524
 656 02b0 0797      		sbiw r24,7
1552
 684 02de 01F5      		brne .L61
1525
 657 02b2 01F4      		brne .L61
1553
 685 02e0 D801      		movw r26,r16
1526
 658 02b4 60E0      		ldi r22,lo8(0)
1554
 686 02e2 1796      		adiw r26,7
1527
 659               	.L63:
1555
 687 02e4 40E0      		ldi r20,lo8(0)
1528
 660               		.stabn	68,0,464,.LM89-.LFBB2
1556
 688               	.L63:
1529
 661               	.LM89:
1557
 689               		.stabn	68,0,464,.LM92-FrameMgr_processLine
1530
 662 02b6 FA01      		movw r30,r20
1558
 690               	.LM92:
1531
 663 02b8 8781      		ldd r24,Z+7
1559
 691 02e6 8C91      		ld r24,X
1532
 664 02ba 8130      		cpi r24,lo8(1)
1560
 692 02e8 8130      		cpi r24,lo8(1)
1533
 665 02bc 01F4      		brne .L64
1561
GAS LISTING /tmp/ccQRbLT3.s 			page 27
1534
 666               		.stabn	68,0,468,.LM90-.LFBB2
1562
 
1535
 667               	.LM90:
1563
 
1536
 668 02be 8681      		ldd r24,Z+6
1564
 693 02ea A1F4      		brne .L64
1537
 669 02c0 282F      		mov r18,r24
1565
 694 02ec FD01      		movw r30,r26
1538
 670 02c2 3327      		clr r19
1566
 695 02ee 3197      		sbiw r30,1
1539
 671 02c4 8481      		ldd r24,Z+4
1567
 696               		.stabn	68,0,468,.LM93-FrameMgr_processLine
1540
 672 02c6 D901      		movw r26,r18
1568
 697               	.LM93:
1541
 673 02c8 A81B      		sub r26,r24
1569
 698 02f0 9081      		ld r25,Z
1542
 674 02ca B109      		sbc r27,__zero_reg__
1570
 699 02f2 FD01      		movw r30,r26
1543
 675 02cc 1397      		sbiw r26,3
1571
 700 02f4 3397      		sbiw r30,3
1544
 676 02ce 04F4      		brge .L64
1572
 701 02f6 8081      		ld r24,Z
1545
 677               		.stabn	68,0,474,.LM91-.LFBB2
1573
 702 02f8 292F      		mov r18,r25
1546
 678               	.LM91:
1574
 703 02fa 3327      		clr r19
1547
 679 02d0 C701      		movw r24,r14
1575
 704 02fc F901      		movw r30,r18
1548
 680 02d2 821B      		sub r24,r18
1576
 705 02fe E81B      		sub r30,r24
1549
 681 02d4 930B      		sbc r25,r19
1577
 706 0300 F109      		sbc r31,__zero_reg__
1550
 682 02d6 0397      		sbiw r24,3
1578
 707 0302 3397      		sbiw r30,3
1551
 683 02d8 04F0      		brlt .L64
1579
 708 0304 3CF4      		brge .L64
1552
 684               		.stabn	68,0,477,.LM92-.LFBB2
1580
 709               		.stabn	68,0,474,.LM94-FrameMgr_processLine
1553
 685               	.LM92:
1581
 710               	.LM94:
1554
 686 02da 1782      		std Z+7,__zero_reg__
1582
 711 0306 C601      		movw r24,r12
1555
 687               		.stabn	68,0,478,.LM93-.LFBB2
1583
 712 0308 821B      		sub r24,r18
1556
 688               	.LM93:
1584
 713 030a 930B      		sbc r25,r19
1557
 689 02dc 0150      		subi r16,lo8(-(-1))
1585
 714 030c 0397      		sbiw r24,3
1558
 690               	.L64:
1586
 715 030e 14F0      		brlt .L64
1559
 691               		.stabn	68,0,462,.LM94-.LFBB2
1587
 716               		.stabn	68,0,477,.LM95-FrameMgr_processLine
1560
 692               	.LM94:
1588
 717               	.LM95:
1561
GAS LISTING /tmp/cc0XjEMJ.s 			page 27
1589
 718 0310 1C92      		st X,__zero_reg__
1562
 
1590
 719               		.stabn	68,0,478,.LM96-FrameMgr_processLine
1563
 
1591
 720               	.LM96:
1564
 693 02de 6F5F      		subi r22,lo8(-(1))
1592
 721 0312 7150      		subi r23,lo8(-(-1))
1565
 694 02e0 6830      		cpi r22,lo8(8)
1593
 722               	.L64:
1566
 695 02e2 01F0      		breq .L68
1594
 723               		.stabn	68,0,462,.LM97-FrameMgr_processLine
1567
 696               		.stabn	68,0,482,.LM95-.LFBB2
1595
 724               	.LM97:
1568
 697               	.LM95:
1596
 725 0314 4F5F      		subi r20,lo8(-(1))
1569
 698 02e4 485F      		subi r20,lo8(-(8))
1597
 726 0316 1896      		adiw r26,8
1570
 699 02e6 5F4F      		sbci r21,hi8(-(8))
1598
 727 0318 4830      		cpi r20,lo8(8)
1571
 700 02e8 00C0      		rjmp .L63
1599
 728 031a 29F7      		brne .L63
1572
 701               	.L68:
1600
 729 031c 7093 0000 		sts numCurrTrackedObjects,r23
1573
 702 02ea 0093 0000 		sts numCurrTrackedObjects,r16
1601
 730               	.L61:
1574
 703               	.L61:
1602
 731               		.stabn	68,0,486,.LM98-FrameMgr_processLine
1575
 704               		.stabn	68,0,486,.LM96-.LFBB2
1603
 732               	.LM98:
1576
 705               	.LM96:
1604
 733 0320 E092 0000 		sts trackedLineCount,r14
1577
 706 02ee 8B2D      		mov r24,r11
1605
 734               		.stabn	68,0,487,.LM99-FrameMgr_processLine
1578
 707 02f0 8F5F      		subi r24,lo8(-(1))
1606
 735               	.LM99:
1579
 708 02f2 8093 0000 		sts trackedLineCount,r24
1607
 736 0324 F0E9      		ldi r31,lo8(-112)
1580
 709               		.stabn	68,0,487,.LM97-.LFBB2
1608
 737 0326 EF16      		cp r14,r31
1581
 710               	.LM97:
1609
 738 0328 09F4      		brne .+2
1582
 711 02f6 8039      		cpi r24,lo8(-112)
1610
 739 032a 48CF      		rjmp .L72
1583
 712 02f8 01F4      		brne .L70
1611
 740               		.stabn	68,0,498,.LM100-FrameMgr_processLine
1584
 713               		.stabn	68,0,491,.LM98-.LFBB2
1612
 741               	.LM100:
1585
 714               	.LM98:
1613
 742 032c 8091 0000 		lds r24,fastEventBitmask
1586
 715 02fa 80E2      		ldi r24,lo8(32)
1614
 743 0330 8260      		ori r24,lo8(2)
1587
 716 02fc 00D0      		rcall Exec_writeEventFifo
1615
 744 0332 8093 0000 		sts fastEventBitmask,r24
1588
 717               		.stabn	68,0,493,.LM99-.LFBB2
1616
 745 0336 04C0      		rjmp .L71
1589
 718               	.LM99:
1617
 746               	.L54:
1590
 719 02fe 89B7      		in r24,89-0x20
1618
 747               	.LBB6:
1591
 720 0300 8B7F      		andi r24,lo8(-5)
1619
 748               	.LBB7:
1592
 721 0302 89BF      		out 89-0x20,r24
1620
 749               		.stabn	68,0,757,.LM101-FrameMgr_processLine
1593
 722               		.stabn	68,0,494,.LM100-.LFBB2
1621
GAS LISTING /tmp/ccQRbLT3.s 			page 28
1594
 723               	.LM100:
1622
 
1595
 724 0304 1092 0000 		sts trackedLineCount,__zero_reg__
1623
 
1596
 725 0308 00C0      		rjmp .L72
1624
 750               	.LM101:
1597
 726               	.L70:
1625
 751 0338 7830      		cpi r23,lo8(8)
1598
 727               		.stabn	68,0,498,.LM101-.LFBB2
1626
 752 033a 08F4      		brsh .+2
1599
 728               	.LM101:
1627
 753 033c B2CF      		rjmp .L56
1600
 729 030a 8091 0000 		lds r24,fastEventBitmask
1628
 754 033e C6CF      		rjmp .L36
1601
 730 030e 8260      		ori r24,lo8(2)
1629
 755               	.L71:
1602
 731 0310 8093 0000 		sts fastEventBitmask,r24
1630
 756               	.LBE7:
1603
 732 0314 00C0      		rjmp .L72
1631
 757               	.LBE6:
1604
 733               	.L54:
1632
 758               	/* epilogue: frame size=1 */
1605
 734               	.LBB7:
1633
 759 0340 2196      		adiw r28,1
1606
 735               	.LBB6:
1634
 760 0342 0FB6      		in __tmp_reg__,__SREG__
1607
 736               		.stabn	68,0,757,.LM102-.LFBB2
1635
 761 0344 F894      		cli
1608
 737               	.LM102:
1636
 762 0346 DEBF      		out __SP_H__,r29
1609
 738 0316 0830      		cpi r16,lo8(8)
1637
 763 0348 0FBE      		out __SREG__,__tmp_reg__
1610
 739 0318 00F4      		brsh .+2
1638
 764 034a CDBF      		out __SP_L__,r28
1611
 740 031a 00C0      		rjmp .L56
1639
 765 034c DF91      		pop r29
1612
 741 031c 00C0      		rjmp .L36
1640
 766 034e CF91      		pop r28
1613
 742               	.L72:
1641
 767 0350 1F91      		pop r17
1614
 743               	.LBE6:
1642
 768 0352 0F91      		pop r16
1615
 744               	.LBE7:
1643
 769 0354 FF90      		pop r15
1616
 745               	/* epilogue: frame size=1 */
1644
 770 0356 EF90      		pop r14
1617
 746 031e 2196      		adiw r28,1
1645
 771 0358 DF90      		pop r13
1618
 747 0320 0FB6      		in __tmp_reg__,__SREG__
1646
 772 035a CF90      		pop r12
1619
 748 0322 F894      		cli
1647
 773 035c BF90      		pop r11
1620
 749 0324 DEBF      		out __SP_H__,r29
1648
 774 035e AF90      		pop r10
1621
GAS LISTING /tmp/cc0XjEMJ.s 			page 28
1649
 775 0360 9F90      		pop r9
1622
 
1650
 776 0362 8F90      		pop r8
1623
 
1651
 777 0364 7F90      		pop r7
1624
 750 0326 0FBE      		out __SREG__,__tmp_reg__
1652
 778 0366 6F90      		pop r6
1625
 751 0328 CDBF      		out __SP_L__,r28
1653
 779 0368 5F90      		pop r5
1626
 752 032a DF91      		pop r29
1654
 780 036a 4F90      		pop r4
1627
 753 032c CF91      		pop r28
1655
 781 036c 3F90      		pop r3
1628
 754 032e 1F91      		pop r17
1656
 782 036e 2F90      		pop r2
1629
 755 0330 0F91      		pop r16
1657
 783 0370 0895      		ret
1630
 756 0332 FF90      		pop r15
1658
 784               	/* epilogue end (size=25) */
1631
 757 0334 EF90      		pop r14
1659
 785               	/* function FrameMgr_processLine size 355 (304) */
1632
 758 0336 DF90      		pop r13
1660
 786               		.size	FrameMgr_processLine, .-FrameMgr_processLine
1633
 759 0338 CF90      		pop r12
1661
 787               		.stabs	"i:r(0,11)",64,0,343,20
1634
 760 033a BF90      		pop r11
1662
 788               		.stabs	"dataToSend:(0,23)=B(0,11)",128,0,344,1
1635
 761 033c 9F90      		pop r9
1663
 789               		.stabs	"pTrackedObjectData:r(0,22)",64,0,345,26
1636
 762 033e 8F90      		pop r8
1664
 790               		.stabn	192,0,0,FrameMgr_processLine-FrameMgr_processLine
1637
 763 0340 7F90      		pop r7
1665
 791               		.stabn	224,0,0,.Lscope1-FrameMgr_processLine
1638
 764 0342 6F90      		pop r6
1666
 792               	.Lscope1:
1639
 765 0344 5F90      		pop r5
1667
 793               		.stabs	"",36,0,0,.Lscope1-FrameMgr_processLine
1640
 766 0346 4F90      		pop r4
1668
 794               		.stabd	78,0,0
1641
 767 0348 3F90      		pop r3
1669
 795               		.stabs	"FrameMgr_init:F(0,15)",36,0,191,FrameMgr_init
1642
 768 034a 2F90      		pop r2
1670
 796               	.global	FrameMgr_init
1643
 769 034c 0895      		ret
1671
 797               		.type	FrameMgr_init, @function
1644
 770               	/* epilogue end (size=24) */
1672
 798               	FrameMgr_init:
1645
 771               	/* function FrameMgr_processLine size 337 (288) */
1673
 799               		.stabd	46,0,0
1646
 772               		.size	FrameMgr_processLine, .-FrameMgr_processLine
1674
 800               		.stabn	68,0,191,.LM102-FrameMgr_init
1647
 773               		.stabs	"i:r(0,11)",64,0,343,22
1675
 801               	.LM102:
1648
 774               		.stabs	"dataToSend:(0,23)=B(0,11)",128,0,344,1
1676
 802               	/* prologue: frame size=0 */
1649
 775               		.stabs	"pTrackedObjectData:r(0,22)",64,0,345,20
1677
 803               	/* prologue end (size=0) */
1650
 776               		.stabn	192,0,0,.LFBB2-.LFBB2
1678
 804               		.stabn	68,0,192,.LM103-FrameMgr_init
1651
 777               		.stabn	224,0,0,.Lscope2-.LFBB2
1679
 805               	.LM103:
1652
 778               	.Lscope2:
1680
 806 0372 80E4      		ldi r24,lo8(64)
1653
 779               		.stabs	"",36,0,0,.Lscope2-.LFBB2
1681
GAS LISTING /tmp/ccQRbLT3.s 			page 29
1654
 780               		.stabd	78,0,0
1682
 
1655
 781               		.stabs	"FrameMgr_init:F(0,15)",36,0,191,FrameMgr_init
1683
 
1656
 782               	.global	FrameMgr_init
1684
 807 0374 E0E0      		ldi r30,lo8(trackedObjectTable)
1657
 783               		.type	FrameMgr_init, @function
1685
 808 0376 F0E0      		ldi r31,hi8(trackedObjectTable)
1658
 784               	FrameMgr_init:
1686
 809 0378 1192      		st Z+,__zero_reg__
1659
 785               		.stabd	46,0,0
1687
 810 037a 8A95      	        dec r24
1660
 786               		.stabn	68,0,191,.LM103-.LFBB3
1688
 811 037c E9F7      		brne .-6
1661
 787               	.LM103:
1689
 812               	/* epilogue: frame size=0 */
1662
 788               	.LFBB3:
1690
 813 037e 0895      		ret
1663
 789               	/* prologue: frame size=0 */
1691
 814               	/* epilogue end (size=1) */
1664
 790               	/* prologue end (size=0) */
1692
 815               	/* function FrameMgr_init size 7 (6) */
1665
 791               		.stabn	68,0,192,.LM104-.LFBB3
1693
 816               		.size	FrameMgr_init, .-FrameMgr_init
1666
 792               	.LM104:
1694
 817               	.Lscope2:
1667
 793 034e 80E4      		ldi r24,lo8(64)
1695
 818               		.stabs	"",36,0,0,.Lscope2-FrameMgr_init
1668
 794 0350 E0E0      		ldi r30,lo8(trackedObjectTable)
1696
 819               		.stabd	78,0,0
1669
 795 0352 F0E0      		ldi r31,hi8(trackedObjectTable)
1697
 820               		.stabs	"FrameMgr_acquireLine:F(0,15)",36,0,287,FrameMgr_acquireLine
1670
 796 0354 1192      		st Z+,__zero_reg__
1698
 821               	.global	FrameMgr_acquireLine
1671
 797 0356 8A95      	        dec r24
1699
 822               		.type	FrameMgr_acquireLine, @function
1672
 798 0358 01F4      		brne .-6
1700
 823               	FrameMgr_acquireLine:
1673
 799               	/* epilogue: frame size=0 */
1701
 824               		.stabd	46,0,0
1674
 800 035a 0895      		ret
1702
 825               		.stabn	68,0,287,.LM104-FrameMgr_acquireLine
1675
 801               	/* epilogue end (size=1) */
1703
 826               	.LM104:
1676
 802               	/* function FrameMgr_init size 7 (6) */
1704
 827               	/* prologue: frame size=0 */
1677
 803               		.size	FrameMgr_init, .-FrameMgr_init
1705
 828               	/* prologue end (size=0) */
1678
 804               	.Lscope3:
1706
 829               		.stabn	68,0,297,.LM105-FrameMgr_acquireLine
1679
 805               		.stabs	"",36,0,0,.Lscope3-.LFBB3
1707
 830               	.LM105:
1680
 806               		.stabd	78,0,0
1708
 831 0380 8091 0000 		lds r24,currentState
1681
GAS LISTING /tmp/cc0XjEMJ.s 			page 29
1709
 832 0384 8230      		cpi r24,lo8(2)
1682
 
1710
 833 0386 49F5      		brne .L83
1683
 
1711
 834               		.stabn	68,0,299,.LM106-FrameMgr_acquireLine
1684
 807               		.stabs	"FrameMgr_acquireLine:F(0,15)",36,0,287,FrameMgr_acquireLine
1712
 835               	.LM106:
1685
 808               	.global	FrameMgr_acquireLine
1713
 836 0388 8091 0000 		lds r24,lineCount
1686
 809               		.type	FrameMgr_acquireLine, @function
1714
 837 038c 282F      		mov r18,r24
1687
 810               	FrameMgr_acquireLine:
1715
 838 038e 220F      		lsl r18
1688
 811               		.stabd	46,0,0
1716
 839               		.stabn	68,0,305,.LM107-FrameMgr_acquireLine
1689
 812               		.stabn	68,0,287,.LM105-.LFBB4
1717
 840               	.LM107:
1690
 813               	.LM105:
1718
 841 0390 80EB      		ldi r24,lo8(-80)
1691
 814               	.LFBB4:
1719
 842 0392 E0E0      		ldi r30,lo8(currentLineBuffer)
1692
 815               	/* prologue: frame size=0 */
1720
 843 0394 F0E0      		ldi r31,hi8(currentLineBuffer)
1693
 816               	/* prologue end (size=0) */
1721
 844 0396 982F      		mov r25,r24
1694
 817               		.stabn	68,0,297,.LM106-.LFBB4
1722
 845 0398 1192      		st Z+,__zero_reg__
1695
 818               	.LM106:
1723
 846 039a 9A95      	        dec r25
1696
 819 035c 8091 0000 		lds r24,currentState
1724
 847 039c E9F7      		brne .-6
1697
 820 0360 8230      		cpi r24,lo8(2)
1725
 848               		.stabn	68,0,306,.LM108-FrameMgr_acquireLine
1698
 821 0362 01F4      		brne .L81
1726
 849               	.LM108:
1699
 822               		.stabn	68,0,299,.LM107-.LFBB4
1727
 850 039e E0E0      		ldi r30,lo8(previousLineBuffer)
1700
 823               	.LM107:
1728
 851 03a0 F0E0      		ldi r31,hi8(previousLineBuffer)
1701
 824 0364 8091 0000 		lds r24,lineCount
1729
 852 03a2 1192      		st Z+,__zero_reg__
1702
 825 0368 982F      		mov r25,r24
1730
 853 03a4 8A95      	        dec r24
1703
 826 036a 990F      		lsl r25
1731
 854 03a6 E9F7      		brne .-6
1704
 827               		.stabn	68,0,305,.LM108-.LFBB4
1732
 855               	.L85:
1705
 828               	.LM108:
1733
 856               		.stabn	68,0,309,.LM109-FrameMgr_acquireLine
1706
 829 036c 80EB      		ldi r24,lo8(-80)
1734
 857               	.LM109:
1707
 830 036e E0E0      		ldi r30,lo8(currentLineBuffer)
1735
 858 03a8 829B      		sbis 48-0x20,2
1708
 831 0370 F0E0      		ldi r31,hi8(currentLineBuffer)
1736
 859 03aa FECF      		rjmp .L85
1709
 832 0372 282F      		mov r18,r24
1737
 860               	.L101:
1710
 833 0374 1192      		st Z+,__zero_reg__
1738
 861               		.stabn	68,0,310,.LM110-FrameMgr_acquireLine
1711
 834 0376 2A95      	        dec r18
1739
 862               	.LM110:
1712
 835 0378 01F4      		brne .-6
1740
 863 03ac 829B      		sbis 48-0x20,2
1713
 836               		.stabn	68,0,306,.LM109-.LFBB4
1741
GAS LISTING /tmp/ccQRbLT3.s 			page 30
1714
 837               	.LM109:
1742
 
1715
 838 037a E0E0      		ldi r30,lo8(previousLineBuffer)
1743
 
1716
 839 037c F0E0      		ldi r31,hi8(previousLineBuffer)
1744
 864 03ae 07C0      		rjmp .L110
1717
 840 037e 1192      		st Z+,__zero_reg__
1745
 865 03b0 FDCF      		rjmp .L101
1718
 841 0380 8A95      	        dec r24
1746
 866               	.L88:
1719
 842 0382 01F4      		brne .-6
1747
 867 03b2 90E0      		ldi r25,lo8(0)
1720
 843               	.L83:
1748
 868               	.L114:
1721
 844               		.stabn	68,0,309,.LM110-.LFBB4
1749
 869               		.stabn	68,0,316,.LM111-FrameMgr_acquireLine
1722
 845               	.LM110:
1750
 870               	.LM111:
1723
 846 0384 829B      		sbis 48-0x20,2
1751
 871 03b4 849B      		sbis 48-0x20,4
1724
 847 0386 00C0      		rjmp .L83
1752
 872 03b6 FECF      		rjmp .L114
1725
 848               	.L98:
1753
 873               	.L102:
1726
 849               		.stabn	68,0,310,.LM111-.LFBB4
1754
 874               		.stabn	68,0,318,.LM112-FrameMgr_acquireLine
1727
 850               	.LM111:
1755
 875               	.LM112:
1728
 851 0388 829B      		sbis 48-0x20,2
1756
 876 03b8 849B      		sbis 48-0x20,4
1729
 852 038a 00C0      		rjmp .L106
1757
 877 03ba 04C0      		rjmp .L111
1730
 853 038c 00C0      		rjmp .L98
1758
 878 03bc FDCF      		rjmp .L102
1731
 854               	.L111:
1759
 879               	.L110:
1732
 855               		.stabn	68,0,316,.LM112-.LFBB4
1760
 880               		.stabn	68,0,314,.LM113-FrameMgr_acquireLine
1733
 856               	.LM112:
1761
 881               	.LM113:
1734
 857 038e 849B      		sbis 48-0x20,4
1762
 882 03be 2223      		tst r18
1735
 858 0390 00C0      		rjmp .L111
1763
 883 03c0 C1F7      		brne .L88
1736
 859               		.stabn	68,0,317,.LM113-.LFBB4
1764
 884 03c2 05C0      		rjmp .L92
1737
 860               	.LM113:
1765
 885               	.L111:
1738
 861 0392 9150      		subi r25,lo8(-(-1))
1766
 886 03c4 9150      		subi r25,lo8(-(-1))
1739
 862               	.L88:
1767
 887 03c6 822F      		mov r24,r18
1740
 863               		.stabn	68,0,318,.LM114-.LFBB4
1768
 888 03c8 8195      		neg r24
1741
GAS LISTING /tmp/cc0XjEMJ.s 			page 30
1769
 889 03ca 9817      		cp r25,r24
1742
 
1770
 890 03cc 99F7      		brne .L114
1743
 
1771
 891               	.L92:
1744
 864               	.LM114:
1772
 892               		.stabn	68,0,322,.LM114-FrameMgr_acquireLine
1745
 865 0394 849B      		sbis 48-0x20,4
1773
 893               	.LM114:
1746
 866 0396 00C0      		rjmp .L108
1774
 894 03ce 60E0      		ldi r22,lo8(previousLineBuffer)
1747
 867 0398 00C0      		rjmp .L88
1775
 895 03d0 70E0      		ldi r23,hi8(previousLineBuffer)
1748
 868               	.L106:
1776
 896 03d2 80E0      		ldi r24,lo8(currentLineBuffer)
1749
 869               		.stabn	68,0,314,.LM115-.LFBB4
1777
 897 03d4 90E0      		ldi r25,hi8(currentLineBuffer)
1750
 870               	.LM115:
1778
 898 03d6 00D0      		rcall CamIntAsm_acquireDumpLine
1751
 871 039a 9923      		tst r25
1779
 899 03d8 0895      		ret
1752
 872 039c 01F4      		brne .L111
1780
 900               	.L83:
1753
 873 039e 00C0      		rjmp .L90
1781
 901               		.stabn	68,0,324,.LM115-FrameMgr_acquireLine
1754
 874               	.L108:
1782
 902               	.LM115:
1755
 875 03a0 9923      		tst r25
1783
 903 03da 8130      		cpi r24,lo8(1)
1756
 876 03a2 01F4      		brne .L111
1784
 904 03dc 39F4      		brne .L96
1757
 877               	.L90:
1785
 905               	.L103:
1758
 878               		.stabn	68,0,322,.LM116-.LFBB4
1786
 906               		.stabn	68,0,326,.LM116-FrameMgr_acquireLine
1759
 879               	.LM116:
1787
 907               	.LM116:
1760
 880 03a4 60E0      		ldi r22,lo8(previousLineBuffer)
1788
 908 03de 8499      		sbic 48-0x20,4
1761
 881 03a6 70E0      		ldi r23,hi8(previousLineBuffer)
1789
 909 03e0 FECF      		rjmp .L103
1762
 882 03a8 80E0      		ldi r24,lo8(currentLineBuffer)
1790
 910               		.stabn	68,0,327,.LM117-FrameMgr_acquireLine
1763
 883 03aa 90E0      		ldi r25,hi8(currentLineBuffer)
1791
 911               	.LM117:
1764
 884 03ac 00D0      		rcall CamIntAsm_acquireDumpLine
1792
 912 03e2 60E0      		ldi r22,lo8(colorMap)
1765
 885 03ae 0895      		ret
1793
 913 03e4 70E0      		ldi r23,hi8(colorMap)
1766
 886               	.L81:
1794
 914 03e6 80E0      		ldi r24,lo8(currentLineBuffer)
1767
 887               		.stabn	68,0,324,.LM117-.LFBB4
1795
 915 03e8 90E0      		ldi r25,hi8(currentLineBuffer)
1768
 888               	.LM117:
1796
 916 03ea 00D0      		rcall CamIntAsm_acquireTrackingLine
1769
 889 03b0 8130      		cpi r24,lo8(1)
1797
 917               	.L96:
1770
 890 03b2 01F4      		brne .L94
1798
 918 03ec 0895      		ret
1771
 891               	.L97:
1799
 919               	/* epilogue: frame size=0 */
1772
 892               		.stabn	68,0,326,.LM118-.LFBB4
1800
 920               	/* epilogue: noreturn */
1773
 893               	.LM118:
1801
GAS LISTING /tmp/ccQRbLT3.s 			page 31
1774
 894 03b4 8499      		sbic 48-0x20,4
1802
 
1775
 895 03b6 00C0      		rjmp .L97
1803
 
1776
 896               		.stabn	68,0,327,.LM119-.LFBB4
1804
 921               	/* epilogue end (size=0) */
1777
 897               	.LM119:
1805
 922               	/* function FrameMgr_acquireLine size 55 (55) */
1778
 898 03b8 60E0      		ldi r22,lo8(colorMap)
1806
 923               		.size	FrameMgr_acquireLine, .-FrameMgr_acquireLine
1779
 899 03ba 70E0      		ldi r23,hi8(colorMap)
1807
 924               		.stabs	"tmpLineCount:r(0,11)",64,0,288,18
1780
 900 03bc 80E0      		ldi r24,lo8(currentLineBuffer)
1808
 925               		.stabn	192,0,0,FrameMgr_acquireLine-FrameMgr_acquireLine
1781
 901 03be 90E0      		ldi r25,hi8(currentLineBuffer)
1809
 926               		.stabn	224,0,0,.Lscope3-FrameMgr_acquireLine
1782
 902 03c0 00D0      		rcall CamIntAsm_acquireTrackingLine
1810
 927               	.Lscope3:
1783
 903               	.L94:
1811
 928               		.stabs	"",36,0,0,.Lscope3-FrameMgr_acquireLine
1784
 904 03c2 0895      		ret
1812
 929               		.stabd	78,0,0
1785
 905               	/* epilogue: frame size=0 */
1813
 930               		.stabs	"FrameMgr_acquireFrame:F(0,15)",36,0,261,FrameMgr_acquireFrame
1786
 906               	/* epilogue: noreturn */
1814
 931               	.global	FrameMgr_acquireFrame
1787
 907               	/* epilogue end (size=0) */
1815
 932               		.type	FrameMgr_acquireFrame, @function
1788
 908               	/* function FrameMgr_acquireLine size 52 (52) */
1816
 933               	FrameMgr_acquireFrame:
1789
 909               		.size	FrameMgr_acquireLine, .-FrameMgr_acquireLine
1817
 934               		.stabd	46,0,0
1790
 910               		.stabs	"tmpLineCount:r(0,11)",64,0,288,25
1818
 935               		.stabn	68,0,261,.LM118-FrameMgr_acquireFrame
1791
 911               		.stabn	192,0,0,.LFBB4-.LFBB4
1819
 936               	.LM118:
1792
 912               		.stabn	224,0,0,.Lscope4-.LFBB4
1820
 937               	/* prologue: frame size=0 */
1793
 913               	.Lscope4:
1821
 938               	/* prologue end (size=0) */
1794
 914               		.stabs	"",36,0,0,.Lscope4-.LFBB4
1822
 939               		.stabn	68,0,262,.LM119-FrameMgr_acquireFrame
1795
 915               		.stabd	78,0,0
1823
 940               	.LM119:
1796
 916               		.stabs	"FrameMgr_acquireFrame:F(0,15)",36,0,261,FrameMgr_acquireFrame
1824
 941 03ee 8091 0000 		lds r24,currentState
1797
 917               	.global	FrameMgr_acquireFrame
1825
 942 03f2 8130      		cpi r24,lo8(1)
1798
 918               		.type	FrameMgr_acquireFrame, @function
1826
 943 03f4 A9F4      		brne .L120
1799
 919               	FrameMgr_acquireFrame:
1827
 944               		.stabn	68,0,264,.LM120-FrameMgr_acquireFrame
1800
 920               		.stabd	46,0,0
1828
 945               	.LM120:
1801
GAS LISTING /tmp/cc0XjEMJ.s 			page 31
1829
 946 03f6 1092 0000 		sts trackedLineCount,__zero_reg__
1802
 
1830
 947               		.stabn	68,0,265,.LM121-FrameMgr_acquireFrame
1803
 
1831
 948               	.LM121:
1804
 921               		.stabn	68,0,261,.LM120-.LFBB5
1832
 949 03fa 8091 0000 		lds r24,numCurrTrackedObjects
1805
 922               	.LM120:
1833
 950 03fe 8093 0000 		sts numPrevTrackedObjects,r24
1806
 923               	.LFBB5:
1834
 951               		.stabn	68,0,266,.LM122-FrameMgr_acquireFrame
1807
 924               	/* prologue: frame size=0 */
1835
 952               	.LM122:
1808
 925               	/* prologue end (size=0) */
1836
 953 0402 1092 0000 		sts numCurrTrackedObjects,__zero_reg__
1809
 926               		.stabn	68,0,262,.LM121-.LFBB5
1837
 954               		.stabn	68,0,270,.LM123-FrameMgr_acquireFrame
1810
 927               	.LM121:
1838
 955               	.LM123:
1811
 928 03c4 8091 0000 		lds r24,currentState
1839
 956 0406 80E4      		ldi r24,lo8(64)
1812
 929 03c8 8130      		cpi r24,lo8(1)
1840
 957 0408 E0E0      		ldi r30,lo8(trackedObjectTable)
1813
 930 03ca 01F4      		brne .L117
1841
 958 040a F0E0      		ldi r31,hi8(trackedObjectTable)
1814
 931               		.stabn	68,0,264,.LM122-.LFBB5
1842
 959 040c 1192      		st Z+,__zero_reg__
1815
 932               	.LM122:
1843
 960 040e 8A95      	        dec r24
1816
 933 03cc 1092 0000 		sts trackedLineCount,__zero_reg__
1844
 961 0410 E9F7      		brne .-6
1817
 934               		.stabn	68,0,265,.LM123-.LFBB5
1845
 962               	.L118:
1818
 935               	.LM123:
1846
 963               		.stabn	68,0,272,.LM124-FrameMgr_acquireFrame
1819
 936 03d0 8091 0000 		lds r24,numCurrTrackedObjects
1847
 964               	.LM124:
1820
 937 03d4 8093 0000 		sts numPrevTrackedObjects,r24
1848
 965 0412 829B      		sbis 48-0x20,2
1821
 938               		.stabn	68,0,266,.LM124-.LFBB5
1849
 966 0414 FECF      		rjmp .L118
1822
 939               	.LM124:
1850
 967               		.stabn	68,0,273,.LM125-FrameMgr_acquireFrame
1823
 940 03d8 1092 0000 		sts numCurrTrackedObjects,__zero_reg__
1851
 968               	.LM125:
1824
 941               		.stabn	68,0,270,.LM125-.LFBB5
1852
 969 0416 60E0      		ldi r22,lo8(colorMap)
1825
 942               	.LM125:
1853
 970 0418 70E0      		ldi r23,hi8(colorMap)
1826
 943 03dc 80E4      		ldi r24,lo8(64)
1854
 971 041a 80E0      		ldi r24,lo8(currentLineBuffer)
1827
 944 03de E0E0      		ldi r30,lo8(trackedObjectTable)
1855
 972 041c 90E0      		ldi r25,hi8(currentLineBuffer)
1828
 945 03e0 F0E0      		ldi r31,hi8(trackedObjectTable)
1856
 973 041e 00D0      		rcall CamIntAsm_acquireTrackingLine
1829
 946 03e2 1192      		st Z+,__zero_reg__
1857
 974               	.L120:
1830
 947 03e4 8A95      	        dec r24
1858
 975 0420 0895      		ret
1831
 948 03e6 01F4      		brne .-6
1859
 976               	/* epilogue: frame size=0 */
1832
 949               	.L115:
1860
 977               	/* epilogue: noreturn */
1833
 950               		.stabn	68,0,272,.LM126-.LFBB5
1861
GAS LISTING /tmp/ccQRbLT3.s 			page 32
1834
 951               	.LM126:
1862
 
1835
 952 03e8 829B      		sbis 48-0x20,2
1863
 
1836
 953 03ea 00C0      		rjmp .L115
1864
 978               	/* epilogue end (size=0) */
1837
 954               		.stabn	68,0,273,.LM127-.LFBB5
1865
 979               	/* function FrameMgr_acquireFrame size 26 (26) */
1838
 955               	.LM127:
1866
 980               		.size	FrameMgr_acquireFrame, .-FrameMgr_acquireFrame
1839
 956 03ec 60E0      		ldi r22,lo8(colorMap)
1867
 981               	.Lscope4:
1840
 957 03ee 70E0      		ldi r23,hi8(colorMap)
1868
 982               		.stabs	"",36,0,0,.Lscope4-FrameMgr_acquireFrame
1841
 958 03f0 80E0      		ldi r24,lo8(currentLineBuffer)
1869
 983               		.stabd	78,0,0
1842
 959 03f2 90E0      		ldi r25,hi8(currentLineBuffer)
1870
 984               		.stabs	"FrameMgr_dispatchEvent:F(0,15)",36,0,205,FrameMgr_dispatchEvent
1843
 960 03f4 00D0      		rcall CamIntAsm_acquireTrackingLine
1871
 985               		.stabs	"event:P(0,11)",64,0,204,24
1844
 961               	.L117:
1872
 986               	.global	FrameMgr_dispatchEvent
1845
 962 03f6 0895      		ret
1873
 987               		.type	FrameMgr_dispatchEvent, @function
1846
 963               	/* epilogue: frame size=0 */
1874
 988               	FrameMgr_dispatchEvent:
1847
 964               	/* epilogue: noreturn */
1875
 989               		.stabd	46,0,0
1848
 965               	/* epilogue end (size=0) */
1876
 990               		.stabn	68,0,205,.LM126-FrameMgr_dispatchEvent
1849
 966               	/* function FrameMgr_acquireFrame size 26 (26) */
1877
 991               	.LM126:
1850
 967               		.size	FrameMgr_acquireFrame, .-FrameMgr_acquireFrame
1878
 992               	/* prologue: frame size=0 */
1851
 968               	.Lscope5:
1879
 993               	/* prologue end (size=0) */
1852
 969               		.stabs	"",36,0,0,.Lscope5-.LFBB5
1880
 994               		.stabn	68,0,206,.LM127-FrameMgr_dispatchEvent
1853
 970               		.stabd	78,0,0
1881
 995               	.LM127:
1854
 971               		.stabs	"FrameMgr_dispatchEvent:F(0,15)",36,0,205,FrameMgr_dispatchEvent
1882
 996 0422 8430      		cpi r24,lo8(4)
1855
 972               		.stabs	"event:P(0,11)",64,0,204,24
1883
 997 0424 19F1      		breq .L127
1856
 973               	.global	FrameMgr_dispatchEvent
1884
 998               		.stabn	68,0,206,.LM128-FrameMgr_dispatchEvent
1857
 974               		.type	FrameMgr_dispatchEvent, @function
1885
 999               	.LM128:
1858
 975               	FrameMgr_dispatchEvent:
1886
 1000 0426 8530      		cpi r24,lo8(5)
1859
 976               		.stabd	46,0,0
1887
 1001 0428 28F4      		brsh .L131
1860
 977               		.stabn	68,0,205,.LM128-.LFBB6
1888
 1002 042a 8130      		cpi r24,lo8(1)
1861
GAS LISTING /tmp/cc0XjEMJ.s 			page 32
1889
 1003 042c 09F1      		breq .L125
1862
 
1890
 1004 042e 8230      		cpi r24,lo8(2)
1863
 
1891
 1005 0430 41F5      		brne .L133
1864
 978               	.LM128:
1892
 1006 0432 07C0      		rjmp .L126
1865
 979               	.LFBB6:
1893
 1007               	.L131:
1866
 980               	/* prologue: frame size=0 */
1894
 1008 0434 8038      		cpi r24,lo8(-128)
1867
 981               	/* prologue end (size=0) */
1895
 1009 0436 99F0      		breq .L129
1868
 982               		.stabn	68,0,206,.LM129-.LFBB6
1896
 1010 0438 8138      		cpi r24,lo8(-127)
1869
 983               	.LM129:
1897
 1011 043a 09F1      		breq .L130
1870
 984 03f8 8430      		cpi r24,lo8(4)
1898
 1012 043c 8032      		cpi r24,lo8(32)
1871
 985 03fa 01F0      		breq .L124
1899
 1013 043e 09F5      		brne .L133
1872
 986               		.stabn	68,0,206,.LM130-.LFBB6
1900
 1014 0440 13C0      		rjmp .L128
1873
 987               	.LM130:
1901
 1015               	.L126:
1874
 988 03fc 8530      		cpi r24,lo8(5)
1902
 1016               		.stabn	68,0,211,.LM129-FrameMgr_dispatchEvent
1875
 989 03fe 00F4      		brsh .L128
1903
 1017               	.LM129:
1876
 990 0400 8130      		cpi r24,lo8(1)
1904
 1018 0442 61E0      		ldi r22,lo8(1)
1877
 991 0402 01F0      		breq .L122
1905
 1019 0444 81E1      		ldi r24,lo8(17)
1878
 992 0404 8230      		cpi r24,lo8(2)
1906
 1020 0446 00D0      		rcall CamConfig_setCamReg
1879
 993 0406 01F4      		brne .L130
1907
 1021               		.stabn	68,0,212,.LM130-FrameMgr_dispatchEvent
1880
 994 0408 00C0      		rjmp .L123
1908
 1022               	.LM130:
1881
 995               	.L128:
1909
 1023 0448 00D0      		rcall CamConfig_sendFifoCmds
1882
 996 040a 8038      		cpi r24,lo8(-128)
1910
 1024               		.stabn	68,0,213,.LM131-FrameMgr_dispatchEvent
1883
 997 040c 01F0      		breq .L126
1911
 1025               	.LM131:
1884
 998 040e 8138      		cpi r24,lo8(-127)
1912
 1026 044a 88EE      		ldi r24,lo8(1000)
1885
 999 0410 01F0      		breq .L127
1913
 1027 044c 93E0      		ldi r25,hi8(1000)
1886
 1000 0412 8032      		cpi r24,lo8(32)
1914
 1028 044e 00D0      		rcall Utility_delay
1887
 1001 0414 01F4      		brne .L130
1915
 1029               		.stabn	68,0,214,.LM132-FrameMgr_dispatchEvent
1888
 1002 0416 00C0      		rjmp .L125
1916
 1030               	.LM132:
1889
 1003               	.L123:
1917
 1031 0450 1092 0000 		sts lineCount,__zero_reg__
1890
 1004               		.stabn	68,0,211,.LM131-.LFBB6
1918
 1032               		.stabn	68,0,215,.LM133-FrameMgr_dispatchEvent
1891
 1005               	.LM131:
1919
 1033               	.LM133:
1892
 1006 0418 61E0      		ldi r22,lo8(1)
1920
 1034 0454 82E0      		ldi r24,lo8(2)
1893
 1007 041a 81E1      		ldi r24,lo8(17)
1921
GAS LISTING /tmp/ccQRbLT3.s 			page 33
1894
 1008 041c 00D0      		rcall CamConfig_setCamReg
1922
 
1895
 1009               		.stabn	68,0,212,.LM132-.LFBB6
1923
 
1896
 1010               	.LM132:
1924
 1035 0456 8093 0000 		sts currentState,r24
1897
 1011 041e 00D0      		rcall CamConfig_sendFifoCmds
1925
 1036               		.stabn	68,0,217,.LM134-FrameMgr_dispatchEvent
1898
 1012               		.stabn	68,0,213,.LM133-.LFBB6
1926
 1037               	.LM134:
1899
 1013               	.LM133:
1927
 1038 045a 92DF      		rcall FrameMgr_acquireLine
1900
 1014 0420 88EE      		ldi r24,lo8(1000)
1928
 1039 045c 0895      		ret
1901
 1015 0422 93E0      		ldi r25,hi8(1000)
1929
 1040               	.L129:
1902
 1016 0424 00D0      		rcall Utility_delay
1930
 1041               		.stabn	68,0,221,.LM135-FrameMgr_dispatchEvent
1903
 1017               		.stabn	68,0,214,.LM134-.LFBB6
1931
 1042               	.LM135:
1904
 1018               	.LM134:
1932
 1043 045e 81E0      		ldi r24,lo8(1)
1905
 1019 0426 1092 0000 		sts lineCount,__zero_reg__
1933
 1044 0460 8093 0000 		sts currentState,r24
1906
 1020               		.stabn	68,0,215,.LM135-.LFBB6
1934
 1045               		.stabn	68,0,222,.LM136-FrameMgr_dispatchEvent
1907
 1021               	.LM135:
1935
 1046               	.LM136:
1908
 1022 042a 82E0      		ldi r24,lo8(2)
1936
 1047 0464 C4DF      		rcall FrameMgr_acquireFrame
1909
 1023 042c 8093 0000 		sts currentState,r24
1937
 1048 0466 0895      		ret
1910
 1024               		.stabn	68,0,217,.LM136-.LFBB6
1938
 1049               	.L128:
1911
 1025               	.LM136:
1939
 1050               		.stabn	68,0,226,.LM137-FrameMgr_dispatchEvent
1912
 1026 0430 00D0      		rcall FrameMgr_acquireLine
1940
 1051               	.LM137:
1913
 1027 0432 0895      		ret
1941
 1052 0468 CBDD      		rcall FrameMgr_processFrame
1914
 1028               	.L126:
1942
 1053 046a 0895      		ret
1915
 1029               		.stabn	68,0,221,.LM137-.LFBB6
1943
 1054               	.L127:
1916
 1030               	.LM137:
1944
 1055               		.stabn	68,0,230,.LM138-FrameMgr_dispatchEvent
1917
 1031 0434 81E0      		ldi r24,lo8(1)
1945
 1056               	.LM138:
1918
 1032 0436 8093 0000 		sts currentState,r24
1946
 1057 046c C0DF      		rcall FrameMgr_acquireFrame
1919
 1033               		.stabn	68,0,222,.LM138-.LFBB6
1947
 1058 046e 0895      		ret
1920
 1034               	.LM138:
1948
 1059               	.L125:
1921
GAS LISTING /tmp/cc0XjEMJ.s 			page 33
1949
 1060               		.stabn	68,0,234,.LM139-FrameMgr_dispatchEvent
1922
 
1950
 1061               	.LM139:
1923
 
1951
 1062 0470 8091 0000 		lds r24,currentState
1924
 1035 043a 00D0      		rcall FrameMgr_acquireFrame
1952
 1063 0474 8823      		tst r24
1925
 1036 043c 0895      		ret
1953
 1064 0476 29F0      		breq .L133
1926
 1037               	.L125:
1954
 1065               		.stabn	68,0,240,.LM140-FrameMgr_dispatchEvent
1927
 1038               		.stabn	68,0,226,.LM139-.LFBB6
1955
 1066               	.LM140:
1928
 1039               	.LM139:
1956
 1067 0478 84E0      		ldi r24,lo8(4)
1929
 1040 043e 00D0      		rcall FrameMgr_processFrame
1957
 1068 047a 00D0      		rcall Exec_writeEventFifo
1930
 1041 0440 0895      		ret
1958
 1069 047c 0895      		ret
1931
 1042               	.L124:
1959
 1070               	.L130:
1932
 1043               		.stabn	68,0,230,.LM140-.LFBB6
1960
 1071               		.stabn	68,0,246,.LM141-FrameMgr_dispatchEvent
1933
 1044               	.LM140:
1961
 1072               	.LM141:
1934
 1045 0442 00D0      		rcall FrameMgr_acquireFrame
1962
 1073 047e 1092 0000 		sts currentState,__zero_reg__
1935
 1046 0444 0895      		ret
1963
 1074               	.L133:
1936
 1047               	.L122:
1964
 1075 0482 0895      		ret
1937
 1048               		.stabn	68,0,234,.LM141-.LFBB6
1965
 1076               	/* epilogue: frame size=0 */
1938
 1049               	.LM141:
1966
 1077               	/* epilogue: noreturn */
1939
 1050 0446 8091 0000 		lds r24,currentState
1967
 1078               	/* epilogue end (size=0) */
1940
 1051 044a 8823      		tst r24
1968
 1079               	/* function FrameMgr_dispatchEvent size 49 (49) */
1941
 1052 044c 01F0      		breq .L130
1969
 1080               		.size	FrameMgr_dispatchEvent, .-FrameMgr_dispatchEvent
1942
 1053               		.stabn	68,0,240,.LM142-.LFBB6
1970
 1081               	.Lscope5:
1943
 1054               	.LM142:
1971
 1082               		.stabs	"",36,0,0,.Lscope5-FrameMgr_dispatchEvent
1944
 1055 044e 84E0      		ldi r24,lo8(4)
1972
 1083               		.stabd	78,0,0
1945
 1056 0450 00D0      		rcall Exec_writeEventFifo
1973
 1084               		.data
1946
 1057 0452 0895      		ret
1974
 1085               		.type	pCurrentTrackedObjectTable, @object
1947
 1058               	.L127:
1975
 1086               		.size	pCurrentTrackedObjectTable, 2
1948
 1059               		.stabn	68,0,246,.LM143-.LFBB6
1976
 1087               	pCurrentTrackedObjectTable:
1949
 1060               	.LM143:
1977
 1088 0000 0000      		.word	trackedObjectTable
1950
 1061 0454 1092 0000 		sts currentState,__zero_reg__
1978
 1089               		.lcomm numCurrTrackedObjects,1
1951
 1062               	.L130:
1979
 1090               		.lcomm currentState,1
1952
 1063 0458 0895      		ret
1980
 1091               		.lcomm lineCount,1
1953
 1064               	/* epilogue: frame size=0 */
1981
GAS LISTING /tmp/ccQRbLT3.s 			page 34
1954
 1065               	/* epilogue: noreturn */
1982
 
1955
 1066               	/* epilogue end (size=0) */
1983
 
1956
 1067               	/* function FrameMgr_dispatchEvent size 49 (49) */
1984
 1092               		.lcomm trackedLineCount,1
1957
 1068               		.size	FrameMgr_dispatchEvent, .-FrameMgr_dispatchEvent
1985
 1093               		.lcomm numPrevTrackedObjects,1
1958
 1069               	.Lscope6:
1986
 1094               		.lcomm trackedObjectTable,64
1959
 1070               		.stabs	"",36,0,0,.Lscope6-.LFBB6
1987
 1095               		.stabs	"trackedObjectTable:S(0,24)=ar(0,25)=r(0,25);0;0177777;;0;7;(0,20)",40,0,162,trackedObjectT
1960
 1071               		.stabd	78,0,0
1988
 1096               		.stabs	"pCurrentTrackedObjectTable:S(0,26)=*(0,20)",38,0,163,pCurrentTrackedObjectTable
1961
 1072               		.data
1989
 1097               		.stabs	"lineCount:S(0,11)",38,0,164,lineCount
1962
 1073               		.type	pCurrentTrackedObjectTable, @object
1990
 1098               		.stabs	"currentState:S(0,17)",38,0,165,currentState
1963
 1074               		.size	pCurrentTrackedObjectTable, 2
1991
 1099               		.stabs	"numCurrTrackedObjects:S(0,11)",38,0,166,numCurrTrackedObjects
1964
 1075               	pCurrentTrackedObjectTable:
1992
 1100               		.stabs	"numPrevTrackedObjects:S(0,11)",38,0,167,numPrevTrackedObjects
1965
 1076 0000 0000      		.word	trackedObjectTable
1993
 1101               		.stabs	"trackedLineCount:S(0,11)",38,0,168,trackedLineCount
1966
 1077               		.lcomm numCurrTrackedObjects,1
1994
 1102               		.text
1967
 1078               		.lcomm currentState,1
1995
 1103               		.stabs	"",100,0,0,.Letext0
1968
 1079               		.lcomm lineCount,1
1996
 1104               	.Letext0:
1969
 1080               		.lcomm trackedLineCount,1
1997
 1105               	/* File "FrameMgr.c": code  580 = 0x0244 ( 513), prologues  33, epilogues  34 */
1970
 1081               		.lcomm numPrevTrackedObjects,1
1998
GAS LISTING /tmp/ccQRbLT3.s 			page 35
1971
 1082               		.lcomm trackedObjectTable,64
-
 
1972
 1083               		.stabs	"trackedObjectTable:S(0,24)=ar(0,25)=r(0,25);0;0177777;;0;7;(0,20)",40,0,162,trackedObjectT
-
 
1973
 1084               		.stabs	"pCurrentTrackedObjectTable:S(0,26)=*(0,20)",38,0,163,pCurrentTrackedObjectTable
-
 
1974
 1085               		.stabs	"lineCount:S(0,11)",38,0,164,lineCount
-
 
1975
 1086               		.stabs	"currentState:S(0,17)",38,0,165,currentState
-
 
1976
 1087               		.stabs	"numCurrTrackedObjects:S(0,11)",38,0,166,numCurrTrackedObjects
-
 
1977
 1088               		.stabs	"numPrevTrackedObjects:S(0,11)",38,0,167,numPrevTrackedObjects
-
 
1978
 1089               		.stabs	"trackedLineCount:S(0,11)",38,0,168,trackedLineCount
-
 
1979
 1090               		.text
-
 
1980
 1091               		.stabs	"",100,0,0,.Letext0
-
 
1981
GAS LISTING /tmp/cc0XjEMJ.s 			page 34
-
 
1982
 
-
 
1983
 
-
 
1984
 1092               	.Letext0:
-
 
1985
 1093               	/* File "FrameMgr.c": code  559 = 0x022f ( 494), prologues  32, epilogues  33 */
-
 
1986
GAS LISTING /tmp/cc0XjEMJ.s 			page 35
1999
 
1987
 
2000
 
1988
 
2001
DEFINED SYMBOLS
1989
DEFINED SYMBOLS
2002
                            *ABS*:00000000 FrameMgr.c
1990
                            *ABS*:00000000 FrameMgr.c
2003
     /tmp/ccQRbLT3.s:3      *ABS*:0000003f __SREG__
1991
     /tmp/cc0XjEMJ.s:2      *ABS*:0000003f __SREG__
2004
     /tmp/ccQRbLT3.s:4      *ABS*:0000003e __SP_H__
1992
     /tmp/cc0XjEMJ.s:3      *ABS*:0000003e __SP_H__
2005
     /tmp/ccQRbLT3.s:5      *ABS*:0000003d __SP_L__
1993
     /tmp/cc0XjEMJ.s:4      *ABS*:0000003d __SP_L__
2006
     /tmp/ccQRbLT3.s:6      *ABS*:00000000 __tmp_reg__
1994
     /tmp/cc0XjEMJ.s:5      *ABS*:00000000 __tmp_reg__
2007
     /tmp/ccQRbLT3.s:7      *ABS*:00000001 __zero_reg__
1995
     /tmp/cc0XjEMJ.s:6      *ABS*:00000001 __zero_reg__
2008
     /tmp/ccQRbLT3.s:91     .text:00000000 FrameMgr_processFrame
1996
     /tmp/cc0XjEMJ.s:90     .text:00000000 FrameMgr_processFrame
2009
     /tmp/ccQRbLT3.s:1087   .data:00000000 pCurrentTrackedObjectTable
1997
     /tmp/cc0XjEMJ.s:1075   .data:00000000 pCurrentTrackedObjectTable
2010
                             .bss:00000000 numCurrTrackedObjects
1998
                             .bss:00000000 numCurrTrackedObjects
2011
     /tmp/ccQRbLT3.s:270    .text:000000b2 FrameMgr_processLine
1999
     /tmp/cc0XjEMJ.s:270    .text:000000b2 FrameMgr_processLine
2012
     /tmp/ccQRbLT3.s:1089   .bss:00000001 currentState
2000
     /tmp/cc0XjEMJ.s:1077   .bss:00000001 currentState
2013
     /tmp/ccQRbLT3.s:1090   .bss:00000002 lineCount
2001
     /tmp/cc0XjEMJ.s:1078   .bss:00000002 lineCount
2014
     /tmp/ccQRbLT3.s:1091   .bss:00000003 trackedLineCount
2002
     /tmp/cc0XjEMJ.s:1079   .bss:00000003 trackedLineCount
2015
     /tmp/ccQRbLT3.s:798    .text:00000372 FrameMgr_init
2003
     /tmp/cc0XjEMJ.s:784    .text:0000034e FrameMgr_init
2016
     /tmp/ccQRbLT3.s:1093   .bss:00000005 trackedObjectTable
2004
     /tmp/cc0XjEMJ.s:1081   .bss:00000005 trackedObjectTable
2017
     /tmp/ccQRbLT3.s:823    .text:00000380 FrameMgr_acquireLine
2005
     /tmp/cc0XjEMJ.s:810    .text:0000035c FrameMgr_acquireLine
2018
     /tmp/ccQRbLT3.s:933    .text:000003ee FrameMgr_acquireFrame
2006
     /tmp/cc0XjEMJ.s:919    .text:000003c4 FrameMgr_acquireFrame
2019
     /tmp/ccQRbLT3.s:1092   .bss:00000004 numPrevTrackedObjects
2007
     /tmp/cc0XjEMJ.s:1080   .bss:00000004 numPrevTrackedObjects
2020
     /tmp/ccQRbLT3.s:988    .text:00000422 FrameMgr_dispatchEvent
2008
     /tmp/cc0XjEMJ.s:975    .text:000003f8 FrameMgr_dispatchEvent
2021
 
2009
 
2022
UNDEFINED SYMBOLS
2010
UNDEFINED SYMBOLS
2023
__do_copy_data
2011
__do_copy_data
2024
__do_clear_bss
2012
__do_clear_bss
2025
UIMgr_writeTxFifo
2013
UIMgr_writeTxFifo
2026
Exec_writeEventFifo
2014
Exec_writeEventFifo
2027
UartInt_txByte
2015
UartInt_txByte
2028
currentLineBuffer
2016
currentLineBuffer
2029
previousLineBuffer
2017
previousLineBuffer
2030
CamConfig_setCamReg
2018
CamConfig_setCamReg
2031
CamConfig_sendFifoCmds
2019
CamConfig_sendFifoCmds
2032
fastEventBitmask
2020
fastEventBitmask
2033
CamIntAsm_acquireDumpLine
2021
CamIntAsm_acquireDumpLine
2034
colorMap
2022
colorMap
2035
CamIntAsm_acquireTrackingLine
2023
CamIntAsm_acquireTrackingLine
2036
Utility_delay
2024
Utility_delay