Rev 410 | Blame | Compare with Previous | Last modification | View Log | Download
GAS LISTING /tmp/ccs6Vjbf.s page 1
1 .file "UIMgr.c"
2 __SREG__ = 0x3f
3 __SP_H__ = 0x3e
4 __SP_L__ = 0x3d
5 __tmp_reg__ = 0
6 __zero_reg__ = 1
7 .global __do_copy_data
8 .global __do_clear_bss
9 .stabs "/home/kaklik/projects/programy/C/avr/AVRcam/",100,0,2,.Ltext0
10 .stabs "UIMgr.c",100,0,2,.Ltext0
11 .text
12 .Ltext0:
13 .stabs "gcc2_compiled.",60,0,0,0
14 .stabs "int:t(0,1)=r(0,1);-32768;32767;",128,0,0,0
15 .stabs "char:t(0,2)=@s8;r(0,2);0;255;",128,0,0,0
16 .stabs "long int:t(0,3)=@s32;r(0,3);020000000000;017777777777;",128,0,0,0
17 .stabs "unsigned int:t(0,4)=r(0,4);0;0177777;",128,0,0,0
18 .stabs "long unsigned int:t(0,5)=@s32;r(0,5);0;037777777777;",128,0,0,0
19 .stabs "long long int:t(0,6)=@s64;r(0,6);01000000000000000000000;0777777777777777777777;",128,0,0,
20 .stabs "long long unsigned int:t(0,7)=@s64;r(0,7);0;01777777777777777777777;",128,0,0,0
21 .stabs "short int:t(0,8)=r(0,8);-32768;32767;",128,0,0,0
22 .stabs "short unsigned int:t(0,9)=r(0,9);0;0177777;",128,0,0,0
23 .stabs "signed char:t(0,10)=@s8;r(0,10);-128;127;",128,0,0,0
24 .stabs "unsigned char:t(0,11)=@s8;r(0,11);0;255;",128,0,0,0
25 .stabs "float:t(0,12)=r(0,1);4;0;",128,0,0,0
26 .stabs "double:t(0,13)=r(0,1);4;0;",128,0,0,0
27 .stabs "long double:t(0,14)=r(0,1);4;0;",128,0,0,0
28 .stabs "void:t(0,15)=(0,15)",128,0,0,0
29 .stabs "/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/io.h",130,0,0,0
30 .stabs "/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/sfr_defs.h",130,0,0,0
31 .stabs "/usr/lib/gcc/avr/4.2.1/../../../../avr/include/inttypes.h",130,0,0,0
32 .stabs "/usr/lib/gcc/avr/4.2.1/../../../../avr/include/stdint.h",130,0,0,0
33 .stabs "int8_t:t(4,1)=(0,10)",128,0,116,0
34 .stabs "uint8_t:t(4,2)=(0,11)",128,0,117,0
35 .stabs "int16_t:t(4,3)=(0,1)",128,0,118,0
36 .stabs "uint16_t:t(4,4)=(0,4)",128,0,119,0
37 .stabs "int32_t:t(4,5)=(0,3)",128,0,120,0
38 .stabs "uint32_t:t(4,6)=(0,5)",128,0,121,0
39 .stabs "int64_t:t(4,7)=(0,6)",128,0,122,0
40 .stabs "uint64_t:t(4,8)=(0,7)",128,0,123,0
41 .stabs "intptr_t:t(4,9)=(4,3)",128,0,135,0
42 .stabs "uintptr_t:t(4,10)=(4,4)",128,0,140,0
43 .stabs "int_least8_t:t(4,11)=(4,1)",128,0,152,0
44 .stabs "uint_least8_t:t(4,12)=(4,2)",128,0,157,0
45 .stabs "int_least16_t:t(4,13)=(4,3)",128,0,162,0
46 .stabs "uint_least16_t:t(4,14)=(4,4)",128,0,167,0
47 .stabs "int_least32_t:t(4,15)=(4,5)",128,0,172,0
48 .stabs "uint_least32_t:t(4,16)=(4,6)",128,0,177,0
49 .stabs "int_least64_t:t(4,17)=(4,7)",128,0,182,0
50 .stabs "uint_least64_t:t(4,18)=(4,8)",128,0,187,0
51 .stabs "int_fast8_t:t(4,19)=(4,1)",128,0,200,0
52 .stabs "uint_fast8_t:t(4,20)=(4,2)",128,0,205,0
53 .stabs "int_fast16_t:t(4,21)=(4,3)",128,0,210,0
54 .stabs "uint_fast16_t:t(4,22)=(4,4)",128,0,215,0
55 .stabs "int_fast32_t:t(4,23)=(4,5)",128,0,220,0
56 .stabs "uint_fast32_t:t(4,24)=(4,6)",128,0,225,0
57 .stabs "int_fast64_t:t(4,25)=(4,7)",128,0,230,0
GAS LISTING /tmp/ccs6Vjbf.s page 2
58 .stabs "uint_fast64_t:t(4,26)=(4,8)",128,0,235,0
59 .stabs "intmax_t:t(4,27)=(4,7)",128,0,249,0
60 .stabs "uintmax_t:t(4,28)=(4,8)",128,0,254,0
61 .stabn 162,0,0,0
62 .stabs "int_farptr_t:t(3,1)=(4,5)",128,0,76,0
63 .stabs "uint_farptr_t:t(3,2)=(4,6)",128,0,80,0
64 .stabn 162,0,0,0
65 .stabn 162,0,0,0
66 .stabn 162,0,0,0
67 .stabs "/usr/lib/gcc/avr/4.2.1/../../../../avr/include/stdlib.h",130,0,0,0
68 .stabs "/usr/lib/gcc/avr/4.2.1/include/stddef.h",130,0,0,0
69 .stabs "size_t:t(6,1)=(0,4)",128,0,214,0
70 .stabs "wchar_t:t(6,2)=(0,1)",128,0,326,0
71 .stabn 162,0,0,0
72 .stabs "div_t:t(5,1)=(5,2)=s4quot:(0,1),0,16;rem:(0,1),16,16;;",128,0,69,0
73 .stabs "ldiv_t:t(5,3)=(5,4)=s8quot:(0,3),0,32;rem:(0,3),32,32;;",128,0,75,0
74 .stabs "__compar_fn_t:t(5,5)=(5,6)=*(5,7)=f(0,1)",128,0,78,0
75 .stabn 162,0,0,0
76 .stabs "CommonDefs.h",130,0,0,0
77 .stabs "bool_t:t(7,1)=(0,11)",128,0,56,0
78 .stabn 162,0,0,0
79 .stabs "CamConfig.h",130,0,0,0
80 .stabs "I2CInterface.h",130,0,0,0
81 .stabs "i2cCmd_t:t(9,1)=(9,2)=s2configReg:(0,11),0,8;data:(0,11),8,8;;",128,0,53,0
82 .stabn 162,0,0,0
83 .stabn 162,0,0,0
84 .stabs " :T(0,16)=@s8;egetVersionCmd:0,pingCmd:1,setCameraRegsCmd:2,dumpFrameCmd:3,enableTrackingC
85 .stabs "UIMgr_Cmd_t:t(0,17)=(0,16)",128,0,81,0
86 .stabs " :T(0,18)=@s8;esetRed:0,setGreen:1,setBlue:2,;",128,0,0,0
87 .stabs "setColorState_t:t(0,19)=(0,18)",128,0,88,0
88 .stabs "UIMgr_writeBufferToTxFifo:F(0,15)",36,0,547,UIMgr_writeBufferToTxFifo
89 .stabs "pData:P(0,20)=*(0,11)",64,0,546,26
90 .stabs "length:P(0,11)",64,0,546,22
91 .global UIMgr_writeBufferToTxFifo
92 .type UIMgr_writeBufferToTxFifo, @function
93 UIMgr_writeBufferToTxFifo:
94 .stabd 46,0,0
1:UIMgr.c **** /*
2:UIMgr.c **** Copyright (C) 2004 John Orlando
3:UIMgr.c ****
4:UIMgr.c **** AVRcam: a small real-time image processing engine.
5:UIMgr.c ****
6:UIMgr.c **** This program is free software; you can redistribute it and/or
7:UIMgr.c **** modify it under the terms of the GNU General Public
8:UIMgr.c **** License as published by the Free Software Foundation; either
9:UIMgr.c **** version 2 of the License, or (at your option) any later version.
10:UIMgr.c ****
11:UIMgr.c **** This program is distributed in the hope that it will be useful,
12:UIMgr.c **** but WITHOUT ANY WARRANTY; without even the implied warranty of
13:UIMgr.c **** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14:UIMgr.c **** General Public License for more details.
15:UIMgr.c ****
16:UIMgr.c **** You should have received a copy of the GNU General Public
17:UIMgr.c **** License along with this program; if not, write to the Free Software
18:UIMgr.c **** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19:UIMgr.c ****
20:UIMgr.c **** For more information on the AVRcam, please contact:
GAS LISTING /tmp/ccs6Vjbf.s page 3
21:UIMgr.c ****
22:UIMgr.c **** john@jrobot.net
23:UIMgr.c ****
24:UIMgr.c **** or go to www.jrobot.net for more details regarding the system.
25:UIMgr.c **** */
26:UIMgr.c **** /***********************************************************
27:UIMgr.c **** Module Name: UIMgr.c
28:UIMgr.c **** Module Date: 04/10/2004
29:UIMgr.c **** Module Auth: John Orlando
30:UIMgr.c ****
31:UIMgr.c **** Description: This module is responsible for providing
32:UIMgr.c **** the processing to manage the user interface of the
33:UIMgr.c **** system. This user interface is provided via the UART.
34:UIMgr.c **** This module handles the incoming serial commands, and
35:UIMgr.c **** performs the needed functionality. It is then
36:UIMgr.c **** responsible for generating any needed response to
37:UIMgr.c **** the external entity.
38:UIMgr.c ****
39:UIMgr.c **** Revision History:
40:UIMgr.c **** Date Rel Ver. Notes
41:UIMgr.c **** 4/10/2004 0.1 Module created
42:UIMgr.c **** 6/30/2004 1.0 Initial release for Circuit Cellar
43:UIMgr.c **** contest.
44:UIMgr.c **** 11/15/2004 1.2 Updated version string to 1.2.
45:UIMgr.c **** 1/16/2005 1.4 Added code to write the colorMap
46:UIMgr.c **** to EEPROM one byte at a time,
47:UIMgr.c **** ensuring that the EEPROM is only
48:UIMgr.c **** written when the data is different
49:UIMgr.c **** than the current value (thus saving
50:UIMgr.c **** EEPROM writes). Updated version
51:UIMgr.c **** string to 1.4.
52:UIMgr.c **** ***********************************************************/
53:UIMgr.c ****
54:UIMgr.c **** /* Includes */
55:UIMgr.c **** #include <avr/io.h>
56:UIMgr.c **** #include <stdlib.h>
57:UIMgr.c **** #include <string.h>
58:UIMgr.c **** #include <avr/eeprom.h>
59:UIMgr.c **** #include "CommonDefs.h"
60:UIMgr.c **** #include "UIMgr.h"
61:UIMgr.c **** #include "UartInterface.h"
62:UIMgr.c **** #include "CamConfig.h"
63:UIMgr.c **** #include "Utility.h"
64:UIMgr.c **** #include "Executive.h"
65:UIMgr.c **** #include "CamInterface.h"
66:UIMgr.c ****
67:UIMgr.c **** /* Local Structures and Typedefs */
68:UIMgr.c ****
69:UIMgr.c **** typedef enum
70:UIMgr.c **** {
71:UIMgr.c **** getVersionCmd,
72:UIMgr.c **** pingCmd,
73:UIMgr.c **** setCameraRegsCmd,
74:UIMgr.c **** dumpFrameCmd,
75:UIMgr.c **** enableTrackingCmd,
76:UIMgr.c **** disableTrackingCmd,
77:UIMgr.c **** setColorMapCmd,
GAS LISTING /tmp/ccs6Vjbf.s page 4
78:UIMgr.c **** resetCameraCmd,
79:UIMgr.c **** noCmd,
80:UIMgr.c **** invalidCmd
81:UIMgr.c **** } UIMgr_Cmd_t;
82:UIMgr.c ****
83:UIMgr.c **** typedef enum
84:UIMgr.c **** {
85:UIMgr.c **** setRed,
86:UIMgr.c **** setGreen,
87:UIMgr.c **** setBlue
88:UIMgr.c **** } setColorState_t;
89:UIMgr.c ****
90:UIMgr.c ****
91:UIMgr.c **** /* Local Variables */
92:UIMgr.c **** static unsigned char charCount = 0;
93:UIMgr.c **** static unsigned char charIndex = 0;
94:UIMgr.c **** static unsigned char asciiTokenBuffer[MAX_TOKEN_LENGTH+1]; /* +1 to ensure NULL at end */
95:UIMgr.c **** static unsigned char tokenCount = 0;
96:UIMgr.c **** static unsigned char tokenBuffer[MAX_TOKEN_COUNT];
97:UIMgr.c **** static UIMgr_Cmd_t receivedCmd = noCmd;
98:UIMgr.c **** static unsigned char AVRcamVersion[] = "AVRcam v1.4\r";
99:UIMgr.c ****
100:UIMgr.c **** /* Local Function Declaration */
101:UIMgr.c **** static unsigned char UIMgr_readRxFifo(void);
102:UIMgr.c **** static unsigned char UIMgr_readTxFifo(void);
103:UIMgr.c **** static unsigned char UIMgr_readRxFifo(void);
104:UIMgr.c **** static void UIMgr_sendNck(void);
105:UIMgr.c **** static void UIMgr_sendAck(void);
106:UIMgr.c **** static void UIMgr_convertTokenToCmd(void);
107:UIMgr.c **** static void UIMgr_convertTokenToValue(void);
108:UIMgr.c **** static void UIMgr_executeCmd(void);
109:UIMgr.c ****
110:UIMgr.c **** /* Extern Variables */
111:UIMgr.c **** unsigned char UIMgr_rxFifo[UI_MGR_RX_FIFO_SIZE];
112:UIMgr.c **** unsigned char UIMgr_rxFifoHead=0;
113:UIMgr.c **** unsigned char UIMgr_rxFifoTail=0;
114:UIMgr.c ****
115:UIMgr.c **** unsigned char UIMgr_txFifo[UI_MGR_TX_FIFO_SIZE];
116:UIMgr.c **** unsigned char UIMgr_txFifoHead=0;
117:UIMgr.c **** unsigned char UIMgr_txFifoTail=0;
118:UIMgr.c ****
119:UIMgr.c **** /* Definitions */
120:UIMgr.c **** #define IS_DATA_IN_TX_FIFO() (!(UIMgr_txFifoHead == UIMgr_txFifoTail))
121:UIMgr.c **** #define IS_DATA_IN_RX_FIFO() (!(UIMgr_rxFifoHead == UIMgr_rxFifoTail))
122:UIMgr.c ****
123:UIMgr.c **** /* MAX_EEPROM_WRITE_ATTEMPTS limits the number of writes that can be
124:UIMgr.c **** done to a particular EEPROM cell, so that it can't possible just
125:UIMgr.c **** write to the same cell over and over */
126:UIMgr.c **** #define MAX_EEPROM_WRITE_ATTEMPTS 3
127:UIMgr.c ****
128:UIMgr.c **** /***********************************************************
129:UIMgr.c **** Function Name: UIMgr_init
130:UIMgr.c **** Function Description: This function is responsible for
131:UIMgr.c **** initializing the UIMgr module. It sets up the fifo
132:UIMgr.c **** used to hold incoming data, etc.
133:UIMgr.c **** Inputs: none
134:UIMgr.c **** Outputs: none
GAS LISTING /tmp/ccs6Vjbf.s page 5
135:UIMgr.c **** ***********************************************************/
136:UIMgr.c **** void UIMgr_init(void)
137:UIMgr.c **** {
138:UIMgr.c **** memset(asciiTokenBuffer,0x00,MAX_TOKEN_LENGTH+1);
139:UIMgr.c **** memset(tokenBuffer,0x00,MAX_TOKEN_COUNT);
140:UIMgr.c **** memset(UIMgr_txFifo,0x00,UI_MGR_TX_FIFO_SIZE);
141:UIMgr.c **** memset(UIMgr_rxFifo,0x00,UI_MGR_RX_FIFO_SIZE);
142:UIMgr.c **** }
143:UIMgr.c ****
144:UIMgr.c **** /***********************************************************
145:UIMgr.c **** Function Name: UIMgr_dispatchEvent
146:UIMgr.c **** Function Description: This function is responsible for
147:UIMgr.c **** processing events that pertain to the UIMgr.
148:UIMgr.c **** Inputs: event - the generated event
149:UIMgr.c **** Outputs: none
150:UIMgr.c **** ***********************************************************/
151:UIMgr.c **** void UIMgr_dispatchEvent(unsigned char event)
152:UIMgr.c **** {
153:UIMgr.c **** switch(event)
154:UIMgr.c **** {
155:UIMgr.c **** case EV_ACQUIRE_LINE_COMPLETE:
156:UIMgr.c **** UIMgr_transmitPendingData();
157:UIMgr.c **** break;
158:UIMgr.c ****
159:UIMgr.c **** case EV_SERIAL_DATA_RECEIVED:
160:UIMgr.c **** UIMgr_processReceivedData();
161:UIMgr.c **** break;
162:UIMgr.c ****
163:UIMgr.c **** case EV_SERIAL_DATA_PENDING_TX:
164:UIMgr.c **** UIMgr_flushTxBuffer();
165:UIMgr.c **** break;
166:UIMgr.c **** }
167:UIMgr.c **** }
168:UIMgr.c **** /***********************************************************
169:UIMgr.c **** Function Name: UIMgr_transmitPendingData
170:UIMgr.c **** Function Description: This function is responsible for
171:UIMgr.c **** transmitting a single byte of data if data is waiting
172:UIMgr.c **** to be sent. Otherwise, if nothing is waiting, the
173:UIMgr.c **** function just returns.
174:UIMgr.c **** Inputs: none
175:UIMgr.c **** Outputs: none
176:UIMgr.c **** ***********************************************************/
177:UIMgr.c **** void UIMgr_transmitPendingData(void)
178:UIMgr.c **** {
179:UIMgr.c **** if (IS_DATA_IN_TX_FIFO() == TRUE)
180:UIMgr.c **** {
181:UIMgr.c **** /* data is waiting...send a single byte */
182:UIMgr.c **** UartInt_txByte( UIMgr_readTxFifo() );
183:UIMgr.c **** }
184:UIMgr.c **** }
185:UIMgr.c **** /***********************************************************
186:UIMgr.c **** Function Name: UIMgr_processReceivedData
187:UIMgr.c **** Function Description: This function is responsible for
188:UIMgr.c **** parsing any serial data waiting in the rx fifo
189:UIMgr.c **** Inputs: none
190:UIMgr.c **** Outputs: none
191:UIMgr.c **** ***********************************************************/
GAS LISTING /tmp/ccs6Vjbf.s page 6
192:UIMgr.c **** void UIMgr_processReceivedData(void)
193:UIMgr.c **** {
194:UIMgr.c **** unsigned char tmpData = 0;
195:UIMgr.c ****
196:UIMgr.c **** /* still need to add a mechanism to handle token counts
197:UIMgr.c **** that are excessive!!! FIX ME!!! */
198:UIMgr.c ****
199:UIMgr.c **** while(IS_DATA_IN_RX_FIFO() == TRUE)
200:UIMgr.c **** {
201:UIMgr.c **** tmpData = UIMgr_readRxFifo();
202:UIMgr.c **** if (tmpData == '\r')
203:UIMgr.c **** {
204:UIMgr.c **** /* we have reached a token separator */
205:UIMgr.c **** if (tokenCount == 0)
206:UIMgr.c **** {
207:UIMgr.c **** /* convert the command */
208:UIMgr.c **** UIMgr_convertTokenToCmd();
209:UIMgr.c **** }
210:UIMgr.c **** else
211:UIMgr.c **** {
212:UIMgr.c **** /* convert a value */
213:UIMgr.c **** UIMgr_convertTokenToValue();
214:UIMgr.c **** tokenCount++;
215:UIMgr.c **** }
216:UIMgr.c **** /* either way, it is time to try to process the received
217:UIMgr.c **** token list since we have reached the end of the cmd. */
218:UIMgr.c **** Utility_delay(100);
219:UIMgr.c **** if (receivedCmd == invalidCmd ||
220:UIMgr.c **** receivedCmd == noCmd )
221:UIMgr.c **** {
222:UIMgr.c **** UIMgr_sendNck();
223:UIMgr.c **** PUBLISH_EVENT(EV_SERIAL_DATA_PENDING_TX);
224:UIMgr.c **** }
225:UIMgr.c **** else
226:UIMgr.c **** {
227:UIMgr.c **** UIMgr_sendAck();
228:UIMgr.c **** /* publish the serial data pending event, so it
229:UIMgr.c **** will push the ACK out before we execute the cmd */
230:UIMgr.c **** PUBLISH_EVENT(EV_SERIAL_DATA_PENDING_TX);
231:UIMgr.c **** UIMgr_executeCmd();
232:UIMgr.c **** }
233:UIMgr.c ****
234:UIMgr.c **** /* reset any necessary data */
235:UIMgr.c **** tokenCount = 0;
236:UIMgr.c **** memset(tokenBuffer,0x00,MAX_TOKEN_COUNT);
237:UIMgr.c **** }
238:UIMgr.c **** else if (tmpData == ' ') /* space char */
239:UIMgr.c **** {
240:UIMgr.c **** /* the end of a token has been reached */
241:UIMgr.c **** if (tokenCount == 0)
242:UIMgr.c **** {
243:UIMgr.c **** UIMgr_convertTokenToCmd();
244:UIMgr.c **** tokenCount++; /* check this...why is this being incremented here??? This
245:UIMgr.c **** means we have received a token, with tokenCount == 0, which means it is a
246:UIMgr.c **** command...why is this contributing to tokenCount?
247:UIMgr.c **** This might cause the set color map command to include too much data, since
248:UIMgr.c **** it sets the color map based on tokenCount...CHECK*/
GAS LISTING /tmp/ccs6Vjbf.s page 7
249:UIMgr.c **** }
250:UIMgr.c **** else
251:UIMgr.c **** {
252:UIMgr.c **** /* check to see if this token is going to push
253:UIMgr.c **** us over the limit...if so, abort the transaction */
254:UIMgr.c **** if (tokenCount+1 >= MAX_TOKEN_COUNT)
255:UIMgr.c **** {
256:UIMgr.c **** /* we received too many tokens, and
257:UIMgr.c **** need to NCK this request, since its too
258:UIMgr.c **** large...reset everything...*/
259:UIMgr.c **** charCount=0;
260:UIMgr.c **** charIndex=0;
261:UIMgr.c **** tokenCount=0;
262:UIMgr.c **** receivedCmd = invalidCmd;
263:UIMgr.c **** }
264:UIMgr.c **** else
265:UIMgr.c **** {
266:UIMgr.c **** /* tokenCount is still in range...*/
267:UIMgr.c **** UIMgr_convertTokenToValue();
268:UIMgr.c **** tokenCount++;
269:UIMgr.c **** }
270:UIMgr.c **** }
271:UIMgr.c **** }
272:UIMgr.c **** else if ( (tmpData >= 'A' && tmpData <= 'Z') ||
273:UIMgr.c **** (tmpData >= '0' && tmpData <= '9') )
274:UIMgr.c **** {
275:UIMgr.c **** /* a valid range of token was received */
276:UIMgr.c **** asciiTokenBuffer[charIndex] = tmpData;
277:UIMgr.c **** charCount++;
278:UIMgr.c **** charIndex++;
279:UIMgr.c **** if (charCount > MAX_TOKEN_LENGTH)
280:UIMgr.c **** {
281:UIMgr.c **** /* we have received a token that cannot be handled...
282:UIMgr.c **** set the received cmd to an invalid cmd, and wait
283:UIMgr.c **** for the \r to process it */
284:UIMgr.c **** receivedCmd = invalidCmd;
285:UIMgr.c **** charIndex = 0; /* ...so we won't overwrite memory */
286:UIMgr.c **** }
287:UIMgr.c **** }
288:UIMgr.c **** else
289:UIMgr.c **** {
290:UIMgr.c **** /* an invalid character was received */
291:UIMgr.c **** receivedCmd = invalidCmd;
292:UIMgr.c **** }
293:UIMgr.c **** } /* end while */
294:UIMgr.c ****
295:UIMgr.c **** asm volatile("clt"::); /* clear out the T flag in case it wasn't
296:UIMgr.c **** cleared already */
297:UIMgr.c **** }
298:UIMgr.c ****
299:UIMgr.c **** /***********************************************************
300:UIMgr.c **** Function Name: UIMgr_executeCmd
301:UIMgr.c **** Function Description: This function is responsible for
302:UIMgr.c **** executing whatever cmd is stored in the receivedCmd
303:UIMgr.c **** object.
304:UIMgr.c **** Inputs: none
305:UIMgr.c **** Outputs: none
GAS LISTING /tmp/ccs6Vjbf.s page 8
306:UIMgr.c **** ***********************************************************/
307:UIMgr.c **** static void UIMgr_executeCmd(void)
308:UIMgr.c **** {
309:UIMgr.c **** unsigned char i,eepromData, num_writes=0;
310:UIMgr.c **** unsigned char *pData;
311:UIMgr.c **** unsigned char eeprom_write_succeeded = FALSE;
312:UIMgr.c **** #if DEBUG_COLOR_MAP
313:UIMgr.c **** unsigned char asciiBuffer[5];
314:UIMgr.c **** #endif
315:UIMgr.c ****
316:UIMgr.c **** if (receivedCmd == pingCmd)
317:UIMgr.c **** {
318:UIMgr.c **** }
319:UIMgr.c **** else if (receivedCmd == getVersionCmd)
320:UIMgr.c **** {
321:UIMgr.c **** pData = AVRcamVersion;
322:UIMgr.c **** while(*pData != 0)
323:UIMgr.c **** {
324:UIMgr.c **** UIMgr_writeTxFifo(*pData++);
325:UIMgr.c **** }
326:UIMgr.c **** }
327:UIMgr.c **** else if (receivedCmd == resetCameraCmd)
328:UIMgr.c **** {
329:UIMgr.c **** CamInt_resetCam();
330:UIMgr.c **** }
331:UIMgr.c **** else if (receivedCmd == dumpFrameCmd)
332:UIMgr.c **** {
333:UIMgr.c **** /* publish the event that will indicate that
334:UIMgr.c **** a request has come to dump a frame...this will
335:UIMgr.c **** be received by the FrameMgr, which will begin
336:UIMgr.c **** dumping the frame...a short delay is needed
337:UIMgr.c **** here to keep the Java demo app happy (sometimes
338:UIMgr.c **** it wouldn't be able to receive the serial data
339:UIMgr.c **** as quickly as AVRcam can provide it). */
340:UIMgr.c **** Utility_delay(100);
341:UIMgr.c **** PUBLISH_EVENT(EV_DUMP_FRAME);
342:UIMgr.c **** }
343:UIMgr.c **** else if (receivedCmd == setCameraRegsCmd)
344:UIMgr.c **** {
345:UIMgr.c **** /* we need to gather the tokens and
346:UIMgr.c **** build config cmds to be sent to the camera */
347:UIMgr.c **** for (i=1; i<tokenCount; i+=2) /* starts at 1 since first token
348:UIMgr.c **** is the CR cmd */
349:UIMgr.c **** {
350:UIMgr.c **** CamConfig_setCamReg(tokenBuffer[i],tokenBuffer[i+1]);
351:UIMgr.c **** }
352:UIMgr.c **** CamConfig_sendFifoCmds();
353:UIMgr.c **** }
354:UIMgr.c **** else if (receivedCmd == enableTrackingCmd)
355:UIMgr.c **** {
356:UIMgr.c **** /* publish the event...again with a short delay */
357:UIMgr.c **** Utility_delay(100);
358:UIMgr.c **** PUBLISH_EVENT(EV_ENABLE_TRACKING);
359:UIMgr.c **** }
360:UIMgr.c **** else if (receivedCmd == disableTrackingCmd)
361:UIMgr.c **** {
362:UIMgr.c **** PUBLISH_EVENT(EV_DISABLE_TRACKING);
GAS LISTING /tmp/ccs6Vjbf.s page 9
363:UIMgr.c **** }
364:UIMgr.c **** else if (receivedCmd == setColorMapCmd)
365:UIMgr.c **** {
366:UIMgr.c **** /* copy the received tokens into the color map */
367:UIMgr.c **** for (i=0; i<tokenCount; i++)
368:UIMgr.c **** {
369:UIMgr.c **** colorMap[i] = tokenBuffer[i+1];
370:UIMgr.c ****
371:UIMgr.c **** /* write each colorMap byte to EEPROM, but only those
372:UIMgr.c **** that changed...this will help reduce wear on the EEPROM */
373:UIMgr.c **** eepromData = eeprom_read_byte( (unsigned char*)(i+1));
374:UIMgr.c **** if (eepromData != colorMap[i])
375:UIMgr.c **** {
376:UIMgr.c **** /* need to actually perform the write because the
377:UIMgr.c **** data in eeprom is different than the current colorMap */
378:UIMgr.c **** eeprom_write_succeeded = FALSE;
379:UIMgr.c **** while(eeprom_write_succeeded == FALSE && num_writes < MAX_EEPROM_WRITE_ATTEMPTS)
380:UIMgr.c **** {
381:UIMgr.c **** eeprom_write_byte((unsigned char*)(i+1),colorMap[i]);
382:UIMgr.c **** num_writes++;
383:UIMgr.c **** eepromData = eeprom_read_byte( (unsigned char*)(i+1));
384:UIMgr.c **** if (eepromData == colorMap[i])
385:UIMgr.c **** {
386:UIMgr.c **** eeprom_write_succeeded = TRUE;
387:UIMgr.c **** }
388:UIMgr.c **** }
389:UIMgr.c **** num_writes = 0;
390:UIMgr.c **** }
391:UIMgr.c **** }
392:UIMgr.c ****
393:UIMgr.c **** #if DEBUG_COLOR_MAP
394:UIMgr.c **** /* for debugging...send out the entire color map */
395:UIMgr.c **** UIMgr_txBuffer("\r\n",2);
396:UIMgr.c **** for (i=0; i<NUM_ELEMENTS_IN_COLOR_MAP; i++)
397:UIMgr.c **** {
398:UIMgr.c **** memset(asciiBuffer,0x00,5);
399:UIMgr.c **** itoa(colorMap[i],asciiBuffer,10);
400:UIMgr.c **** UIMgr_txBuffer(asciiBuffer,3);
401:UIMgr.c **** UIMgr_txBuffer(" ",1);
402:UIMgr.c **** if (i==15 || i == 31)
403:UIMgr.c **** {
404:UIMgr.c **** /* break up the output */
405:UIMgr.c **** UIMgr_txBuffer("\r\n",2);
406:UIMgr.c **** }
407:UIMgr.c **** }
408:UIMgr.c **** #endif
409:UIMgr.c **** }
410:UIMgr.c **** }
411:UIMgr.c ****
412:UIMgr.c **** /***********************************************************
413:UIMgr.c **** Function Name: UIMgr_convertTokenToValue
414:UIMgr.c **** Function Description: This function is responsible for
415:UIMgr.c **** converting a received token to a hex value It will
416:UIMgr.c **** access the asciiTokenBuffer directly, and store the
417:UIMgr.c **** result in the appropriate token buffer.
418:UIMgr.c **** Inputs: none
419:UIMgr.c **** Outputs: none
GAS LISTING /tmp/ccs6Vjbf.s page 10
420:UIMgr.c **** ***********************************************************/
421:UIMgr.c **** static void UIMgr_convertTokenToValue(void)
422:UIMgr.c **** {
423:UIMgr.c **** unsigned int newValue;
424:UIMgr.c ****
425:UIMgr.c **** newValue = atoi(asciiTokenBuffer);
426:UIMgr.c **** if (newValue > 255)
427:UIMgr.c **** {
428:UIMgr.c **** /* the value is too large */
429:UIMgr.c **** receivedCmd = invalidCmd;
430:UIMgr.c **** tokenBuffer[tokenCount] = 0xFF; /* to indicate an error */
431:UIMgr.c **** }
432:UIMgr.c **** else
433:UIMgr.c **** {
434:UIMgr.c **** /* copy the value into the tokenBuffer */
435:UIMgr.c **** tokenBuffer[tokenCount] = newValue;
436:UIMgr.c **** }
437:UIMgr.c **** memset(asciiTokenBuffer,0x00,MAX_TOKEN_LENGTH);
438:UIMgr.c **** charIndex = 0;
439:UIMgr.c **** charCount = 0;
440:UIMgr.c **** }
441:UIMgr.c **** /***********************************************************
442:UIMgr.c **** Function Name: UIMgr_convertTokenToCmd
443:UIMgr.c **** Function Description: This function is responsible for
444:UIMgr.c **** parsing a received 2-character command. It will
445:UIMgr.c **** access the asciiTokenBuffer directly.
446:UIMgr.c **** Inputs: none
447:UIMgr.c **** Outputs: none
448:UIMgr.c **** ***********************************************************/
449:UIMgr.c **** static void UIMgr_convertTokenToCmd(void)
450:UIMgr.c **** {
451:UIMgr.c **** if ( (asciiTokenBuffer[0] == 'P') &&
452:UIMgr.c **** (asciiTokenBuffer[1] == 'G') )
453:UIMgr.c **** {
454:UIMgr.c **** /* we got a "ping" command...but we still need to see
455:UIMgr.c **** if we are going to get the \r */
456:UIMgr.c **** receivedCmd = pingCmd;
457:UIMgr.c **** }
458:UIMgr.c **** else if ( (asciiTokenBuffer[0] == 'G') &&
459:UIMgr.c **** (asciiTokenBuffer[1] == 'V') )
460:UIMgr.c **** {
461:UIMgr.c **** /* we got the "get version" command */
462:UIMgr.c **** receivedCmd = getVersionCmd;
463:UIMgr.c **** }
464:UIMgr.c **** else if ( (asciiTokenBuffer[0] == 'D') &&
465:UIMgr.c **** (asciiTokenBuffer[1] == 'F') )
466:UIMgr.c **** {
467:UIMgr.c **** /* we should go into frame dump mode */
468:UIMgr.c **** receivedCmd = dumpFrameCmd;
469:UIMgr.c **** }
470:UIMgr.c **** else if ( (asciiTokenBuffer[0] == 'C') &&
471:UIMgr.c **** (asciiTokenBuffer[1] == 'R') )
472:UIMgr.c **** {
473:UIMgr.c **** /* the user wants to set registers in the OV6620 */
474:UIMgr.c **** receivedCmd = setCameraRegsCmd;
475:UIMgr.c **** }
476:UIMgr.c **** else if ( (asciiTokenBuffer[0] == 'E') &&
GAS LISTING /tmp/ccs6Vjbf.s page 11
477:UIMgr.c **** (asciiTokenBuffer[1] == 'T') )
478:UIMgr.c **** {
479:UIMgr.c **** /* the user wants to enable tracking */
480:UIMgr.c **** receivedCmd = enableTrackingCmd;
481:UIMgr.c **** }
482:UIMgr.c **** else if ( (asciiTokenBuffer[0] == 'S') &&
483:UIMgr.c **** (asciiTokenBuffer[1] == 'M') )
484:UIMgr.c **** {
485:UIMgr.c **** /* the user wants to set the color map */
486:UIMgr.c **** receivedCmd = setColorMapCmd;
487:UIMgr.c **** }
488:UIMgr.c **** else if ( (asciiTokenBuffer[0] == 'D') &&
489:UIMgr.c **** (asciiTokenBuffer[1] == 'T') )
490:UIMgr.c **** {
491:UIMgr.c **** receivedCmd = disableTrackingCmd;
492:UIMgr.c **** }
493:UIMgr.c **** else if ( (asciiTokenBuffer[0] == 'R') &&
494:UIMgr.c **** (asciiTokenBuffer[1] == 'S') )
495:UIMgr.c **** {
496:UIMgr.c **** receivedCmd = resetCameraCmd;
497:UIMgr.c **** }
498:UIMgr.c **** else
499:UIMgr.c **** {
500:UIMgr.c **** /* don't recognize the cmd */
501:UIMgr.c **** receivedCmd = invalidCmd;
502:UIMgr.c **** }
503:UIMgr.c **** memset(asciiTokenBuffer,0x00,MAX_TOKEN_LENGTH);
504:UIMgr.c **** charIndex = 0;
505:UIMgr.c **** charCount = 0;
506:UIMgr.c **** }
507:UIMgr.c **** /***********************************************************
508:UIMgr.c **** Function Name: UIMgr_sendAck
509:UIMgr.c **** Function Description: This function is responsible for
510:UIMgr.c **** queuing up an ACK to be sent to the user.
511:UIMgr.c **** Inputs: none
512:UIMgr.c **** Outputs: none
513:UIMgr.c **** ***********************************************************/
514:UIMgr.c **** static void UIMgr_sendAck(void)
515:UIMgr.c **** {
516:UIMgr.c **** UIMgr_writeTxFifo('A');
517:UIMgr.c **** UIMgr_writeTxFifo('C');
518:UIMgr.c **** UIMgr_writeTxFifo('K');
519:UIMgr.c **** UIMgr_writeTxFifo('\r');
520:UIMgr.c **** }
521:UIMgr.c ****
522:UIMgr.c **** /***********************************************************
523:UIMgr.c **** Function Name: UIMgr_sendNck
524:UIMgr.c **** Function Description: This function is responsible for
525:UIMgr.c **** queueing up an NCK to be sent to the user.
526:UIMgr.c **** Inputs: none
527:UIMgr.c **** Outputs: none
528:UIMgr.c **** ***********************************************************/
529:UIMgr.c **** static void UIMgr_sendNck(void)
530:UIMgr.c **** {
531:UIMgr.c **** UIMgr_writeTxFifo('N');
532:UIMgr.c **** UIMgr_writeTxFifo('C');
533:UIMgr.c **** UIMgr_writeTxFifo('K');
GAS LISTING /tmp/ccs6Vjbf.s page 12
534:UIMgr.c **** UIMgr_writeTxFifo('\r');
535:UIMgr.c **** }
536:UIMgr.c ****
537:UIMgr.c ****
538:UIMgr.c **** /***********************************************************
539:UIMgr.c **** Function Name: UIMgr_writeBufferToTxFifo
540:UIMgr.c **** Function Description: This function is responsible for
541:UIMgr.c **** placing "length" bytes into the tx FIFO.
542:UIMgr.c **** Inputs: pData - a pointer to the data to send
543:UIMgr.c **** length - the number of bytes to send
544:UIMgr.c **** Outputs: none
545:UIMgr.c **** ***********************************************************/
546:UIMgr.c **** void UIMgr_writeBufferToTxFifo(unsigned char *pData, unsigned char length)
547:UIMgr.c **** {
95 .stabn 68,0,547,.LM0-.LFBB1
96 .LM0:
97 .LFBB1:
98 /* prologue: frame size=0 */
99 /* prologue end (size=0) */
100 0000 DC01 movw r26,r24
548:UIMgr.c **** unsigned char tmpHead;
549:UIMgr.c **** if (length == 0)
101 .stabn 68,0,549,.LM1-.LFBB1
102 .LM1:
103 0002 6623 tst r22
104 0004 01F0 breq .L8
550:UIMgr.c **** {
551:UIMgr.c **** return;
552:UIMgr.c **** }
553:UIMgr.c ****
554:UIMgr.c **** DISABLE_INTS();
105 .stabn 68,0,554,.LM2-.LFBB1
106 .LM2:
107 /* #APP */
108 0006 F894 cli
555:UIMgr.c **** while(length-- != 0)
109 .stabn 68,0,555,.LM3-.LFBB1
110 .LM3:
111 /* #NOAPP */
112 0008 6150 subi r22,lo8(-(-1))
113 000a 6F3F cpi r22,lo8(-1)
114 000c 01F0 breq .L4
115 000e 9091 0000 lds r25,UIMgr_txFifoHead
556:UIMgr.c **** {
557:UIMgr.c **** UIMgr_txFifo[UIMgr_txFifoHead] = *pData++;
116 .stabn 68,0,557,.LM4-.LFBB1
117 .LM4:
118 0012 20E0 ldi r18,lo8(UIMgr_txFifo)
119 0014 30E0 ldi r19,hi8(UIMgr_txFifo)
120 .L6:
121 0016 F901 movw r30,r18
122 0018 E90F add r30,r25
123 001a F11D adc r31,__zero_reg__
124 001c 8D91 ld r24,X+
125 001e 8083 st Z,r24
558:UIMgr.c ****
559:UIMgr.c **** /* now move the head up */
GAS LISTING /tmp/ccs6Vjbf.s page 13
560:UIMgr.c **** tmpHead = (UIMgr_txFifoHead + 1) & (UI_MGR_TX_FIFO_MASK);
126 .stabn 68,0,560,.LM5-.LFBB1
127 .LM5:
128 0020 892F mov r24,r25
129 0022 8F5F subi r24,lo8(-(1))
130 0024 982F mov r25,r24
131 0026 9F73 andi r25,lo8(63)
132 .stabn 68,0,555,.LM6-.LFBB1
133 .LM6:
134 0028 6150 subi r22,1
135 002a 00F4 brcc .L6
136 002c 9093 0000 sts UIMgr_txFifoHead,r25
137 .L4:
561:UIMgr.c **** UIMgr_txFifoHead = tmpHead;
562:UIMgr.c **** }
563:UIMgr.c **** ENABLE_INTS();
138 .stabn 68,0,563,.LM7-.LFBB1
139 .LM7:
140 /* #APP */
141 0030 7894 sei
142 /* #NOAPP */
143 .L8:
144 0032 0895 ret
145 /* epilogue: frame size=0 */
146 /* epilogue: noreturn */
147 /* epilogue end (size=0) */
148 /* function UIMgr_writeBufferToTxFifo size 29 (29) */
149 .size UIMgr_writeBufferToTxFifo, .-UIMgr_writeBufferToTxFifo
150 .stabs "tmpHead:r(0,11)",64,0,548,25
151 .stabn 192,0,0,.LFBB1-.LFBB1
152 .stabn 224,0,0,.Lscope1-.LFBB1
153 .Lscope1:
154 .stabs "",36,0,0,.Lscope1-.LFBB1
155 .stabd 78,0,0
156 .stabs "UIMgr_readTxFifo:f(0,11)",36,0,630,UIMgr_readTxFifo
157 .type UIMgr_readTxFifo, @function
158 UIMgr_readTxFifo:
159 .stabd 46,0,0
564:UIMgr.c **** }
565:UIMgr.c ****
566:UIMgr.c **** /***********************************************************
567:UIMgr.c **** Function Name: UIMgr_txBuffer
568:UIMgr.c **** Function Description: This function is responsible for
569:UIMgr.c **** sending 'length' bytes out using the UartInterface
570:UIMgr.c **** module.
571:UIMgr.c **** Inputs: pData - a pointer to the data to send
572:UIMgr.c **** length - the number of bytes to send
573:UIMgr.c **** Outputs: none
574:UIMgr.c **** ***********************************************************/
575:UIMgr.c **** void UIMgr_txBuffer(unsigned char *pData, unsigned char length)
576:UIMgr.c **** {
577:UIMgr.c **** while(length-- != 0)
578:UIMgr.c **** {
579:UIMgr.c **** UartInt_txByte(*pData++);
580:UIMgr.c **** }
581:UIMgr.c **** }
582:UIMgr.c ****
GAS LISTING /tmp/ccs6Vjbf.s page 14
583:UIMgr.c **** /***********************************************************
584:UIMgr.c **** Function Name: UIMgr_flushTxBuffer
585:UIMgr.c **** Function Description: This function is responsible for
586:UIMgr.c **** sending all data currently in the serial tx buffer
587:UIMgr.c **** to the user.
588:UIMgr.c **** Inputs: none
589:UIMgr.c **** Outputs: none
590:UIMgr.c **** ***********************************************************/
591:UIMgr.c **** void UIMgr_flushTxBuffer(void)
592:UIMgr.c **** {
593:UIMgr.c **** while(IS_DATA_IN_TX_FIFO() == TRUE)
594:UIMgr.c **** {
595:UIMgr.c **** UartInt_txByte(UIMgr_readTxFifo() );
596:UIMgr.c **** }
597:UIMgr.c **** }
598:UIMgr.c ****
599:UIMgr.c **** /***********************************************************
600:UIMgr.c **** Function Name: UIMgr_readRxFifo
601:UIMgr.c **** Function Description: This function is responsible for
602:UIMgr.c **** reading a single byte of data from the rx fifo, and
603:UIMgr.c **** updating the appropriate pointers.
604:UIMgr.c **** Inputs: none
605:UIMgr.c **** Outputs: unsigned char-the data read
606:UIMgr.c **** ***********************************************************/
607:UIMgr.c **** static unsigned char UIMgr_readRxFifo(void)
608:UIMgr.c **** {
609:UIMgr.c **** unsigned char dataByte, tmpTail;
610:UIMgr.c ****
611:UIMgr.c **** /* just return the current tail from the rx fifo */
612:UIMgr.c **** DISABLE_INTS();
613:UIMgr.c **** dataByte = UIMgr_rxFifo[UIMgr_rxFifoTail];
614:UIMgr.c **** tmpTail = (UIMgr_rxFifoTail+1) & (UI_MGR_RX_FIFO_MASK);
615:UIMgr.c **** UIMgr_rxFifoTail = tmpTail;
616:UIMgr.c **** ENABLE_INTS();
617:UIMgr.c ****
618:UIMgr.c **** return(dataByte);
619:UIMgr.c **** }
620:UIMgr.c ****
621:UIMgr.c **** /***********************************************************
622:UIMgr.c **** Function Name: UIMgr_readTxFifo
623:UIMgr.c **** Function Description: This function is responsible for
624:UIMgr.c **** reading a single byte of data from the tx fifo, and
625:UIMgr.c **** updating the appropriate pointers.
626:UIMgr.c **** Inputs: none
627:UIMgr.c **** Outputs: unsigned char-the data read
628:UIMgr.c **** ***********************************************************/
629:UIMgr.c **** static unsigned char UIMgr_readTxFifo(void)
630:UIMgr.c **** {
160 .stabn 68,0,630,.LM8-.LFBB2
161 .LM8:
162 .LFBB2:
163 /* prologue: frame size=0 */
164 /* prologue end (size=0) */
631:UIMgr.c **** unsigned char dataByte, tmpTail;
632:UIMgr.c ****
633:UIMgr.c **** /* just return the current tail from the tx fifo */
634:UIMgr.c **** DISABLE_INTS();
GAS LISTING /tmp/ccs6Vjbf.s page 15
165 .stabn 68,0,634,.LM9-.LFBB2
166 .LM9:
167 /* #APP */
168 0034 F894 cli
635:UIMgr.c **** dataByte = UIMgr_txFifo[UIMgr_txFifoTail];
169 .stabn 68,0,635,.LM10-.LFBB2
170 .LM10:
171 /* #NOAPP */
172 0036 9091 0000 lds r25,UIMgr_txFifoTail
173 003a E0E0 ldi r30,lo8(UIMgr_txFifo)
174 003c F0E0 ldi r31,hi8(UIMgr_txFifo)
175 003e E90F add r30,r25
176 0040 F11D adc r31,__zero_reg__
177 0042 8081 ld r24,Z
636:UIMgr.c **** tmpTail = (UIMgr_txFifoTail+1) & (UI_MGR_TX_FIFO_MASK);
637:UIMgr.c **** UIMgr_txFifoTail = tmpTail;
178 .stabn 68,0,637,.LM11-.LFBB2
179 .LM11:
180 0044 9F5F subi r25,lo8(-(1))
181 0046 9F73 andi r25,lo8(63)
182 0048 9093 0000 sts UIMgr_txFifoTail,r25
638:UIMgr.c **** ENABLE_INTS();
183 .stabn 68,0,638,.LM12-.LFBB2
184 .LM12:
185 /* #APP */
186 004c 7894 sei
639:UIMgr.c ****
640:UIMgr.c **** return(dataByte);
641:UIMgr.c **** }
187 .stabn 68,0,641,.LM13-.LFBB2
188 .LM13:
189 /* #NOAPP */
190 004e 9927 clr r25
191 /* epilogue: frame size=0 */
192 0050 0895 ret
193 /* epilogue end (size=1) */
194 /* function UIMgr_readTxFifo size 17 (16) */
195 .size UIMgr_readTxFifo, .-UIMgr_readTxFifo
196 .stabs "dataByte:r(0,11)",64,0,631,24
197 .stabn 192,0,0,.LFBB2-.LFBB2
198 .stabn 224,0,0,.Lscope2-.LFBB2
199 .Lscope2:
200 .stabs "",36,0,0,.Lscope2-.LFBB2
201 .stabd 78,0,0
202 .stabs "UIMgr_writeTxFifo:F(0,15)",36,0,652,UIMgr_writeTxFifo
203 .stabs "data:P(0,11)",64,0,651,24
204 .global UIMgr_writeTxFifo
205 .type UIMgr_writeTxFifo, @function
206 UIMgr_writeTxFifo:
207 .stabd 46,0,0
642:UIMgr.c ****
643:UIMgr.c **** /***********************************************************
644:UIMgr.c **** Function Name: UIMgr_writeTxFifo
645:UIMgr.c **** Function Description: This function is responsible for
646:UIMgr.c **** writing a single byte to the TxFifo and
647:UIMgr.c **** updating the appropriate pointers.
648:UIMgr.c **** Inputs: data - the byte to write to the Fifo
GAS LISTING /tmp/ccs6Vjbf.s page 16
649:UIMgr.c **** Outputs: none
650:UIMgr.c **** ***********************************************************/
651:UIMgr.c **** void UIMgr_writeTxFifo(unsigned char data)
652:UIMgr.c **** {
208 .stabn 68,0,652,.LM14-.LFBB3
209 .LM14:
210 .LFBB3:
211 /* prologue: frame size=0 */
212 /* prologue end (size=0) */
653:UIMgr.c **** unsigned char tmpHead;
654:UIMgr.c ****
655:UIMgr.c **** DISABLE_INTS();
213 .stabn 68,0,655,.LM15-.LFBB3
214 .LM15:
215 /* #APP */
216 0052 F894 cli
656:UIMgr.c **** UIMgr_txFifo[UIMgr_txFifoHead] = data;
217 .stabn 68,0,656,.LM16-.LFBB3
218 .LM16:
219 /* #NOAPP */
220 0054 9091 0000 lds r25,UIMgr_txFifoHead
221 0058 E0E0 ldi r30,lo8(UIMgr_txFifo)
222 005a F0E0 ldi r31,hi8(UIMgr_txFifo)
223 005c E90F add r30,r25
224 005e F11D adc r31,__zero_reg__
225 0060 8083 st Z,r24
657:UIMgr.c ****
658:UIMgr.c **** /* now move the head up */
659:UIMgr.c **** tmpHead = (UIMgr_txFifoHead + 1) & (UI_MGR_TX_FIFO_MASK);
660:UIMgr.c **** UIMgr_txFifoHead = tmpHead;
226 .stabn 68,0,660,.LM17-.LFBB3
227 .LM17:
228 0062 9F5F subi r25,lo8(-(1))
229 0064 9F73 andi r25,lo8(63)
230 0066 9093 0000 sts UIMgr_txFifoHead,r25
661:UIMgr.c **** ENABLE_INTS();
231 .stabn 68,0,661,.LM18-.LFBB3
232 .LM18:
233 /* #APP */
234 006a 7894 sei
235 /* #NOAPP */
236 /* epilogue: frame size=0 */
237 006c 0895 ret
238 /* epilogue end (size=1) */
239 /* function UIMgr_writeTxFifo size 16 (15) */
240 .size UIMgr_writeTxFifo, .-UIMgr_writeTxFifo
241 .Lscope3:
242 .stabs "",36,0,0,.Lscope3-.LFBB3
243 .stabd 78,0,0
244 .stabs "UIMgr_flushTxBuffer:F(0,15)",36,0,592,UIMgr_flushTxBuffer
245 .global UIMgr_flushTxBuffer
246 .type UIMgr_flushTxBuffer, @function
247 UIMgr_flushTxBuffer:
248 .stabd 46,0,0
249 .stabn 68,0,592,.LM19-.LFBB4
250 .LM19:
251 .LFBB4:
GAS LISTING /tmp/ccs6Vjbf.s page 17
252 /* prologue: frame size=0 */
253 /* prologue end (size=0) */
254 .stabn 68,0,593,.LM20-.LFBB4
255 .LM20:
256 006e 9091 0000 lds r25,UIMgr_txFifoHead
257 0072 8091 0000 lds r24,UIMgr_txFifoTail
258 0076 9817 cp r25,r24
259 0078 01F0 breq .L18
260 .L19:
261 .stabn 68,0,595,.LM21-.LFBB4
262 .LM21:
263 007a 00D0 rcall UIMgr_readTxFifo
264 007c 00D0 rcall UartInt_txByte
265 .stabn 68,0,593,.LM22-.LFBB4
266 .LM22:
267 007e 9091 0000 lds r25,UIMgr_txFifoHead
268 0082 8091 0000 lds r24,UIMgr_txFifoTail
269 0086 9817 cp r25,r24
270 0088 01F4 brne .L19
271 .L18:
272 008a 0895 ret
273 /* epilogue: frame size=0 */
274 /* epilogue: noreturn */
275 /* epilogue end (size=0) */
276 /* function UIMgr_flushTxBuffer size 15 (15) */
277 .size UIMgr_flushTxBuffer, .-UIMgr_flushTxBuffer
278 .Lscope4:
279 .stabs "",36,0,0,.Lscope4-.LFBB4
280 .stabd 78,0,0
281 .stabs "UIMgr_txBuffer:F(0,15)",36,0,576,UIMgr_txBuffer
282 .stabs "pData:P(0,20)",64,0,575,28
283 .stabs "length:P(0,11)",64,0,575,22
284 .global UIMgr_txBuffer
285 .type UIMgr_txBuffer, @function
286 UIMgr_txBuffer:
287 .stabd 46,0,0
288 .stabn 68,0,576,.LM23-.LFBB5
289 .LM23:
290 .LFBB5:
291 /* prologue: frame size=0 */
292 008c 1F93 push r17
293 008e CF93 push r28
294 0090 DF93 push r29
295 /* prologue end (size=3) */
296 0092 EC01 movw r28,r24
297 .stabn 68,0,577,.LM24-.LFBB5
298 .LM24:
299 0094 162F mov r17,r22
300 0096 1150 subi r17,lo8(-(-1))
301 0098 1F3F cpi r17,lo8(-1)
302 009a 01F0 breq .L24
303 .L25:
304 .stabn 68,0,579,.LM25-.LFBB5
305 .LM25:
306 009c 8991 ld r24,Y+
307 009e 00D0 rcall UartInt_txByte
308 .stabn 68,0,577,.LM26-.LFBB5
GAS LISTING /tmp/ccs6Vjbf.s page 18
309 .LM26:
310 00a0 1150 subi r17,1
311 00a2 00F4 brcc .L25
312 .L24:
313 /* epilogue: frame size=0 */
314 00a4 DF91 pop r29
315 00a6 CF91 pop r28
316 00a8 1F91 pop r17
317 00aa 0895 ret
318 /* epilogue end (size=4) */
319 /* function UIMgr_txBuffer size 17 (10) */
320 .size UIMgr_txBuffer, .-UIMgr_txBuffer
321 .Lscope5:
322 .stabs "",36,0,0,.Lscope5-.LFBB5
323 .stabd 78,0,0
324 .stabs "UIMgr_transmitPendingData:F(0,15)",36,0,178,UIMgr_transmitPendingData
325 .global UIMgr_transmitPendingData
326 .type UIMgr_transmitPendingData, @function
327 UIMgr_transmitPendingData:
328 .stabd 46,0,0
329 .stabn 68,0,178,.LM27-.LFBB6
330 .LM27:
331 .LFBB6:
332 /* prologue: frame size=0 */
333 /* prologue end (size=0) */
334 .stabn 68,0,179,.LM28-.LFBB6
335 .LM28:
336 00ac 9091 0000 lds r25,UIMgr_txFifoHead
337 00b0 8091 0000 lds r24,UIMgr_txFifoTail
338 00b4 9817 cp r25,r24
339 00b6 01F0 breq .L30
340 .stabn 68,0,182,.LM29-.LFBB6
341 .LM29:
342 00b8 00D0 rcall UIMgr_readTxFifo
343 00ba 00D0 rcall UartInt_txByte
344 .L30:
345 00bc 0895 ret
346 /* epilogue: frame size=0 */
347 /* epilogue: noreturn */
348 /* epilogue end (size=0) */
349 /* function UIMgr_transmitPendingData size 9 (9) */
350 .size UIMgr_transmitPendingData, .-UIMgr_transmitPendingData
351 .Lscope6:
352 .stabs "",36,0,0,.Lscope6-.LFBB6
353 .stabd 78,0,0
354 .stabs "UIMgr_convertTokenToCmd:f(0,15)",36,0,450,UIMgr_convertTokenToCmd
355 .type UIMgr_convertTokenToCmd, @function
356 UIMgr_convertTokenToCmd:
357 .stabd 46,0,0
358 .stabn 68,0,450,.LM30-.LFBB7
359 .LM30:
360 .LFBB7:
361 /* prologue: frame size=0 */
362 /* prologue end (size=0) */
363 .stabn 68,0,451,.LM31-.LFBB7
364 .LM31:
365 00be 9091 0000 lds r25,asciiTokenBuffer
GAS LISTING /tmp/ccs6Vjbf.s page 19
366 00c2 9035 cpi r25,lo8(80)
367 00c4 01F4 brne .L32
368 .stabn 68,0,451,.LM32-.LFBB7
369 .LM32:
370 00c6 8091 0000 lds r24,asciiTokenBuffer+1
371 00ca 8734 cpi r24,lo8(71)
372 00cc 01F4 brne .L34
373 .stabn 68,0,456,.LM33-.LFBB7
374 .LM33:
375 00ce 81E0 ldi r24,lo8(1)
376 00d0 8093 0000 sts receivedCmd,r24
377 00d4 00C0 rjmp .L36
378 .L32:
379 .stabn 68,0,458,.LM34-.LFBB7
380 .LM34:
381 00d6 9734 cpi r25,lo8(71)
382 00d8 01F4 brne .L37
383 00da 8091 0000 lds r24,asciiTokenBuffer+1
384 00de 8635 cpi r24,lo8(86)
385 00e0 01F4 brne .L39
386 .stabn 68,0,462,.LM35-.LFBB7
387 .LM35:
388 00e2 1092 0000 sts receivedCmd,__zero_reg__
389 00e6 00C0 rjmp .L36
390 .L37:
391 .stabn 68,0,464,.LM36-.LFBB7
392 .LM36:
393 00e8 9434 cpi r25,lo8(68)
394 00ea 01F4 brne .L41
395 00ec 8091 0000 lds r24,asciiTokenBuffer+1
396 00f0 8634 cpi r24,lo8(70)
397 00f2 01F4 brne .L43
398 .stabn 68,0,468,.LM37-.LFBB7
399 .LM37:
400 00f4 83E0 ldi r24,lo8(3)
401 00f6 8093 0000 sts receivedCmd,r24
402 00fa 00C0 rjmp .L36
403 .L41:
404 .stabn 68,0,470,.LM38-.LFBB7
405 .LM38:
406 00fc 9334 cpi r25,lo8(67)
407 00fe 01F4 brne .L34
408 0100 8091 0000 lds r24,asciiTokenBuffer+1
409 0104 8235 cpi r24,lo8(82)
410 0106 01F4 brne .L46
411 .stabn 68,0,474,.LM39-.LFBB7
412 .LM39:
413 0108 82E0 ldi r24,lo8(2)
414 010a 8093 0000 sts receivedCmd,r24
415 010e 00C0 rjmp .L36
416 .L34:
417 .stabn 68,0,476,.LM40-.LFBB7
418 .LM40:
419 0110 9534 cpi r25,lo8(69)
420 0112 01F4 brne .L39
421 0114 8091 0000 lds r24,asciiTokenBuffer+1
422 0118 8435 cpi r24,lo8(84)
GAS LISTING /tmp/ccs6Vjbf.s page 20
423 011a 01F4 brne .L49
424 .stabn 68,0,480,.LM41-.LFBB7
425 .LM41:
426 011c 84E0 ldi r24,lo8(4)
427 011e 8093 0000 sts receivedCmd,r24
428 0122 00C0 rjmp .L36
429 .L39:
430 .stabn 68,0,482,.LM42-.LFBB7
431 .LM42:
432 0124 9335 cpi r25,lo8(83)
433 0126 01F4 brne .L43
434 0128 8091 0000 lds r24,asciiTokenBuffer+1
435 012c 8D34 cpi r24,lo8(77)
436 012e 01F4 brne .L49
437 .stabn 68,0,486,.LM43-.LFBB7
438 .LM43:
439 0130 86E0 ldi r24,lo8(6)
440 0132 8093 0000 sts receivedCmd,r24
441 0136 00C0 rjmp .L36
442 .L43:
443 .stabn 68,0,488,.LM44-.LFBB7
444 .LM44:
445 0138 9434 cpi r25,lo8(68)
446 013a 01F4 brne .L46
447 013c 8091 0000 lds r24,asciiTokenBuffer+1
448 0140 8435 cpi r24,lo8(84)
449 0142 01F4 brne .L49
450 .stabn 68,0,491,.LM45-.LFBB7
451 .LM45:
452 0144 85E0 ldi r24,lo8(5)
453 0146 8093 0000 sts receivedCmd,r24
454 014a 00C0 rjmp .L36
455 .L46:
456 .stabn 68,0,493,.LM46-.LFBB7
457 .LM46:
458 014c 9235 cpi r25,lo8(82)
459 014e 01F4 brne .L49
460 0150 8091 0000 lds r24,asciiTokenBuffer+1
461 0154 8335 cpi r24,lo8(83)
462 0156 01F4 brne .L49
463 .stabn 68,0,496,.LM47-.LFBB7
464 .LM47:
465 0158 87E0 ldi r24,lo8(7)
466 015a 8093 0000 sts receivedCmd,r24
467 015e 00C0 rjmp .L36
468 .L49:
469 .stabn 68,0,501,.LM48-.LFBB7
470 .LM48:
471 0160 89E0 ldi r24,lo8(9)
472 0162 8093 0000 sts receivedCmd,r24
473 .L36:
474 .stabn 68,0,503,.LM49-.LFBB7
475 .LM49:
476 0166 83E0 ldi r24,lo8(3)
477 0168 E0E0 ldi r30,lo8(asciiTokenBuffer)
478 016a F0E0 ldi r31,hi8(asciiTokenBuffer)
479 016c 1192 st Z+,__zero_reg__
GAS LISTING /tmp/ccs6Vjbf.s page 21
480 016e 8A95 dec r24
481 0170 01F4 brne .-6
482 .stabn 68,0,504,.LM50-.LFBB7
483 .LM50:
484 0172 1092 0000 sts charIndex,__zero_reg__
485 .stabn 68,0,505,.LM51-.LFBB7
486 .LM51:
487 0176 1092 0000 sts charCount,__zero_reg__
488 /* epilogue: frame size=0 */
489 017a 0895 ret
490 /* epilogue end (size=1) */
491 /* function UIMgr_convertTokenToCmd size 95 (94) */
492 .size UIMgr_convertTokenToCmd, .-UIMgr_convertTokenToCmd
493 .Lscope7:
494 .stabs "",36,0,0,.Lscope7-.LFBB7
495 .stabd 78,0,0
496 .stabs "UIMgr_init:F(0,15)",36,0,137,UIMgr_init
497 .global UIMgr_init
498 .type UIMgr_init, @function
499 UIMgr_init:
500 .stabd 46,0,0
501 .stabn 68,0,137,.LM52-.LFBB8
502 .LM52:
503 .LFBB8:
504 /* prologue: frame size=0 */
505 /* prologue end (size=0) */
506 .stabn 68,0,138,.LM53-.LFBB8
507 .LM53:
508 017c 1092 0000 sts asciiTokenBuffer,__zero_reg__
509 0180 1092 0000 sts (asciiTokenBuffer)+1,__zero_reg__
510 0184 1092 0000 sts (asciiTokenBuffer)+2,__zero_reg__
511 0188 1092 0000 sts (asciiTokenBuffer)+3,__zero_reg__
512 .stabn 68,0,139,.LM54-.LFBB8
513 .LM54:
514 018c 80E4 ldi r24,lo8(64)
515 018e E0E0 ldi r30,lo8(tokenBuffer)
516 0190 F0E0 ldi r31,hi8(tokenBuffer)
517 0192 982F mov r25,r24
518 0194 1192 st Z+,__zero_reg__
519 0196 9A95 dec r25
520 0198 01F4 brne .-6
521 .stabn 68,0,140,.LM55-.LFBB8
522 .LM55:
523 019a E0E0 ldi r30,lo8(UIMgr_txFifo)
524 019c F0E0 ldi r31,hi8(UIMgr_txFifo)
525 019e 1192 st Z+,__zero_reg__
526 01a0 8A95 dec r24
527 01a2 01F4 brne .-6
528 .stabn 68,0,141,.LM56-.LFBB8
529 .LM56:
530 01a4 80E2 ldi r24,lo8(32)
531 01a6 E0E0 ldi r30,lo8(UIMgr_rxFifo)
532 01a8 F0E0 ldi r31,hi8(UIMgr_rxFifo)
533 01aa 1192 st Z+,__zero_reg__
534 01ac 8A95 dec r24
535 01ae 01F4 brne .-6
536 /* epilogue: frame size=0 */
GAS LISTING /tmp/ccs6Vjbf.s page 22
537 01b0 0895 ret
538 /* epilogue end (size=1) */
539 /* function UIMgr_init size 27 (26) */
540 .size UIMgr_init, .-UIMgr_init
541 .Lscope8:
542 .stabs "",36,0,0,.Lscope8-.LFBB8
543 .stabd 78,0,0
544 .stabs "UIMgr_convertTokenToValue:f(0,15)",36,0,422,UIMgr_convertTokenToValue
545 .type UIMgr_convertTokenToValue, @function
546 UIMgr_convertTokenToValue:
547 .stabd 46,0,0
548 .stabn 68,0,422,.LM57-.LFBB9
549 .LM57:
550 .LFBB9:
551 /* prologue: frame size=0 */
552 /* prologue end (size=0) */
553 .stabn 68,0,425,.LM58-.LFBB9
554 .LM58:
555 01b2 80E0 ldi r24,lo8(asciiTokenBuffer)
556 01b4 90E0 ldi r25,hi8(asciiTokenBuffer)
557 01b6 00D0 rcall atoi
558 01b8 9C01 movw r18,r24
559 .stabn 68,0,426,.LM59-.LFBB9
560 .LM59:
561 01ba 8F3F cpi r24,255
562 01bc 9105 cpc r25,__zero_reg__
563 01be 01F0 breq .L61
564 01c0 00F0 brlo .L61
565 .stabn 68,0,429,.LM60-.LFBB9
566 .LM60:
567 01c2 89E0 ldi r24,lo8(9)
568 01c4 8093 0000 sts receivedCmd,r24
569 .stabn 68,0,430,.LM61-.LFBB9
570 .LM61:
571 01c8 8091 0000 lds r24,tokenCount
572 01cc E0E0 ldi r30,lo8(tokenBuffer)
573 01ce F0E0 ldi r31,hi8(tokenBuffer)
574 01d0 E80F add r30,r24
575 01d2 F11D adc r31,__zero_reg__
576 01d4 8FEF ldi r24,lo8(-1)
577 01d6 8083 st Z,r24
578 01d8 00C0 rjmp .L63
579 .L61:
580 .stabn 68,0,435,.LM62-.LFBB9
581 .LM62:
582 01da 8091 0000 lds r24,tokenCount
583 01de E0E0 ldi r30,lo8(tokenBuffer)
584 01e0 F0E0 ldi r31,hi8(tokenBuffer)
585 01e2 E80F add r30,r24
586 01e4 F11D adc r31,__zero_reg__
587 01e6 2083 st Z,r18
588 .L63:
589 .stabn 68,0,437,.LM63-.LFBB9
590 .LM63:
591 01e8 83E0 ldi r24,lo8(3)
592 01ea E0E0 ldi r30,lo8(asciiTokenBuffer)
593 01ec F0E0 ldi r31,hi8(asciiTokenBuffer)
GAS LISTING /tmp/ccs6Vjbf.s page 23
594 01ee 1192 st Z+,__zero_reg__
595 01f0 8A95 dec r24
596 01f2 01F4 brne .-6
597 .stabn 68,0,438,.LM64-.LFBB9
598 .LM64:
599 01f4 1092 0000 sts charIndex,__zero_reg__
600 .stabn 68,0,439,.LM65-.LFBB9
601 .LM65:
602 01f8 1092 0000 sts charCount,__zero_reg__
603 /* epilogue: frame size=0 */
604 01fc 0895 ret
605 /* epilogue end (size=1) */
606 /* function UIMgr_convertTokenToValue size 38 (37) */
607 .size UIMgr_convertTokenToValue, .-UIMgr_convertTokenToValue
608 .stabs "newValue:r(0,4)",64,0,423,18
609 .stabn 192,0,0,.LFBB9-.LFBB9
610 .stabn 224,0,0,.Lscope9-.LFBB9
611 .Lscope9:
612 .stabs "",36,0,0,.Lscope9-.LFBB9
613 .stabd 78,0,0
614 .stabs "UIMgr_processReceivedData:F(0,15)",36,0,193,UIMgr_processReceivedData
615 .global UIMgr_processReceivedData
616 .type UIMgr_processReceivedData, @function
617 UIMgr_processReceivedData:
618 .stabd 46,0,0
619 .stabn 68,0,193,.LM66-.LFBB10
620 .LM66:
621 .LFBB10:
622 /* prologue: frame size=0 */
623 01fe 6F92 push r6
624 0200 7F92 push r7
625 0202 8F92 push r8
626 0204 9F92 push r9
627 0206 AF92 push r10
628 0208 BF92 push r11
629 020a CF92 push r12
630 020c DF92 push r13
631 020e EF92 push r14
632 0210 FF92 push r15
633 0212 1F93 push r17
634 0214 CF93 push r28
635 0216 DF93 push r29
636 /* prologue end (size=13) */
637 .LBB22:
638 .LBB23:
639 .stabn 68,0,613,.LM67-.LFBB10
640 .LM67:
641 0218 0F2E mov __tmp_reg__,r31
642 021a F0E0 ldi r31,lo8(UIMgr_rxFifo)
643 021c CF2E mov r12,r31
644 021e F0E0 ldi r31,hi8(UIMgr_rxFifo)
645 0220 DF2E mov r13,r31
646 0222 F02D mov r31,__tmp_reg__
647 .LBE23:
648 .LBE22:
649 .stabn 68,0,276,.LM68-.LFBB10
650 .LM68:
GAS LISTING /tmp/ccs6Vjbf.s page 24
651 0224 0F2E mov __tmp_reg__,r31
652 0226 F0E0 ldi r31,lo8(asciiTokenBuffer)
653 0228 AF2E mov r10,r31
654 022a F0E0 ldi r31,hi8(asciiTokenBuffer)
655 022c BF2E mov r11,r31
656 022e F02D mov r31,__tmp_reg__
657 .stabn 68,0,236,.LM69-.LFBB10
658 .LM69:
659 0230 0F2E mov __tmp_reg__,r31
660 0232 F0E0 ldi r31,lo8(tokenBuffer)
661 0234 EF2E mov r14,r31
662 0236 F0E0 ldi r31,hi8(tokenBuffer)
663 0238 FF2E mov r15,r31
664 023a F02D mov r31,__tmp_reg__
665 .LBB25:
666 .LBB26:
667 .stabn 68,0,369,.LM70-.LFBB10
668 .LM70:
669 023c 0F2E mov __tmp_reg__,r31
670 023e F0E0 ldi r31,lo8(colorMap)
671 0240 8F2E mov r8,r31
672 0242 F0E0 ldi r31,hi8(colorMap)
673 0244 9F2E mov r9,r31
674 0246 F02D mov r31,__tmp_reg__
675 .stabn 68,0,322,.LM71-.LFBB10
676 .LM71:
677 0248 0F2E mov __tmp_reg__,r31
678 024a F0E0 ldi r31,lo8(AVRcamVersion)
679 024c 6F2E mov r6,r31
680 024e F0E0 ldi r31,hi8(AVRcamVersion)
681 0250 7F2E mov r7,r31
682 0252 F02D mov r31,__tmp_reg__
683 0254 00C0 rjmp .L119
684 .L67:
685 .LBE26:
686 .LBE25:
687 .LBB42:
688 .LBB24:
689 .stabn 68,0,612,.LM72-.LFBB10
690 .LM72:
691 /* #APP */
692 0256 F894 cli
693 .stabn 68,0,613,.LM73-.LFBB10
694 .LM73:
695 /* #NOAPP */
696 0258 F601 movw r30,r12
697 025a E90F add r30,r25
698 025c F11D adc r31,__zero_reg__
699 025e 2081 ld r18,Z
700 .stabn 68,0,615,.LM74-.LFBB10
701 .LM74:
702 0260 892F mov r24,r25
703 0262 8F5F subi r24,lo8(-(1))
704 0264 8F71 andi r24,lo8(31)
705 0266 8093 0000 sts UIMgr_rxFifoTail,r24
706 .stabn 68,0,616,.LM75-.LFBB10
707 .LM75:
GAS LISTING /tmp/ccs6Vjbf.s page 25
708 /* #APP */
709 026a 7894 sei
710 /* #NOAPP */
711 .LBE24:
712 .LBE42:
713 .stabn 68,0,202,.LM76-.LFBB10
714 .LM76:
715 026c 2D30 cpi r18,lo8(13)
716 026e 01F0 breq .+2
717 0270 00C0 rjmp .L68
718 .stabn 68,0,205,.LM77-.LFBB10
719 .LM77:
720 0272 8091 0000 lds r24,tokenCount
721 0276 8823 tst r24
722 0278 01F4 brne .L70
723 .stabn 68,0,208,.LM78-.LFBB10
724 .LM78:
725 027a 00D0 rcall UIMgr_convertTokenToCmd
726 027c 00C0 rjmp .L72
727 .L70:
728 .stabn 68,0,213,.LM79-.LFBB10
729 .LM79:
730 027e 00D0 rcall UIMgr_convertTokenToValue
731 .stabn 68,0,214,.LM80-.LFBB10
732 .LM80:
733 0280 8091 0000 lds r24,tokenCount
734 0284 8F5F subi r24,lo8(-(1))
735 0286 8093 0000 sts tokenCount,r24
736 .L72:
737 .stabn 68,0,218,.LM81-.LFBB10
738 .LM81:
739 028a 84E6 ldi r24,lo8(100)
740 028c 90E0 ldi r25,hi8(100)
741 028e 00D0 rcall Utility_delay
742 .stabn 68,0,219,.LM82-.LFBB10
743 .LM82:
744 0290 8091 0000 lds r24,receivedCmd
745 0294 8850 subi r24,lo8(-(-8))
746 0296 8230 cpi r24,lo8(2)
747 0298 00F4 brsh .L73
748 .LBB43:
749 .LBB44:
750 .stabn 68,0,531,.LM83-.LFBB10
751 .LM83:
752 029a 8EE4 ldi r24,lo8(78)
753 029c 00D0 rcall UIMgr_writeTxFifo
754 .stabn 68,0,532,.LM84-.LFBB10
755 .LM84:
756 029e 83E4 ldi r24,lo8(67)
757 02a0 00D0 rcall UIMgr_writeTxFifo
758 .stabn 68,0,533,.LM85-.LFBB10
759 .LM85:
760 02a2 8BE4 ldi r24,lo8(75)
761 02a4 00D0 rcall UIMgr_writeTxFifo
762 .stabn 68,0,534,.LM86-.LFBB10
763 .LM86:
764 02a6 8DE0 ldi r24,lo8(13)
GAS LISTING /tmp/ccs6Vjbf.s page 26
765 02a8 00D0 rcall UIMgr_writeTxFifo
766 .LBE44:
767 .LBE43:
768 .stabn 68,0,223,.LM87-.LFBB10
769 .LM87:
770 02aa 80E9 ldi r24,lo8(-112)
771 02ac 00D0 rcall Exec_writeEventFifo
772 02ae 00C0 rjmp .L75
773 .L73:
774 .LBB45:
775 .LBB46:
776 .stabn 68,0,516,.LM88-.LFBB10
777 .LM88:
778 02b0 81E4 ldi r24,lo8(65)
779 02b2 00D0 rcall UIMgr_writeTxFifo
780 .stabn 68,0,517,.LM89-.LFBB10
781 .LM89:
782 02b4 83E4 ldi r24,lo8(67)
783 02b6 00D0 rcall UIMgr_writeTxFifo
784 .stabn 68,0,518,.LM90-.LFBB10
785 .LM90:
786 02b8 8BE4 ldi r24,lo8(75)
787 02ba 00D0 rcall UIMgr_writeTxFifo
788 .stabn 68,0,519,.LM91-.LFBB10
789 .LM91:
790 02bc 8DE0 ldi r24,lo8(13)
791 02be 00D0 rcall UIMgr_writeTxFifo
792 .LBE46:
793 .LBE45:
794 .stabn 68,0,230,.LM92-.LFBB10
795 .LM92:
796 02c0 80E9 ldi r24,lo8(-112)
797 02c2 00D0 rcall Exec_writeEventFifo
798 .LBB47:
799 .LBB41:
800 .stabn 68,0,316,.LM93-.LFBB10
801 .LM93:
802 02c4 8091 0000 lds r24,receivedCmd
803 02c8 8130 cpi r24,lo8(1)
804 02ca 01F4 brne .+2
805 02cc 00C0 rjmp .L75
806 .stabn 68,0,319,.LM94-.LFBB10
807 .LM94:
808 02ce 8823 tst r24
809 02d0 01F4 brne .L77
810 .stabn 68,0,322,.LM95-.LFBB10
811 .LM95:
812 02d2 8091 0000 lds r24,AVRcamVersion
813 02d6 8823 tst r24
814 02d8 01F4 brne .+2
815 02da 00C0 rjmp .L75
816 02dc E301 movw r28,r6
817 .L80:
818 .stabn 68,0,324,.LM96-.LFBB10
819 .LM96:
820 02de 2196 adiw r28,1
821 02e0 00D0 rcall UIMgr_writeTxFifo
GAS LISTING /tmp/ccs6Vjbf.s page 27
822 .stabn 68,0,322,.LM97-.LFBB10
823 .LM97:
824 02e2 8881 ld r24,Y
825 02e4 8823 tst r24
826 02e6 01F4 brne .+2
827 02e8 00C0 rjmp .L75
828 02ea 00C0 rjmp .L80
829 .L77:
830 .stabn 68,0,327,.LM98-.LFBB10
831 .LM98:
832 02ec 8730 cpi r24,lo8(7)
833 02ee 01F4 brne .L81
834 .stabn 68,0,329,.LM99-.LFBB10
835 .LM99:
836 02f0 00D0 rcall CamInt_resetCam
837 02f2 00C0 rjmp .L75
838 .L81:
839 .stabn 68,0,331,.LM100-.LFBB10
840 .LM100:
841 02f4 8330 cpi r24,lo8(3)
842 02f6 01F4 brne .L83
843 .stabn 68,0,340,.LM101-.LFBB10
844 .LM101:
845 02f8 84E6 ldi r24,lo8(100)
846 02fa 90E0 ldi r25,hi8(100)
847 02fc 00D0 rcall Utility_delay
848 .stabn 68,0,341,.LM102-.LFBB10
849 .LM102:
850 02fe 82E0 ldi r24,lo8(2)
851 0300 00D0 rcall Exec_writeEventFifo
852 0302 00C0 rjmp .L75
853 .L83:
854 .stabn 68,0,343,.LM103-.LFBB10
855 .LM103:
856 0304 8230 cpi r24,lo8(2)
857 0306 01F4 brne .L85
858 .stabn 68,0,347,.LM104-.LFBB10
859 .LM104:
860 0308 8091 0000 lds r24,tokenCount
861 030c 8230 cpi r24,lo8(2)
862 030e 00F0 brlo .L87
863 0310 11E0 ldi r17,lo8(1)
864 .L89:
865 .stabn 68,0,350,.LM105-.LFBB10
866 .LM105:
867 0312 F701 movw r30,r14
868 0314 E10F add r30,r17
869 0316 F11D adc r31,__zero_reg__
870 0318 6181 ldd r22,Z+1
871 031a 8081 ld r24,Z
872 031c 00D0 rcall CamConfig_setCamReg
873 .stabn 68,0,347,.LM106-.LFBB10
874 .LM106:
875 031e 1E5F subi r17,lo8(-(2))
876 0320 8091 0000 lds r24,tokenCount
877 0324 1817 cp r17,r24
878 0326 00F0 brlo .L89
GAS LISTING /tmp/ccs6Vjbf.s page 28
879 .L87:
880 .stabn 68,0,352,.LM107-.LFBB10
881 .LM107:
882 0328 00D0 rcall CamConfig_sendFifoCmds
883 032a 00C0 rjmp .L75
884 .L85:
885 .stabn 68,0,354,.LM108-.LFBB10
886 .LM108:
887 032c 8430 cpi r24,lo8(4)
888 032e 01F4 brne .L90
889 .stabn 68,0,357,.LM109-.LFBB10
890 .LM109:
891 0330 84E6 ldi r24,lo8(100)
892 0332 90E0 ldi r25,hi8(100)
893 0334 00D0 rcall Utility_delay
894 .stabn 68,0,358,.LM110-.LFBB10
895 .LM110:
896 0336 80E8 ldi r24,lo8(-128)
897 0338 00D0 rcall Exec_writeEventFifo
898 033a 00C0 rjmp .L75
899 .L90:
900 .stabn 68,0,360,.LM111-.LFBB10
901 .LM111:
902 033c 8530 cpi r24,lo8(5)
903 033e 01F4 brne .L92
904 .stabn 68,0,362,.LM112-.LFBB10
905 .LM112:
906 0340 81E8 ldi r24,lo8(-127)
907 0342 00D0 rcall Exec_writeEventFifo
908 0344 00C0 rjmp .L75
909 .L92:
910 .stabn 68,0,364,.LM113-.LFBB10
911 .LM113:
912 0346 8630 cpi r24,lo8(6)
913 0348 01F0 breq .+2
914 034a 00C0 rjmp .L75
915 .stabn 68,0,367,.LM114-.LFBB10
916 .LM114:
917 034c 8091 0000 lds r24,tokenCount
918 0350 8823 tst r24
919 0352 01F0 breq .L75
920 0354 40E0 ldi r20,lo8(0)
921 .L96:
922 .stabn 68,0,369,.LM115-.LFBB10
923 .LM115:
924 0356 842F mov r24,r20
925 0358 9927 clr r25
926 035a 9C01 movw r18,r24
927 035c 2F5F subi r18,lo8(-(1))
928 035e 3F4F sbci r19,hi8(-(1))
929 0360 F901 movw r30,r18
930 0362 EE0D add r30,r14
931 0364 FF1D adc r31,r15
932 0366 E081 ld r30,Z
933 0368 EC01 movw r28,r24
934 036a C80D add r28,r8
935 036c D91D adc r29,r9
GAS LISTING /tmp/ccs6Vjbf.s page 29
936 036e E883 st Y,r30
937 .LBB27:
938 .LBB28:
939 .stabs "/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h",132,0,0,.Ltext1
940 .Ltext1:
1:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** /* Copyright (c) 2002, 2003, 2004 Marek Michalkiewicz
2:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** Copyright (c) 2005, 2006 Bjoern Haase
3:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** All rights reserved.
4:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
5:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** Redistribution and use in source and binary forms, with or without
6:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** modification, are permitted provided that the following conditions are met:
7:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
8:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** * Redistributions of source code must retain the above copyright
9:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** notice, this list of conditions and the following disclaimer.
10:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
11:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** * Redistributions in binary form must reproduce the above copyright
12:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** notice, this list of conditions and the following disclaimer in
13:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** the documentation and/or other materials provided with the
14:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** distribution.
15:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
16:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** * Neither the name of the copyright holders nor the names of
17:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** contributors may be used to endorse or promote products derived
18:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** from this software without specific prior written permission.
19:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
20:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** POSSIBILITY OF SUCH DAMAGE. */
31:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
32:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** /* $Id: eeprom.h,v 1.17.2.3 2006/05/23 17:18:23 aesok Exp $ */
33:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
34:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** /*
35:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** eeprom.h
36:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
37:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** Contributors:
38:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** Created by Marek Michalkiewicz <marekm@linux.org.pl>
39:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** eeprom_write_word and eeprom_write_block added by Artur Lipowski
40:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** <LAL@pro.onet.pl>
41:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** Complete rewrite using the original interface by Bjoern Haase
42:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** <bjoern.haase@de.bosch.com>.
43:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** */
44:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
45:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #ifndef _EEPROM_H_
46:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #define _EEPROM_H_ 1
47:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
48:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #define __need_size_t
49:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #include <stddef.h>
50:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #include <inttypes.h>
51:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
52:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
GAS LISTING /tmp/ccs6Vjbf.s page 30
53:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #ifdef __AVR_MEGA__
54:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #define XCALL "call"
55:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #else
56:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #define XCALL "rcall"
57:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #endif
58:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
59:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #include <avr/io.h>
60:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #ifndef __EEPROM_REG_LOCATIONS__
61:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** /** \def __EEPROM_REG_LOCATIONS__
62:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** \ingroup avr_eeprom
63:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** In order to be able to work without a requiring a multilib
64:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** approach for dealing with controllers having the EEPROM registers
65:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** at different positions in memory space, the eeprom functions evaluate
66:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** __EEPROM_REG_LOCATIONS__: It is assumed to be defined by
67:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** the device io header and contains 6 uppercase hex digits encoding the
68:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** addresses of EECR,EEDR and EEAR.
69:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** First two letters: EECR address.
70:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** Second two letters: EEDR address.
71:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** Last two letters: EEAR address.
72:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** The default 1C1D1E corresponds to the
73:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** register location that is valid for most controllers. The value
74:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** of this define symbol is used for appending it to the base name of the
75:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** assembler functions. */
76:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #define __EEPROM_REG_LOCATIONS__ 1C1D1E
77:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #endif
78:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #define _STR2(EXP) _STR1(EXP)
79:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #define _STR1(EXP) #EXP
80:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #define _REG_LOCATION_SUFFIX _STR2(__EEPROM_REG_LOCATIONS__)
81:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
82:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #ifndef CR_TAB
83:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #define CR_TAB "\n\t"
84:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #endif
85:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
86:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
87:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** /** \defgroup avr_eeprom <avr/eeprom.h>: EEPROM handling
88:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** \code #include <avr/eeprom.h> \endcode
89:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
90:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** This header file declares the interface to some simple library
91:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** routines suitable for handling the data EEPROM contained in the
92:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** AVR microcontrollers. The implementation uses a simple polled
93:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** mode interface. Applications that require interrupt-controlled
94:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** EEPROM access to ensure that no time will be wasted in spinloops
95:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** will have to deploy their own implementation.
96:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
97:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** \note All of the read/write functions first make sure the EEPROM
98:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** is ready to be accessed. Since this may cause long delays if a
99:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** write operation is still pending, time-critical applications
100:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** should first poll the EEPROM e. g. using eeprom_is_ready() before
101:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** attempting any actual I/O.
102:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
103:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** \note This header file declares inline functions that call the
104:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** assembler subroutines directly. This prevents that the compiler
105:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** generates push/pops for the call-clobbered registers. This way
106:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** also a specific calling convention could be used for the eeprom
107:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** routines e.g. by passing values in __tmp_reg__, eeprom addresses in
108:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** X and memory addresses in Z registers. Method is optimized for code
109:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** size.
GAS LISTING /tmp/ccs6Vjbf.s page 31
110:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
111:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** \note Presently supported are two locations of the EEPROM register
112:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** set: 0x1F,0x20,0x21 and 0x1C,0x1D,0x1E
113:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** (see ::__EEPROM_REG_LOCATIONS__).
114:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
115:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** \note As these functions modify IO registers, they are known to be
116:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** non-reentrant. If any of these functions are used from both,
117:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** standard and interrupt context, the applications must ensure
118:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** proper protection (e.g. by disabling interrupts before accessing
119:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** them).
120:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
121:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** */
122:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
123:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
124:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** /* forward declarations of the inline functions so that doxygen does
125:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** not get confused by the attribute expression. */
126:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
127:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** static inline uint8_t __attribute__ ((always_inline))
128:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** eeprom_read_byte (const uint8_t *addr);
129:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
130:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** static inline uint16_t __attribute__ ((always_inline))
131:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** eeprom_read_word (const uint16_t *addr);
132:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
133:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** static inline void __attribute__ ((always_inline))
134:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** eeprom_read_block (void *pointer_ram,
135:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** const void *pointer_eeprom,
136:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** size_t size);
137:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
138:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** static inline void __attribute__ ((always_inline))
139:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** eeprom_write_byte (uint8_t *addr,uint8_t value);
140:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
141:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** static inline void __attribute__ ((always_inline))
142:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** eeprom_write_word (uint16_t *addr,uint16_t value);
143:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
144:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** static inline void __attribute__ ((always_inline))
145:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** eeprom_write_block (const void *pointer_ram,
146:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** void *pointer_eeprom,
147:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** size_t size);
148:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
149:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** /** \name avr-libc declarations */
150:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
151:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** /*@{*/
152:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
153:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** /** \def EEMEM
154:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** \ingroup avr_eeprom
155:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** Attribute expression causing a variable to be allocated within the .eeprom
156:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** section. */
157:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #define EEMEM __attribute__((section(".eeprom")))
158:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
159:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** /** \def eeprom_is_ready
160:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** \ingroup avr_eeprom
161:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** \returns 1 if EEPROM is ready for a new read/write operation, 0 if not. */
162:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
163:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #if defined(__DOXYGEN__)
164:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** # define eeprom_is_ready()
165:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #elif defined(EEWE)
166:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** # define eeprom_is_ready() bit_is_clear(EECR, EEWE)
GAS LISTING /tmp/ccs6Vjbf.s page 32
167:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #elif defined(EEPE)
168:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** # define eeprom_is_ready() bit_is_clear(EECR, EEPE)
169:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #elif defined(DEECR) && defined(EEL)
170:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** # define eeprom_is_ready() bit_is_clear(DEECR, EEL)
171:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #else
172:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** # error "No write enable bit known for this device's EEPROM."
173:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #endif
174:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
175:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** /** \def eeprom_busy_wait
176:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** \ingroup avr_eeprom
177:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
178:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** Loops until the eeprom is no longer busy.
179:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
180:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** \returns Nothing. */
181:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
182:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** #define eeprom_busy_wait() do {} while (!eeprom_is_ready())
183:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
184:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
185:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** /** \ingroup avr_eeprom
186:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** Read one byte from EEPROM address \c addr. */
187:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
188:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** uint8_t
189:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** eeprom_read_byte (const uint8_t *addr)
190:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** {
191:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** uint8_t result;
192:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** __asm__ __volatile__
941 .stabn 68,0,192,.LM116-.LFBB10
942 .LM116:
943 0370 D901 movw r26,r18
944 /* #APP */
945 0372 00D0 rcall __eeprom_read_byte_1C1D1E
946 0374 802D mov r24,__tmp_reg__
947 /* #NOAPP */
948 .LBE28:
949 .LBE27:
950 .stabs "UIMgr.c",132,0,0,.Ltext2
951 .Ltext2:
952 .stabn 68,0,374,.LM117-.LFBB10
953 .LM117:
954 0376 E817 cp r30,r24
955 0378 01F0 breq .L97
956 .LBB29:
957 .LBB31:
958 .stabs "/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h",132,0,0,.Ltext3
959 .Ltext3:
193:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** ( XCALL " __eeprom_read_byte_" _REG_LOCATION_SUFFIX CR_TAB
194:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** "mov %1,__tmp_reg__"
195:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** : "+x" (addr),
196:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** "=r" (result)
197:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** : );
198:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** return result;
199:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** }
200:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
201:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** /** \ingroup avr_eeprom
202:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** Read one 16-bit word (little endian) from EEPROM address \c addr. */
203:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** uint16_t
204:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** eeprom_read_word (const uint16_t *addr)
GAS LISTING /tmp/ccs6Vjbf.s page 33
205:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** {
206:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** uint16_t result;
207:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
208:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** __asm__ __volatile__ (
209:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** XCALL " __eeprom_read_word_" _REG_LOCATION_SUFFIX CR_TAB
210:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** : "+x" (addr),
211:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** "=z" (result)
212:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** : );
213:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** return result;
214:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** }
215:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
216:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** /** \ingroup avr_eeprom
217:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** Read a block of \c n bytes from EEPROM address \c pointer_eeprom to
218:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** \c pointer_ram. For constant n <= 256 bytes a library function is used.
219:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** For block sizes unknown at compile time or block sizes > 256 an inline
220:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** loop is expanded. */
221:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
222:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** void
223:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** eeprom_read_block (void *pointer_ram,
224:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** const void *pointer_eeprom,
225:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** size_t n)
226:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** {
227:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** if (!__builtin_constant_p (n)
228:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** || n > 256)
229:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** {
230:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** /* make sure size is a 16 bit variable. */
231:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** uint16_t size = n;
232:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
233:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** __asm__ __volatile__ (
234:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** ".%=_start:" CR_TAB
235:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** "sbiw %2,1" CR_TAB
236:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** "brlt .%=_finished" CR_TAB
237:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** XCALL " __eeprom_read_byte_" _REG_LOCATION_SUFFIX CR_TAB
238:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** "st z+,__tmp_reg__" CR_TAB
239:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** "rjmp .%=_start" CR_TAB
240:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** ".%=_finished:"
241:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** : "=x" (pointer_eeprom),
242:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** "=z" (pointer_ram),
243:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** "+w" (size)
244:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** : "x" (pointer_eeprom),
245:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** "z" (pointer_ram)
246:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** : "memory");
247:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** }
248:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** else
249:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** {
250:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** if (n != 0)
251:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** {
252:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** if (n == 256)
253:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** {
254:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** __asm__ __volatile__ (
255:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** XCALL " __eeprom_read_block_" _REG_LOCATION_SUFFIX
256:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** : "+x" (pointer_eeprom),
257:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** "=z" (pointer_ram)
258:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** : "z" (pointer_ram)
259:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** : "memory");
260:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** }
261:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** else
GAS LISTING /tmp/ccs6Vjbf.s page 34
262:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** {
263:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** /* Needed in order to truncate to 8 bit. */
264:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** uint8_t len;
265:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** len = (uint8_t) n;
266:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
267:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** __asm__ __volatile__ (
268:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** "mov __zero_reg__,%2" CR_TAB
269:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** XCALL " __eeprom_read_block_" _REG_LOCATION_SUFFIX
270:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** : "+x" (pointer_eeprom),
271:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** "=z" (pointer_ram)
272:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** : "r" (len),
273:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** "z" (pointer_ram)
274:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** : "memory");
275:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** }
276:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** }
277:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** }
278:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** }
279:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
280:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** /** \ingroup avr_eeprom
281:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** Write a byte \c value to EEPROM address \c addr. */
282:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h ****
283:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** void
284:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** eeprom_write_byte (uint8_t *addr,uint8_t value)
285:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** {
286:/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h **** __asm__ __volatile__ (
960 .stabn 68,0,286,.LM118-.LFBB10
961 .LM118:
962 037a D901 movw r26,r18
963 /* #APP */
964 037c 0E2E mov __tmp_reg__,r30
965 037e 00D0 rcall __eeprom_write_byte_1C1D1E
966 /* #NOAPP */
967 .LBE31:
968 .LBE29:
969 .LBB33:
970 .LBB35:
971 .stabn 68,0,192,.LM119-.LFBB10
972 .LM119:
973 0380 D901 movw r26,r18
974 /* #APP */
975 0382 00D0 rcall __eeprom_read_byte_1C1D1E
976 0384 802D mov r24,__tmp_reg__
977 /* #NOAPP */
978 .LBE35:
979 .LBE33:
980 .stabs "UIMgr.c",132,0,0,.Ltext4
981 .Ltext4:
982 .stabn 68,0,384,.LM120-.LFBB10
983 .LM120:
984 0386 9881 ld r25,Y
985 .stabn 68,0,379,.LM121-.LFBB10
986 .LM121:
987 0388 8917 cp r24,r25
988 038a 01F0 breq .L97
989 .LBB37:
990 .LBB30:
991 .stabs "/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h",132,0,0,.Ltext5
GAS LISTING /tmp/ccs6Vjbf.s page 35
992 .Ltext5:
993 .stabn 68,0,286,.LM122-.LFBB10
994 .LM122:
995 038c D901 movw r26,r18
996 /* #APP */
997 038e 092E mov __tmp_reg__,r25
998 0390 00D0 rcall __eeprom_write_byte_1C1D1E
999 /* #NOAPP */
1000 .LBE30:
1001 .LBE37:
1002 .LBB38:
1003 .LBB34:
1004 .stabn 68,0,192,.LM123-.LFBB10
1005 .LM123:
1006 0392 D901 movw r26,r18
1007 /* #APP */
1008 0394 00D0 rcall __eeprom_read_byte_1C1D1E
1009 0396 802D mov r24,__tmp_reg__
1010 /* #NOAPP */
1011 .LBE34:
1012 .LBE38:
1013 .stabs "UIMgr.c",132,0,0,.Ltext6
1014 .Ltext6:
1015 .stabn 68,0,384,.LM124-.LFBB10
1016 .LM124:
1017 0398 9881 ld r25,Y
1018 .stabn 68,0,379,.LM125-.LFBB10
1019 .LM125:
1020 039a 8917 cp r24,r25
1021 039c 01F0 breq .L97
1022 .LBB39:
1023 .LBB32:
1024 .stabs "/usr/lib/gcc/avr/4.2.1/../../../../avr/include/avr/eeprom.h",132,0,0,.Ltext7
1025 .Ltext7:
1026 .stabn 68,0,286,.LM126-.LFBB10
1027 .LM126:
1028 039e D901 movw r26,r18
1029 /* #APP */
1030 03a0 092E mov __tmp_reg__,r25
1031 03a2 00D0 rcall __eeprom_write_byte_1C1D1E
1032 /* #NOAPP */
1033 .LBE32:
1034 .LBE39:
1035 .LBB40:
1036 .LBB36:
1037 .stabn 68,0,192,.LM127-.LFBB10
1038 .LM127:
1039 03a4 D901 movw r26,r18
1040 /* #APP */
1041 03a6 00D0 rcall __eeprom_read_byte_1C1D1E
1042 03a8 802D mov r24,__tmp_reg__
1043 /* #NOAPP */
1044 .L97:
1045 .LBE36:
1046 .LBE40:
1047 .stabs "UIMgr.c",132,0,0,.Ltext8
1048 .Ltext8:
GAS LISTING /tmp/ccs6Vjbf.s page 36
1049 .stabn 68,0,367,.LM128-.LFBB10
1050 .LM128:
1051 03aa 4F5F subi r20,lo8(-(1))
1052 03ac 8091 0000 lds r24,tokenCount
1053 03b0 4817 cp r20,r24
1054 03b2 00F0 brlo .L96
1055 .L75:
1056 .LBE41:
1057 .LBE47:
1058 .stabn 68,0,235,.LM129-.LFBB10
1059 .LM129:
1060 03b4 1092 0000 sts tokenCount,__zero_reg__
1061 .stabn 68,0,236,.LM130-.LFBB10
1062 .LM130:
1063 03b8 80E4 ldi r24,lo8(64)
1064 03ba F701 movw r30,r14
1065 03bc 1192 st Z+,__zero_reg__
1066 03be 8A95 dec r24
1067 03c0 01F4 brne .-6
1068 03c2 00C0 rjmp .L119
1069 .L68:
1070 .stabn 68,0,238,.LM131-.LFBB10
1071 .LM131:
1072 03c4 2032 cpi r18,lo8(32)
1073 03c6 01F4 brne .L101
1074 .stabn 68,0,241,.LM132-.LFBB10
1075 .LM132:
1076 03c8 8091 0000 lds r24,tokenCount
1077 03cc 8823 tst r24
1078 03ce 01F4 brne .L103
1079 .stabn 68,0,243,.LM133-.LFBB10
1080 .LM133:
1081 03d0 00D0 rcall UIMgr_convertTokenToCmd
1082 .stabn 68,0,244,.LM134-.LFBB10
1083 .LM134:
1084 03d2 8091 0000 lds r24,tokenCount
1085 03d6 8F5F subi r24,lo8(-(1))
1086 03d8 8093 0000 sts tokenCount,r24
1087 03dc 00C0 rjmp .L119
1088 .L103:
1089 .stabn 68,0,254,.LM135-.LFBB10
1090 .LM135:
1091 03de 9927 clr r25
1092 03e0 0196 adiw r24,1
1093 03e2 8034 cpi r24,64
1094 03e4 9105 cpc r25,__zero_reg__
1095 03e6 04F0 brlt .L105
1096 .stabn 68,0,259,.LM136-.LFBB10
1097 .LM136:
1098 03e8 1092 0000 sts charCount,__zero_reg__
1099 .stabn 68,0,260,.LM137-.LFBB10
1100 .LM137:
1101 03ec 1092 0000 sts charIndex,__zero_reg__
1102 .stabn 68,0,261,.LM138-.LFBB10
1103 .LM138:
1104 03f0 1092 0000 sts tokenCount,__zero_reg__
1105 .stabn 68,0,262,.LM139-.LFBB10
GAS LISTING /tmp/ccs6Vjbf.s page 37
1106 .LM139:
1107 03f4 89E0 ldi r24,lo8(9)
1108 03f6 8093 0000 sts receivedCmd,r24
1109 03fa 00C0 rjmp .L119
1110 .L105:
1111 .stabn 68,0,267,.LM140-.LFBB10
1112 .LM140:
1113 03fc 00D0 rcall UIMgr_convertTokenToValue
1114 .stabn 68,0,268,.LM141-.LFBB10
1115 .LM141:
1116 03fe 8091 0000 lds r24,tokenCount
1117 0402 8F5F subi r24,lo8(-(1))
1118 0404 8093 0000 sts tokenCount,r24
1119 0408 00C0 rjmp .L119
1120 .L101:
1121 .stabn 68,0,272,.LM142-.LFBB10
1122 .LM142:
1123 040a 822F mov r24,r18
1124 040c 8154 subi r24,lo8(-(-65))
1125 040e 8A31 cpi r24,lo8(26)
1126 0410 00F0 brlo .L107
1127 0412 8F5E subi r24,lo8(-(17))
1128 0414 8A30 cpi r24,lo8(10)
1129 0416 00F4 brsh .L109
1130 .L107:
1131 .stabn 68,0,276,.LM143-.LFBB10
1132 .LM143:
1133 0418 8091 0000 lds r24,charIndex
1134 041c F501 movw r30,r10
1135 041e E80F add r30,r24
1136 0420 F11D adc r31,__zero_reg__
1137 0422 2083 st Z,r18
1138 .stabn 68,0,277,.LM144-.LFBB10
1139 .LM144:
1140 0424 9091 0000 lds r25,charCount
1141 0428 9F5F subi r25,lo8(-(1))
1142 042a 9093 0000 sts charCount,r25
1143 .stabn 68,0,278,.LM145-.LFBB10
1144 .LM145:
1145 042e 8F5F subi r24,lo8(-(1))
1146 0430 8093 0000 sts charIndex,r24
1147 .stabn 68,0,279,.LM146-.LFBB10
1148 .LM146:
1149 0434 9430 cpi r25,lo8(4)
1150 0436 00F0 brlo .L119
1151 .stabn 68,0,284,.LM147-.LFBB10
1152 .LM147:
1153 0438 89E0 ldi r24,lo8(9)
1154 043a 8093 0000 sts receivedCmd,r24
1155 .stabn 68,0,285,.LM148-.LFBB10
1156 .LM148:
1157 043e 1092 0000 sts charIndex,__zero_reg__
1158 0442 00C0 rjmp .L119
1159 .L109:
1160 .stabn 68,0,291,.LM149-.LFBB10
1161 .LM149:
1162 0444 89E0 ldi r24,lo8(9)
GAS LISTING /tmp/ccs6Vjbf.s page 38
1163 0446 8093 0000 sts receivedCmd,r24
1164 .L119:
1165 .stabn 68,0,199,.LM150-.LFBB10
1166 .LM150:
1167 044a 9091 0000 lds r25,UIMgr_rxFifoTail
1168 044e 8091 0000 lds r24,UIMgr_rxFifoHead
1169 0452 8917 cp r24,r25
1170 0454 01F0 breq .+2
1171 0456 00C0 rjmp .L67
1172 .stabn 68,0,295,.LM151-.LFBB10
1173 .LM151:
1174 /* #APP */
1175 0458 E894 clt
1176 /* #NOAPP */
1177 /* epilogue: frame size=0 */
1178 045a DF91 pop r29
1179 045c CF91 pop r28
1180 045e 1F91 pop r17
1181 0460 FF90 pop r15
1182 0462 EF90 pop r14
1183 0464 DF90 pop r13
1184 0466 CF90 pop r12
1185 0468 BF90 pop r11
1186 046a AF90 pop r10
1187 046c 9F90 pop r9
1188 046e 8F90 pop r8
1189 0470 7F90 pop r7
1190 0472 6F90 pop r6
1191 0474 0895 ret
1192 /* epilogue end (size=14) */
1193 /* function UIMgr_processReceivedData size 333 (306) */
1194 .size UIMgr_processReceivedData, .-UIMgr_processReceivedData
1195 .stabs "dataByte:r(0,11)",64,0,609,18
1196 .stabn 192,0,0,.LBB23-.LFBB10
1197 .stabn 224,0,0,.LBE23-.LFBB10
1198 .stabs "dataByte:r(0,11)",64,0,609,18
1199 .stabn 192,0,0,.LBB24-.LFBB10
1200 .stabn 224,0,0,.LBE24-.LFBB10
1201 .Lscope10:
1202 .stabs "",36,0,0,.Lscope10-.LFBB10
1203 .stabd 78,0,0
1204 .stabs "UIMgr_dispatchEvent:F(0,15)",36,0,152,UIMgr_dispatchEvent
1205 .stabs "event:P(0,11)",64,0,151,24
1206 .global UIMgr_dispatchEvent
1207 .type UIMgr_dispatchEvent, @function
1208 UIMgr_dispatchEvent:
1209 .stabd 46,0,0
1210 .stabn 68,0,152,.LM152-.LFBB11
1211 .LM152:
1212 .LFBB11:
1213 /* prologue: frame size=0 */
1214 /* prologue end (size=0) */
1215 .stabn 68,0,153,.LM153-.LFBB11
1216 .LM153:
1217 0476 8031 cpi r24,lo8(16)
1218 0478 01F0 breq .L123
1219 .stabn 68,0,153,.LM154-.LFBB11
GAS LISTING /tmp/ccs6Vjbf.s page 39
1220 .LM154:
1221 047a 8039 cpi r24,lo8(-112)
1222 047c 01F0 breq .L124
1223 047e 8130 cpi r24,lo8(1)
1224 0480 01F4 brne .L125
1225 0482 00C0 rjmp .L122
1226 .L123:
1227 .stabn 68,0,156,.LM155-.LFBB11
1228 .LM155:
1229 0484 00D0 rcall UIMgr_transmitPendingData
1230 0486 0895 ret
1231 .L122:
1232 .stabn 68,0,160,.LM156-.LFBB11
1233 .LM156:
1234 0488 00D0 rcall UIMgr_processReceivedData
1235 048a 0895 ret
1236 .L124:
1237 .stabn 68,0,164,.LM157-.LFBB11
1238 .LM157:
1239 048c 00D0 rcall UIMgr_flushTxBuffer
1240 .L125:
1241 048e 0895 ret
1242 /* epilogue: frame size=0 */
1243 /* epilogue: noreturn */
1244 /* epilogue end (size=0) */
1245 /* function UIMgr_dispatchEvent size 13 (13) */
1246 .size UIMgr_dispatchEvent, .-UIMgr_dispatchEvent
1247 .Lscope11:
1248 .stabs "",36,0,0,.Lscope11-.LFBB11
1249 .stabd 78,0,0
1250 .global UIMgr_rxFifoHead
1251 .global UIMgr_rxFifoHead
1252 .section .bss
1253 .type UIMgr_rxFifoHead, @object
1254 .size UIMgr_rxFifoHead, 1
1255 UIMgr_rxFifoHead:
1256 0000 00 .skip 1,0
1257 .global UIMgr_rxFifoTail
1258 .global UIMgr_rxFifoTail
1259 .type UIMgr_rxFifoTail, @object
1260 .size UIMgr_rxFifoTail, 1
1261 UIMgr_rxFifoTail:
1262 0001 00 .skip 1,0
1263 .global UIMgr_txFifoHead
1264 .global UIMgr_txFifoHead
1265 .type UIMgr_txFifoHead, @object
1266 .size UIMgr_txFifoHead, 1
1267 UIMgr_txFifoHead:
1268 0002 00 .skip 1,0
1269 .global UIMgr_txFifoTail
1270 .global UIMgr_txFifoTail
1271 .type UIMgr_txFifoTail, @object
1272 .size UIMgr_txFifoTail, 1
1273 UIMgr_txFifoTail:
1274 0003 00 .skip 1,0
1275 .lcomm tokenCount,1
1276 .data
GAS LISTING /tmp/ccs6Vjbf.s page 40
1277 .type receivedCmd, @object
1278 .size receivedCmd, 1
1279 receivedCmd:
1280 0000 08 .byte 8
1281 .lcomm charCount,1
1282 .lcomm charIndex,1
1283 .type AVRcamVersion, @object
1284 .size AVRcamVersion, 13
1285 AVRcamVersion:
1286 0001 4156 5263 .string "AVRcam v1.4\r"
1286 616D 2076
1286 312E 340D
1286 00
1287 .lcomm asciiTokenBuffer,4
1288 .lcomm tokenBuffer,64
1289 .comm UIMgr_rxFifo,32,1
1290 .comm UIMgr_txFifo,64,1
1291 .stabs "charCount:S(0,11)",38,0,92,charCount
1292 .stabs "charIndex:S(0,11)",38,0,93,charIndex
1293 .stabs "asciiTokenBuffer:S(0,21)=ar(0,22)=r(0,22);0;0177777;;0;3;(0,11)",40,0,94,asciiTokenBuffer
1294 .stabs "tokenCount:S(0,11)",38,0,95,tokenCount
1295 .stabs "tokenBuffer:S(0,23)=ar(0,22);0;63;(0,11)",40,0,96,tokenBuffer
1296 .stabs "receivedCmd:S(0,17)",38,0,97,receivedCmd
1297 .stabs "AVRcamVersion:S(0,24)=ar(0,22);0;12;(0,11)",38,0,98,AVRcamVersion
1298 .stabs "UIMgr_rxFifo:G(0,25)=ar(0,22);0;31;(0,11)",32,0,111,0
1299 .stabs "UIMgr_rxFifoHead:G(0,11)",32,0,112,0
1300 .stabs "UIMgr_rxFifoTail:G(0,11)",32,0,113,0
1301 .stabs "UIMgr_txFifo:G(0,23)",32,0,115,0
1302 .stabs "UIMgr_txFifoHead:G(0,11)",32,0,116,0
1303 .stabs "UIMgr_txFifoTail:G(0,11)",32,0,117,0
1304 .text
1305 .stabs "",100,0,0,.Letext0
1306 .Letext0:
1307 /* File "UIMgr.c": code 609 = 0x0261 ( 570), prologues 16, epilogues 23 */
GAS LISTING /tmp/ccs6Vjbf.s page 41
DEFINED SYMBOLS
*ABS*:00000000 UIMgr.c
/tmp/ccs6Vjbf.s:2 *ABS*:0000003f __SREG__
/tmp/ccs6Vjbf.s:3 *ABS*:0000003e __SP_H__
/tmp/ccs6Vjbf.s:4 *ABS*:0000003d __SP_L__
/tmp/ccs6Vjbf.s:5 *ABS*:00000000 __tmp_reg__
/tmp/ccs6Vjbf.s:6 *ABS*:00000001 __zero_reg__
/tmp/ccs6Vjbf.s:93 .text:00000000 UIMgr_writeBufferToTxFifo
/tmp/ccs6Vjbf.s:1267 .bss:00000002 UIMgr_txFifoHead
*COM*:00000040 UIMgr_txFifo
/tmp/ccs6Vjbf.s:158 .text:00000034 UIMgr_readTxFifo
/tmp/ccs6Vjbf.s:1273 .bss:00000003 UIMgr_txFifoTail
/tmp/ccs6Vjbf.s:206 .text:00000052 UIMgr_writeTxFifo
/tmp/ccs6Vjbf.s:247 .text:0000006e UIMgr_flushTxBuffer
/tmp/ccs6Vjbf.s:286 .text:0000008c UIMgr_txBuffer
/tmp/ccs6Vjbf.s:327 .text:000000ac UIMgr_transmitPendingData
/tmp/ccs6Vjbf.s:356 .text:000000be UIMgr_convertTokenToCmd
/tmp/ccs6Vjbf.s:1282 .bss:00000007 asciiTokenBuffer
/tmp/ccs6Vjbf.s:1279 .data:00000000 receivedCmd
/tmp/ccs6Vjbf.s:1281 .bss:00000006 charIndex
/tmp/ccs6Vjbf.s:1275 .bss:00000005 charCount
/tmp/ccs6Vjbf.s:499 .text:0000017c UIMgr_init
/tmp/ccs6Vjbf.s:1287 .bss:0000000b tokenBuffer
*COM*:00000020 UIMgr_rxFifo
/tmp/ccs6Vjbf.s:546 .text:000001b2 UIMgr_convertTokenToValue
.bss:00000004 tokenCount
/tmp/ccs6Vjbf.s:617 .text:000001fe UIMgr_processReceivedData
/tmp/ccs6Vjbf.s:1285 .data:00000001 AVRcamVersion
/tmp/ccs6Vjbf.s:1261 .bss:00000001 UIMgr_rxFifoTail
/tmp/ccs6Vjbf.s:1255 .bss:00000000 UIMgr_rxFifoHead
/tmp/ccs6Vjbf.s:1208 .text:00000476 UIMgr_dispatchEvent
UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss
UartInt_txByte
atoi
colorMap
Utility_delay
Exec_writeEventFifo
CamInt_resetCam
CamConfig_setCamReg
CamConfig_sendFifoCmds
__eeprom_read_byte_1C1D1E
__eeprom_write_byte_1C1D1E