182 |
kaklik |
1 |
GAS LISTING /tmp/ccZtX2VJ.s page 1
|
151 |
kaklik |
2 |
|
|
|
3 |
|
|
|
4 |
1 .file "UartInterface.c"
|
|
|
5 |
2 .arch atmega8
|
|
|
6 |
3 __SREG__ = 0x3f
|
|
|
7 |
4 __SP_H__ = 0x3e
|
|
|
8 |
5 __SP_L__ = 0x3d
|
|
|
9 |
6 __tmp_reg__ = 0
|
|
|
10 |
7 __zero_reg__ = 1
|
|
|
11 |
8 .global __do_copy_data
|
|
|
12 |
9 .global __do_clear_bss
|
174 |
kaklik |
13 |
10 .stabs "/home/kaklik/projects/programy/Atmel_C/AVRcam/",100,0,2,.Ltext0
|
151 |
kaklik |
14 |
11 .stabs "UartInterface.c",100,0,2,.Ltext0
|
|
|
15 |
12 .text
|
|
|
16 |
13 .Ltext0:
|
|
|
17 |
14 .stabs "gcc2_compiled.",60,0,0,0
|
|
|
18 |
15 .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
|
|
|
20 |
17 .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
|
|
|
22 |
19 .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,
|
|
|
24 |
21 .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
|
|
|
26 |
23 .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
|
|
|
28 |
25 .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
|
|
|
30 |
27 .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
|
|
|
32 |
29 .stabs "void:t(0,15)=(0,15)",128,0,0,0
|
|
|
33 |
30 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/io.h",130,0,0,0
|
|
|
34 |
31 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/sfr_defs.h",130,0,0,0
|
|
|
35 |
32 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/inttypes.h",130,0,0,0
|
|
|
36 |
33 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/stdint.h",130,0,0,0
|
|
|
37 |
34 .stabs "int8_t:t(4,1)=(0,10)",128,0,116,0
|
|
|
38 |
35 .stabs "uint8_t:t(4,2)=(0,11)",128,0,117,0
|
|
|
39 |
36 .stabs "int16_t:t(4,3)=(0,1)",128,0,118,0
|
|
|
40 |
37 .stabs "uint16_t:t(4,4)=(0,4)",128,0,119,0
|
|
|
41 |
38 .stabs "int32_t:t(4,5)=(0,3)",128,0,120,0
|
|
|
42 |
39 .stabs "uint32_t:t(4,6)=(0,5)",128,0,121,0
|
|
|
43 |
40 .stabs "int64_t:t(4,7)=(0,6)",128,0,122,0
|
|
|
44 |
41 .stabs "uint64_t:t(4,8)=(0,7)",128,0,123,0
|
|
|
45 |
42 .stabs "intptr_t:t(4,9)=(4,3)",128,0,135,0
|
|
|
46 |
43 .stabs "uintptr_t:t(4,10)=(4,4)",128,0,140,0
|
|
|
47 |
44 .stabs "int_least8_t:t(4,11)=(4,1)",128,0,152,0
|
|
|
48 |
45 .stabs "uint_least8_t:t(4,12)=(4,2)",128,0,157,0
|
|
|
49 |
46 .stabs "int_least16_t:t(4,13)=(4,3)",128,0,162,0
|
|
|
50 |
47 .stabs "uint_least16_t:t(4,14)=(4,4)",128,0,167,0
|
|
|
51 |
48 .stabs "int_least32_t:t(4,15)=(4,5)",128,0,172,0
|
|
|
52 |
49 .stabs "uint_least32_t:t(4,16)=(4,6)",128,0,177,0
|
|
|
53 |
50 .stabs "int_least64_t:t(4,17)=(4,7)",128,0,182,0
|
|
|
54 |
51 .stabs "uint_least64_t:t(4,18)=(4,8)",128,0,187,0
|
|
|
55 |
52 .stabs "int_fast8_t:t(4,19)=(4,1)",128,0,200,0
|
|
|
56 |
53 .stabs "uint_fast8_t:t(4,20)=(4,2)",128,0,205,0
|
|
|
57 |
54 .stabs "int_fast16_t:t(4,21)=(4,3)",128,0,210,0
|
|
|
58 |
55 .stabs "uint_fast16_t:t(4,22)=(4,4)",128,0,215,0
|
|
|
59 |
56 .stabs "int_fast32_t:t(4,23)=(4,5)",128,0,220,0
|
|
|
60 |
57 .stabs "uint_fast32_t:t(4,24)=(4,6)",128,0,225,0
|
182 |
kaklik |
61 |
GAS LISTING /tmp/ccZtX2VJ.s page 2
|
151 |
kaklik |
62 |
|
|
|
63 |
|
|
|
64 |
58 .stabs "int_fast64_t:t(4,25)=(4,7)",128,0,230,0
|
|
|
65 |
59 .stabs "uint_fast64_t:t(4,26)=(4,8)",128,0,235,0
|
|
|
66 |
60 .stabs "intmax_t:t(4,27)=(4,7)",128,0,249,0
|
|
|
67 |
61 .stabs "uintmax_t:t(4,28)=(4,8)",128,0,254,0
|
|
|
68 |
62 .stabn 162,0,0,0
|
|
|
69 |
63 .stabs "int_farptr_t:t(3,1)=(4,5)",128,0,76,0
|
|
|
70 |
64 .stabs "uint_farptr_t:t(3,2)=(4,6)",128,0,80,0
|
|
|
71 |
65 .stabn 162,0,0,0
|
|
|
72 |
66 .stabn 162,0,0,0
|
|
|
73 |
67 .stabn 162,0,0,0
|
|
|
74 |
68 .stabs "CommonDefs.h",130,0,0,0
|
|
|
75 |
69 .stabs "bool_t:t(5,1)=(0,11)",128,0,56,0
|
|
|
76 |
70 .stabn 162,0,0,0
|
174 |
kaklik |
77 |
71 .stabs "UartInt_init:F(0,15)",36,0,76,UartInt_init
|
151 |
kaklik |
78 |
72 .global UartInt_init
|
|
|
79 |
73 .type UartInt_init, @function
|
|
|
80 |
74 UartInt_init:
|
|
|
81 |
75 .stabd 46,0,0
|
|
|
82 |
1:UartInterface.c **** /*
|
|
|
83 |
2:UartInterface.c **** Copyright (C) 2004 John Orlando
|
|
|
84 |
3:UartInterface.c ****
|
|
|
85 |
4:UartInterface.c **** AVRcam: a small real-time image processing engine.
|
|
|
86 |
5:UartInterface.c ****
|
|
|
87 |
6:UartInterface.c **** This program is free software; you can redistribute it and/or
|
|
|
88 |
7:UartInterface.c **** modify it under the terms of the GNU General Public
|
|
|
89 |
8:UartInterface.c **** License as published by the Free Software Foundation; either
|
|
|
90 |
9:UartInterface.c **** version 2 of the License, or (at your option) any later version.
|
|
|
91 |
10:UartInterface.c ****
|
|
|
92 |
11:UartInterface.c **** This program is distributed in the hope that it will be useful,
|
|
|
93 |
12:UartInterface.c **** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
94 |
13:UartInterface.c **** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
95 |
14:UartInterface.c **** General Public License for more details.
|
|
|
96 |
15:UartInterface.c ****
|
|
|
97 |
16:UartInterface.c **** You should have received a copy of the GNU General Public
|
|
|
98 |
17:UartInterface.c **** License along with this program; if not, write to the Free Software
|
|
|
99 |
18:UartInterface.c **** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
100 |
19:UartInterface.c ****
|
|
|
101 |
20:UartInterface.c **** For more information on the AVRcam, please contact:
|
|
|
102 |
21:UartInterface.c ****
|
|
|
103 |
22:UartInterface.c **** john@jrobot.net
|
|
|
104 |
23:UartInterface.c ****
|
|
|
105 |
24:UartInterface.c **** or go to www.jrobot.net for more details regarding the system.
|
|
|
106 |
25:UartInterface.c **** */
|
|
|
107 |
26:UartInterface.c **** /***********************************************************
|
|
|
108 |
27:UartInterface.c **** Module Name: UartInterface.c
|
|
|
109 |
28:UartInterface.c **** Module Date: 04/10/2004
|
|
|
110 |
29:UartInterface.c **** Module Auth: John Orlando
|
|
|
111 |
30:UartInterface.c ****
|
|
|
112 |
31:UartInterface.c **** Description: This module is responsible for providing an
|
|
|
113 |
32:UartInterface.c **** interface to the UART hardware available on the mega8.
|
|
|
114 |
33:UartInterface.c **** This interface is an interrupt-driven interface.
|
|
|
115 |
34:UartInterface.c ****
|
|
|
116 |
35:UartInterface.c **** Revision History:
|
|
|
117 |
36:UartInterface.c **** Date Rel Ver. Notes
|
|
|
118 |
37:UartInterface.c **** 4/10/2004 0.1 Module created
|
|
|
119 |
38:UartInterface.c **** 6/30/2004 1.0 Initial release for Circuit Cellar
|
|
|
120 |
39:UartInterface.c **** contest.
|
182 |
kaklik |
121 |
GAS LISTING /tmp/ccZtX2VJ.s page 3
|
151 |
kaklik |
122 |
|
|
|
123 |
|
|
|
124 |
40:UartInterface.c **** 11/15/2004 1.2 Updated UART baud rate regs so that
|
|
|
125 |
41:UartInterface.c **** it runs at 115.2 kbps when the input
|
|
|
126 |
42:UartInterface.c **** crystal is at 17.7 MHz (which is the
|
|
|
127 |
43:UartInterface.c **** speed of the OV6620's crystal).
|
|
|
128 |
44:UartInterface.c **** 1/16/2005 1.4 Moved the serial received ISR to
|
|
|
129 |
45:UartInterface.c **** this file, instead of having it
|
|
|
130 |
46:UartInterface.c **** in its own UartInterfaceAsm.S file
|
|
|
131 |
47:UartInterface.c **** written in assembly.
|
|
|
132 |
48:UartInterface.c **** ***********************************************************/
|
|
|
133 |
49:UartInterface.c ****
|
|
|
134 |
50:UartInterface.c **** /* Includes */
|
|
|
135 |
51:UartInterface.c **** #include <avr/io.h>
|
|
|
136 |
52:UartInterface.c **** #include <avr/interrupt.h>
|
174 |
kaklik |
137 |
53:UartInterface.c **** #include "CommonDefs.h"
|
|
|
138 |
54:UartInterface.c **** #include "UartInterface.h"
|
|
|
139 |
55:UartInterface.c **** #include "UIMgr.h"
|
|
|
140 |
56:UartInterface.c **** #include "Executive.h"
|
|
|
141 |
57:UartInterface.c ****
|
|
|
142 |
58:UartInterface.c **** /* Local Variables */
|
|
|
143 |
59:UartInterface.c ****
|
|
|
144 |
60:UartInterface.c **** /* Local Structures and Typedefs */
|
|
|
145 |
61:UartInterface.c ****
|
|
|
146 |
62:UartInterface.c **** /* Extern Variables */
|
|
|
147 |
63:UartInterface.c ****
|
|
|
148 |
64:UartInterface.c **** /* Definitions */
|
|
|
149 |
65:UartInterface.c ****
|
|
|
150 |
66:UartInterface.c **** /***********************************************************
|
|
|
151 |
67:UartInterface.c **** Function Name: UartInt_init
|
|
|
152 |
68:UartInterface.c **** Function Description: This function is responsible for
|
|
|
153 |
69:UartInterface.c **** initializing the UART interface on the mega8. This
|
|
|
154 |
70:UartInterface.c **** interface is set to communicate at 115.2 Kbps, with an
|
|
|
155 |
71:UartInterface.c **** 8N1 protocol.
|
|
|
156 |
72:UartInterface.c **** Inputs: none
|
|
|
157 |
73:UartInterface.c **** Outputs: none
|
|
|
158 |
74:UartInterface.c **** ***********************************************************/
|
|
|
159 |
75:UartInterface.c **** void UartInt_init(void)
|
|
|
160 |
76:UartInterface.c **** {
|
|
|
161 |
76 .stabn 68,0,76,.LM0-UartInt_init
|
151 |
kaklik |
162 |
77 .LM0:
|
|
|
163 |
78 /* prologue: frame size=0 */
|
|
|
164 |
79 /* prologue end (size=0) */
|
174 |
kaklik |
165 |
77:UartInterface.c **** /* set up the baud rate registers so the UART will operate
|
|
|
166 |
78:UartInterface.c **** at 115.2 Kbps */
|
|
|
167 |
79:UartInterface.c **** UBRRH = 0x00;
|
|
|
168 |
80 .stabn 68,0,79,.LM1-UartInt_init
|
151 |
kaklik |
169 |
81 .LM1:
|
|
|
170 |
82 0000 10BC out 64-0x20,__zero_reg__
|
174 |
kaklik |
171 |
80:UartInterface.c ****
|
|
|
172 |
81:UartInterface.c **** #ifdef NO_CRYSTAL
|
|
|
173 |
82:UartInterface.c **** UBRRL = 18; /* 18 for double clocking at 115.2 kbps */
|
|
|
174 |
83 .stabn 68,0,82,.LM2-UartInt_init
|
151 |
kaklik |
175 |
84 .LM2:
|
|
|
176 |
85 0002 82E1 ldi r24,lo8(18)
|
|
|
177 |
86 0004 89B9 out 41-0x20,r24
|
174 |
kaklik |
178 |
83:UartInterface.c **** #else
|
|
|
179 |
84:UartInterface.c **** UBRRL = 0x08; /* for 16 MHz crystal at 115.2 kbps */
|
|
|
180 |
85:UartInterface.c **** #endif
|
182 |
kaklik |
181 |
GAS LISTING /tmp/ccZtX2VJ.s page 4
|
151 |
kaklik |
182 |
|
|
|
183 |
|
174 |
kaklik |
184 |
86:UartInterface.c ****
|
|
|
185 |
87:UartInterface.c **** /* enable the tx and rx capabilities of the UART...as well
|
|
|
186 |
88:UartInterface.c **** as the receive complete interrupt */
|
|
|
187 |
89:UartInterface.c **** UCSRB = (1<<RXCIE)|(1<<RXEN)|(1<<TXEN);
|
|
|
188 |
87 .stabn 68,0,89,.LM3-UartInt_init
|
151 |
kaklik |
189 |
88 .LM3:
|
|
|
190 |
89 0006 88E9 ldi r24,lo8(-104)
|
|
|
191 |
90 0008 8AB9 out 42-0x20,r24
|
174 |
kaklik |
192 |
90:UartInterface.c ****
|
|
|
193 |
91:UartInterface.c **** /* set up the control registers so the UART works at 8N1 */
|
|
|
194 |
92:UartInterface.c **** UCSRC = (1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0);
|
|
|
195 |
91 .stabn 68,0,92,.LM4-UartInt_init
|
151 |
kaklik |
196 |
92 .LM4:
|
|
|
197 |
93 000a 86E8 ldi r24,lo8(-122)
|
|
|
198 |
94 000c 80BD out 64-0x20,r24
|
174 |
kaklik |
199 |
93:UartInterface.c ****
|
|
|
200 |
94:UartInterface.c **** #ifdef NO_CRYSTAL
|
|
|
201 |
95:UartInterface.c **** /* set the baud rate to use the double-speed */
|
|
|
202 |
96:UartInterface.c **** UCSRA = (1<<U2X);
|
|
|
203 |
95 .stabn 68,0,96,.LM5-UartInt_init
|
151 |
kaklik |
204 |
96 .LM5:
|
|
|
205 |
97 000e 82E0 ldi r24,lo8(2)
|
|
|
206 |
98 0010 8BB9 out 43-0x20,r24
|
|
|
207 |
99 /* epilogue: frame size=0 */
|
|
|
208 |
100 0012 0895 ret
|
|
|
209 |
101 /* epilogue end (size=1) */
|
|
|
210 |
102 /* function UartInt_init size 10 (9) */
|
|
|
211 |
103 .size UartInt_init, .-UartInt_init
|
|
|
212 |
104 .Lscope0:
|
|
|
213 |
105 .stabs "",36,0,0,.Lscope0-UartInt_init
|
|
|
214 |
106 .stabd 78,0,0
|
174 |
kaklik |
215 |
107 .stabs "UartInt_txByte:F(0,15)",36,0,115,UartInt_txByte
|
|
|
216 |
108 .stabs "txByte:P(0,11)",64,0,114,24
|
151 |
kaklik |
217 |
109 .global UartInt_txByte
|
|
|
218 |
110 .type UartInt_txByte, @function
|
|
|
219 |
111 UartInt_txByte:
|
|
|
220 |
112 .stabd 46,0,0
|
174 |
kaklik |
221 |
97:UartInterface.c **** #endif
|
|
|
222 |
98:UartInterface.c ****
|
|
|
223 |
99:UartInterface.c **** }
|
|
|
224 |
100:UartInterface.c ****
|
|
|
225 |
101:UartInterface.c **** /***********************************************************
|
|
|
226 |
102:UartInterface.c **** Function Name: UartInt_txByte
|
|
|
227 |
103:UartInterface.c **** Function Description: This function is responsible for
|
|
|
228 |
104:UartInterface.c **** transmitting a single byte on the uart.
|
|
|
229 |
105:UartInterface.c **** Inputs: txByte - the byte to send
|
|
|
230 |
106:UartInterface.c **** Outputs: none
|
|
|
231 |
107:UartInterface.c **** NOTES: When the TX UDRE (data register empty) is set, there
|
|
|
232 |
108:UartInterface.c **** is puposefully no interrupt...thus, to send a string of
|
|
|
233 |
109:UartInterface.c **** data out, the calling routine needs to hold up the entire
|
|
|
234 |
110:UartInterface.c **** application while this takes place (or just send one
|
|
|
235 |
111:UartInterface.c **** byte at a time at strtegically timed intervals, like
|
|
|
236 |
112:UartInterface.c **** the stats data is sent out :-)
|
|
|
237 |
113:UartInterface.c **** ***********************************************************/
|
|
|
238 |
114:UartInterface.c **** void UartInt_txByte(unsigned char txByte)
|
|
|
239 |
115:UartInterface.c **** {
|
|
|
240 |
113 .stabn 68,0,115,.LM6-UartInt_txByte
|
182 |
kaklik |
241 |
GAS LISTING /tmp/ccZtX2VJ.s page 5
|
151 |
kaklik |
242 |
|
|
|
243 |
|
|
|
244 |
114 .LM6:
|
|
|
245 |
115 /* prologue: frame size=0 */
|
|
|
246 |
116 /* prologue end (size=0) */
|
|
|
247 |
117 .L5:
|
174 |
kaklik |
248 |
116:UartInterface.c **** /* Wait for empty transmit buffer */
|
|
|
249 |
117:UartInterface.c **** while ( !( UCSRA & (1<<UDRE)) );
|
|
|
250 |
118 .stabn 68,0,117,.LM7-UartInt_txByte
|
151 |
kaklik |
251 |
119 .LM7:
|
|
|
252 |
120 0014 5D9B sbis 43-0x20,5
|
|
|
253 |
121 0016 FECF rjmp .L5
|
174 |
kaklik |
254 |
118:UartInterface.c **** /* Put data into buffer, sends the data */
|
|
|
255 |
119:UartInterface.c **** UDR = txByte;
|
|
|
256 |
122 .stabn 68,0,119,.LM8-UartInt_txByte
|
151 |
kaklik |
257 |
123 .LM8:
|
|
|
258 |
124 0018 8CB9 out 44-0x20,r24
|
|
|
259 |
125 /* epilogue: frame size=0 */
|
|
|
260 |
126 001a 0895 ret
|
|
|
261 |
127 /* epilogue end (size=1) */
|
|
|
262 |
128 /* function UartInt_txByte size 4 (3) */
|
|
|
263 |
129 .size UartInt_txByte, .-UartInt_txByte
|
|
|
264 |
130 .Lscope1:
|
|
|
265 |
131 .stabs "",36,0,0,.Lscope1-UartInt_txByte
|
|
|
266 |
132 .stabd 78,0,0
|
174 |
kaklik |
267 |
133 .stabs "__vector_11:F(0,15)",36,0,138,__vector_11
|
151 |
kaklik |
268 |
134 .global __vector_11
|
|
|
269 |
135 .type __vector_11, @function
|
|
|
270 |
136 __vector_11:
|
|
|
271 |
137 .stabd 46,0,0
|
174 |
kaklik |
272 |
120:UartInterface.c **** }
|
|
|
273 |
121:UartInterface.c ****
|
|
|
274 |
122:UartInterface.c **** /***********************************************************
|
|
|
275 |
123:UartInterface.c **** Function Name: SIG_UART_RECV ISR
|
|
|
276 |
124:UartInterface.c **** Function Description: This function is responsible for
|
|
|
277 |
125:UartInterface.c **** handling the interrupt caused when a data byte is
|
|
|
278 |
126:UartInterface.c **** received by the UART.
|
|
|
279 |
127:UartInterface.c **** Inputs: none
|
|
|
280 |
128:UartInterface.c **** Outputs: none
|
|
|
281 |
129:UartInterface.c **** NOTES: This function was originally written in assembly,
|
|
|
282 |
130:UartInterface.c **** but moved over to C when the setting of the "T" bit at
|
|
|
283 |
131:UartInterface.c **** the end of the routine was no longer necessary (this
|
|
|
284 |
132:UartInterface.c **** theoretically allowed the AVRcam to respond to serial
|
|
|
285 |
133:UartInterface.c **** bytes in the middle of tracking or dumping a frame.
|
|
|
286 |
134:UartInterface.c **** But it wasn't really needed, and understanding the C
|
|
|
287 |
135:UartInterface.c **** is easier :-)
|
|
|
288 |
136:UartInterface.c **** ***********************************************************/
|
|
|
289 |
137:UartInterface.c **** SIGNAL(SIG_UART_RECV)
|
|
|
290 |
138:UartInterface.c **** {
|
|
|
291 |
138 .stabn 68,0,138,.LM9-__vector_11
|
151 |
kaklik |
292 |
139 .LM9:
|
|
|
293 |
140 /* prologue: frame size=0 */
|
|
|
294 |
141 001c 1F92 push __zero_reg__
|
|
|
295 |
142 001e 0F92 push __tmp_reg__
|
|
|
296 |
143 0020 0FB6 in __tmp_reg__,__SREG__
|
|
|
297 |
144 0022 0F92 push __tmp_reg__
|
|
|
298 |
145 0024 1124 clr __zero_reg__
|
|
|
299 |
146 0026 8F93 push r24
|
174 |
kaklik |
300 |
147 0028 9F93 push r25
|
182 |
kaklik |
301 |
GAS LISTING /tmp/ccZtX2VJ.s page 6
|
151 |
kaklik |
302 |
|
|
|
303 |
|
|
|
304 |
148 002a EF93 push r30
|
|
|
305 |
149 002c FF93 push r31
|
|
|
306 |
150 /* prologue end (size=9) */
|
174 |
kaklik |
307 |
139:UartInterface.c **** unsigned char tmpHead;
|
|
|
308 |
140:UartInterface.c **** /* read the data byte, put it in the serial queue, and
|
|
|
309 |
141:UartInterface.c **** post the event */
|
|
|
310 |
142:UartInterface.c ****
|
|
|
311 |
143:UartInterface.c **** UIMgr_rxFifo[UIMgr_rxFifoHead] = UDR;
|
|
|
312 |
151 .stabn 68,0,143,.LM10-__vector_11
|
151 |
kaklik |
313 |
152 .LM10:
|
|
|
314 |
153 002e 8091 0000 lds r24,UIMgr_rxFifoHead
|
|
|
315 |
154 0032 9CB1 in r25,44-0x20
|
|
|
316 |
155 0034 E0E0 ldi r30,lo8(UIMgr_rxFifo)
|
|
|
317 |
156 0036 F0E0 ldi r31,hi8(UIMgr_rxFifo)
|
|
|
318 |
157 0038 E80F add r30,r24
|
|
|
319 |
158 003a F11D adc r31,__zero_reg__
|
|
|
320 |
159 003c 9083 st Z,r25
|
174 |
kaklik |
321 |
144:UartInterface.c ****
|
|
|
322 |
145:UartInterface.c **** /* now move the head up */
|
|
|
323 |
146:UartInterface.c **** tmpHead = (UIMgr_rxFifoHead + 1) & (UI_MGR_RX_FIFO_MASK);
|
|
|
324 |
147:UartInterface.c **** UIMgr_rxFifoHead = tmpHead;
|
|
|
325 |
160 .stabn 68,0,147,.LM11-__vector_11
|
151 |
kaklik |
326 |
161 .LM11:
|
|
|
327 |
162 003e 8F5F subi r24,lo8(-(1))
|
|
|
328 |
163 0040 8F71 andi r24,lo8(31)
|
|
|
329 |
164 0042 8093 0000 sts UIMgr_rxFifoHead,r24
|
174 |
kaklik |
330 |
148:UartInterface.c ****
|
|
|
331 |
149:UartInterface.c **** /* write the serial received event to the event fifo */
|
|
|
332 |
150:UartInterface.c **** Exec_eventFifo[Exec_eventFifoHead] = EV_SERIAL_DATA_RECEIVED;
|
|
|
333 |
165 .stabn 68,0,150,.LM12-__vector_11
|
151 |
kaklik |
334 |
166 .LM12:
|
|
|
335 |
167 0046 8091 0000 lds r24,Exec_eventFifoHead
|
|
|
336 |
168 004a E0E0 ldi r30,lo8(Exec_eventFifo)
|
|
|
337 |
169 004c F0E0 ldi r31,hi8(Exec_eventFifo)
|
|
|
338 |
170 004e E80F add r30,r24
|
|
|
339 |
171 0050 F11D adc r31,__zero_reg__
|
|
|
340 |
172 0052 91E0 ldi r25,lo8(1)
|
|
|
341 |
173 0054 9083 st Z,r25
|
174 |
kaklik |
342 |
151:UartInterface.c ****
|
|
|
343 |
152:UartInterface.c **** /* now move the head up */
|
|
|
344 |
153:UartInterface.c **** tmpHead = (Exec_eventFifoHead + 1) & (EXEC_EVENT_FIFO_MASK);
|
|
|
345 |
154:UartInterface.c **** Exec_eventFifoHead = tmpHead;
|
|
|
346 |
174 .stabn 68,0,154,.LM13-__vector_11
|
151 |
kaklik |
347 |
175 .LM13:
|
|
|
348 |
176 0056 8F5F subi r24,lo8(-(1))
|
|
|
349 |
177 0058 8770 andi r24,lo8(7)
|
|
|
350 |
178 005a 8093 0000 sts Exec_eventFifoHead,r24
|
|
|
351 |
179 /* epilogue: frame size=0 */
|
|
|
352 |
180 005e FF91 pop r31
|
|
|
353 |
181 0060 EF91 pop r30
|
|
|
354 |
182 0062 9F91 pop r25
|
|
|
355 |
183 0064 8F91 pop r24
|
|
|
356 |
184 0066 0F90 pop __tmp_reg__
|
|
|
357 |
185 0068 0FBE out __SREG__,__tmp_reg__
|
|
|
358 |
186 006a 0F90 pop __tmp_reg__
|
|
|
359 |
187 006c 1F90 pop __zero_reg__
|
174 |
kaklik |
360 |
188 006e 1895 reti
|
182 |
kaklik |
361 |
GAS LISTING /tmp/ccZtX2VJ.s page 7
|
151 |
kaklik |
362 |
|
|
|
363 |
|
|
|
364 |
189 /* epilogue end (size=9) */
|
|
|
365 |
190 /* function __vector_11 size 42 (24) */
|
|
|
366 |
191 .size __vector_11, .-__vector_11
|
|
|
367 |
192 .Lscope2:
|
|
|
368 |
193 .stabs "",36,0,0,.Lscope2-__vector_11
|
|
|
369 |
194 .stabd 78,0,0
|
|
|
370 |
195 .stabs "",100,0,0,.Letext0
|
|
|
371 |
196 .Letext0:
|
|
|
372 |
197 /* File "UartInterface.c": code 56 = 0x0038 ( 36), prologues 9, epilogues 11 */
|
182 |
kaklik |
373 |
GAS LISTING /tmp/ccZtX2VJ.s page 8
|
151 |
kaklik |
374 |
|
|
|
375 |
|
|
|
376 |
DEFINED SYMBOLS
|
|
|
377 |
*ABS*:00000000 UartInterface.c
|
182 |
kaklik |
378 |
/tmp/ccZtX2VJ.s:3 *ABS*:0000003f __SREG__
|
|
|
379 |
/tmp/ccZtX2VJ.s:4 *ABS*:0000003e __SP_H__
|
|
|
380 |
/tmp/ccZtX2VJ.s:5 *ABS*:0000003d __SP_L__
|
|
|
381 |
/tmp/ccZtX2VJ.s:6 *ABS*:00000000 __tmp_reg__
|
|
|
382 |
/tmp/ccZtX2VJ.s:7 *ABS*:00000001 __zero_reg__
|
|
|
383 |
/tmp/ccZtX2VJ.s:74 .text:00000000 UartInt_init
|
|
|
384 |
/tmp/ccZtX2VJ.s:111 .text:00000014 UartInt_txByte
|
|
|
385 |
/tmp/ccZtX2VJ.s:136 .text:0000001c __vector_11
|
151 |
kaklik |
386 |
|
|
|
387 |
UNDEFINED SYMBOLS
|
|
|
388 |
__do_copy_data
|
|
|
389 |
__do_clear_bss
|
|
|
390 |
UIMgr_rxFifoHead
|
|
|
391 |
UIMgr_rxFifo
|
|
|
392 |
Exec_eventFifoHead
|
|
|
393 |
Exec_eventFifo
|