Rev 182 | Blame | Last modification | View Log | Download
GAS LISTING /tmp/ccRvT1Qm.s page 1
1 .file "UIMgr.c"
2 .arch atmega8
3 __SREG__ = 0x3f
4 __SP_H__ = 0x3e
5 __SP_L__ = 0x3d
6 __tmp_reg__ = 0
7 __zero_reg__ = 1
8 .global __do_copy_data
9 .global __do_clear_bss
10 .stabs "/home/kaklik/projects/programy/Atmel_C/AVRcam/",100,0,2,.Ltext0
11 .stabs "UIMgr.c",100,0,2,.Ltext0
12 .text
13 .Ltext0:
14 .stabs "gcc2_compiled.",60,0,0,0
15 .stabs "int:t(0,1)=r(0,1);-32768;32767;",128,0,0,0
16 .stabs "char:t(0,2)=@s8;r(0,2);0;255;",128,0,0,0
17 .stabs "long int:t(0,3)=@s32;r(0,3);020000000000;017777777777;",128,0,0,0
18 .stabs "unsigned int:t(0,4)=r(0,4);0;0177777;",128,0,0,0
19 .stabs "long unsigned int:t(0,5)=@s32;r(0,5);0;037777777777;",128,0,0,0
20 .stabs "long long int:t(0,6)=@s64;r(0,6);01000000000000000000000;0777777777777777777777;",128,0,0,
21 .stabs "long long unsigned int:t(0,7)=@s64;r(0,7);0;01777777777777777777777;",128,0,0,0
22 .stabs "short int:t(0,8)=r(0,8);-32768;32767;",128,0,0,0
23 .stabs "short unsigned int:t(0,9)=r(0,9);0;0177777;",128,0,0,0
24 .stabs "signed char:t(0,10)=@s8;r(0,10);-128;127;",128,0,0,0
25 .stabs "unsigned char:t(0,11)=@s8;r(0,11);0;255;",128,0,0,0
26 .stabs "float:t(0,12)=r(0,1);4;0;",128,0,0,0
27 .stabs "double:t(0,13)=r(0,1);4;0;",128,0,0,0
28 .stabs "long double:t(0,14)=r(0,1);4;0;",128,0,0,0
29 .stabs "void:t(0,15)=(0,15)",128,0,0,0
30 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/io.h",130,0,0,0
31 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/sfr_defs.h",130,0,0,0
32 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/inttypes.h",130,0,0,0
33 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/stdint.h",130,0,0,0
34 .stabs "int8_t:t(4,1)=(0,10)",128,0,116,0
35 .stabs "uint8_t:t(4,2)=(0,11)",128,0,117,0
36 .stabs "int16_t:t(4,3)=(0,1)",128,0,118,0
37 .stabs "uint16_t:t(4,4)=(0,4)",128,0,119,0
38 .stabs "int32_t:t(4,5)=(0,3)",128,0,120,0
39 .stabs "uint32_t:t(4,6)=(0,5)",128,0,121,0
40 .stabs "int64_t:t(4,7)=(0,6)",128,0,122,0
41 .stabs "uint64_t:t(4,8)=(0,7)",128,0,123,0
42 .stabs "intptr_t:t(4,9)=(4,3)",128,0,135,0
43 .stabs "uintptr_t:t(4,10)=(4,4)",128,0,140,0
44 .stabs "int_least8_t:t(4,11)=(4,1)",128,0,152,0
45 .stabs "uint_least8_t:t(4,12)=(4,2)",128,0,157,0
46 .stabs "int_least16_t:t(4,13)=(4,3)",128,0,162,0
47 .stabs "uint_least16_t:t(4,14)=(4,4)",128,0,167,0
48 .stabs "int_least32_t:t(4,15)=(4,5)",128,0,172,0
49 .stabs "uint_least32_t:t(4,16)=(4,6)",128,0,177,0
50 .stabs "int_least64_t:t(4,17)=(4,7)",128,0,182,0
51 .stabs "uint_least64_t:t(4,18)=(4,8)",128,0,187,0
52 .stabs "int_fast8_t:t(4,19)=(4,1)",128,0,200,0
53 .stabs "uint_fast8_t:t(4,20)=(4,2)",128,0,205,0
54 .stabs "int_fast16_t:t(4,21)=(4,3)",128,0,210,0
55 .stabs "uint_fast16_t:t(4,22)=(4,4)",128,0,215,0
56 .stabs "int_fast32_t:t(4,23)=(4,5)",128,0,220,0
57 .stabs "uint_fast32_t:t(4,24)=(4,6)",128,0,225,0
GAS LISTING /tmp/ccRvT1Qm.s page 2
58 .stabs "int_fast64_t:t(4,25)=(4,7)",128,0,230,0
59 .stabs "uint_fast64_t:t(4,26)=(4,8)",128,0,235,0
60 .stabs "intmax_t:t(4,27)=(4,7)",128,0,249,0
61 .stabs "uintmax_t:t(4,28)=(4,8)",128,0,254,0
62 .stabn 162,0,0,0
63 .stabs "int_farptr_t:t(3,1)=(4,5)",128,0,76,0
64 .stabs "uint_farptr_t:t(3,2)=(4,6)",128,0,80,0
65 .stabn 162,0,0,0
66 .stabn 162,0,0,0
67 .stabn 162,0,0,0
68 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/stdlib.h",130,0,0,0
69 .stabs "/usr/lib/gcc/avr/4.1.0/include/stddef.h",130,0,0,0
70 .stabs "size_t:t(6,1)=(0,4)",128,0,214,0
71 .stabs "wchar_t:t(6,2)=(0,1)",128,0,326,0
72 .stabn 162,0,0,0
73 .stabs "div_t:t(5,1)=(5,2)=s4quot:(0,1),0,16;rem:(0,1),16,16;;",128,0,69,0
74 .stabs "ldiv_t:t(5,3)=(5,4)=s8quot:(0,3),0,32;rem:(0,3),32,32;;",128,0,75,0
75 .stabs "__compar_fn_t:t(5,5)=(5,6)=*(5,7)=f(0,1)",128,0,78,0
76 .stabn 162,0,0,0
77 .stabs "CommonDefs.h",130,0,0,0
78 .stabs "bool_t:t(7,1)=(0,11)",128,0,56,0
79 .stabn 162,0,0,0
80 .stabs "CamConfig.h",130,0,0,0
81 .stabs "I2CInterface.h",130,0,0,0
82 .stabs "i2cCmd_t:t(9,1)=(9,2)=s2configReg:(0,11),0,8;data:(0,11),8,8;;",128,0,53,0
83 .stabn 162,0,0,0
84 .stabn 162,0,0,0
85 .stabs " :T(0,16)=@s8;egetVersionCmd:0,pingCmd:1,setCameraRegsCmd:2,dumpFrameCmd:3,enableTrackingC
86 .stabs "UIMgr_Cmd_t:t(0,17)=(0,16)",128,0,81,0
87 .stabs " :T(0,18)=@s8;esetRed:0,setGreen:1,setBlue:2,;",128,0,0,0
88 .stabs "setColorState_t:t(0,19)=(0,18)",128,0,88,0
89 .stabs "UIMgr_writeBufferToTxFifo:F(0,15)",36,0,547,UIMgr_writeBufferToTxFifo
90 .stabs "pData:P(0,20)=*(0,11)",64,0,546,26
91 .stabs "length:P(0,11)",64,0,546,24
92 .global UIMgr_writeBufferToTxFifo
93 .type UIMgr_writeBufferToTxFifo, @function
94 UIMgr_writeBufferToTxFifo:
95 .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 ****
GAS LISTING /tmp/ccRvT1Qm.s page 3
20:UIMgr.c **** For more information on the AVRcam, please contact:
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,
GAS LISTING /tmp/ccRvT1Qm.s page 4
77:UIMgr.c **** setColorMapCmd,
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
GAS LISTING /tmp/ccRvT1Qm.s page 5
134:UIMgr.c **** Outputs: none
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
GAS LISTING /tmp/ccRvT1Qm.s page 6
191:UIMgr.c **** ***********************************************************/
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
GAS LISTING /tmp/ccRvT1Qm.s page 7
248:UIMgr.c **** it sets the color map based on tokenCount...CHECK*/
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
GAS LISTING /tmp/ccRvT1Qm.s page 8
305:UIMgr.c **** Outputs: none
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 **** {
GAS LISTING /tmp/ccRvT1Qm.s page 9
362:UIMgr.c **** PUBLISH_EVENT(EV_DISABLE_TRACKING);
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
GAS LISTING /tmp/ccRvT1Qm.s page 10
419:UIMgr.c **** Outputs: none
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 **** }
GAS LISTING /tmp/ccRvT1Qm.s page 11
476:UIMgr.c **** else if ( (asciiTokenBuffer[0] == 'E') &&
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');
GAS LISTING /tmp/ccRvT1Qm.s page 12
533:UIMgr.c **** UIMgr_writeTxFifo('K');
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 **** {
96 .stabn 68,0,547,.LM0-UIMgr_writeBufferToTxFifo
97 .LM0:
98 /* prologue: frame size=0 */
99 /* prologue end (size=0) */
100 0000 DC01 movw r26,r24
101 0002 862F mov r24,r22
548:UIMgr.c **** unsigned char tmpHead;
549:UIMgr.c **** if (length == 0)
102 .stabn 68,0,549,.LM1-UIMgr_writeBufferToTxFifo
103 .LM1:
104 0004 6623 tst r22
105 0006 C9F0 breq .L7
550:UIMgr.c **** {
551:UIMgr.c **** return;
552:UIMgr.c **** }
553:UIMgr.c ****
554:UIMgr.c **** DISABLE_INTS();
106 .stabn 68,0,554,.LM2-UIMgr_writeBufferToTxFifo
107 .LM2:
108 /* #APP */
109 0008 F894 cli
555:UIMgr.c **** while(length-- != 0)
110 .stabn 68,0,555,.LM3-UIMgr_writeBufferToTxFifo
111 .LM3:
112 /* #NOAPP */
113 000a 6150 subi r22,lo8(-(-1))
114 000c 6F3F cpi r22,lo8(-1)
115 000e A1F0 breq .L4
116 0010 262F mov r18,r22
117 0012 40E0 ldi r20,lo8(UIMgr_txFifo)
118 0014 50E0 ldi r21,hi8(UIMgr_txFifo)
119 0016 861B sub r24,r22
120 0018 682F mov r22,r24
121 001a 6250 subi r22,lo8(-(-2))
122 .L6:
556:UIMgr.c **** {
557:UIMgr.c **** UIMgr_txFifo[UIMgr_txFifoHead] = *pData++;
123 .stabn 68,0,557,.LM4-UIMgr_writeBufferToTxFifo
124 .LM4:
125 001c 8091 0000 lds r24,UIMgr_txFifoHead
126 0020 FA01 movw r30,r20
127 0022 E80F add r30,r24
GAS LISTING /tmp/ccRvT1Qm.s page 13
128 0024 F11D adc r31,__zero_reg__
129 0026 9D91 ld r25,X+
130 0028 9083 st Z,r25
558:UIMgr.c ****
559:UIMgr.c **** /* now move the head up */
560:UIMgr.c **** tmpHead = (UIMgr_txFifoHead + 1) & (UI_MGR_TX_FIFO_MASK);
561:UIMgr.c **** UIMgr_txFifoHead = tmpHead;
131 .stabn 68,0,561,.LM5-UIMgr_writeBufferToTxFifo
132 .LM5:
133 002a 8F5F subi r24,lo8(-(1))
134 002c 8F73 andi r24,lo8(63)
135 002e 8093 0000 sts UIMgr_txFifoHead,r24
136 .stabn 68,0,555,.LM6-UIMgr_writeBufferToTxFifo
137 .LM6:
138 0032 2150 subi r18,lo8(-(-1))
139 0034 6217 cp r22,r18
140 0036 91F7 brne .L6
141 .L4:
562:UIMgr.c **** }
563:UIMgr.c **** ENABLE_INTS();
142 .stabn 68,0,563,.LM7-UIMgr_writeBufferToTxFifo
143 .LM7:
144 /* #APP */
145 0038 7894 sei
146 /* #NOAPP */
147 .L7:
148 003a 0895 ret
149 /* epilogue: frame size=0 */
150 /* epilogue: noreturn */
151 /* epilogue end (size=0) */
152 /* function UIMgr_writeBufferToTxFifo size 32 (32) */
153 .size UIMgr_writeBufferToTxFifo, .-UIMgr_writeBufferToTxFifo
154 .Lscope0:
155 .stabs "",36,0,0,.Lscope0-UIMgr_writeBufferToTxFifo
156 .stabd 78,0,0
157 .stabs "UIMgr_readTxFifo:f(0,11)",36,0,630,UIMgr_readTxFifo
158 .type UIMgr_readTxFifo, @function
159 UIMgr_readTxFifo:
160 .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 **** }
GAS LISTING /tmp/ccRvT1Qm.s page 14
582:UIMgr.c ****
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 **** {
161 .stabn 68,0,630,.LM8-UIMgr_readTxFifo
162 .LM8:
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/ccRvT1Qm.s page 15
165 .stabn 68,0,634,.LM9-UIMgr_readTxFifo
166 .LM9:
167 /* #APP */
168 003c F894 cli
635:UIMgr.c **** dataByte = UIMgr_txFifo[UIMgr_txFifoTail];
169 .stabn 68,0,635,.LM10-UIMgr_readTxFifo
170 .LM10:
171 /* #NOAPP */
172 003e 9091 0000 lds r25,UIMgr_txFifoTail
173 0042 E0E0 ldi r30,lo8(UIMgr_txFifo)
174 0044 F0E0 ldi r31,hi8(UIMgr_txFifo)
175 0046 E90F add r30,r25
176 0048 F11D adc r31,__zero_reg__
177 004a 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-UIMgr_readTxFifo
179 .LM11:
180 004c 9F5F subi r25,lo8(-(1))
181 004e 9F73 andi r25,lo8(63)
182 0050 9093 0000 sts UIMgr_txFifoTail,r25
638:UIMgr.c **** ENABLE_INTS();
183 .stabn 68,0,638,.LM12-UIMgr_readTxFifo
184 .LM12:
185 /* #APP */
186 0054 7894 sei
639:UIMgr.c ****
640:UIMgr.c **** return(dataByte);
641:UIMgr.c **** }
187 .stabn 68,0,641,.LM13-UIMgr_readTxFifo
188 .LM13:
189 /* #NOAPP */
190 0056 9927 clr r25
191 /* epilogue: frame size=0 */
192 0058 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,UIMgr_readTxFifo-UIMgr_readTxFifo
198 .stabn 224,0,0,.Lscope1-UIMgr_readTxFifo
199 .Lscope1:
200 .stabs "",36,0,0,.Lscope1-UIMgr_readTxFifo
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/ccRvT1Qm.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-UIMgr_writeTxFifo
209 .LM14:
210 /* prologue: frame size=0 */
211 /* prologue end (size=0) */
653:UIMgr.c **** unsigned char tmpHead;
654:UIMgr.c ****
655:UIMgr.c **** DISABLE_INTS();
212 .stabn 68,0,655,.LM15-UIMgr_writeTxFifo
213 .LM15:
214 /* #APP */
215 005a F894 cli
656:UIMgr.c **** UIMgr_txFifo[UIMgr_txFifoHead] = data;
216 .stabn 68,0,656,.LM16-UIMgr_writeTxFifo
217 .LM16:
218 /* #NOAPP */
219 005c 9091 0000 lds r25,UIMgr_txFifoHead
220 0060 E0E0 ldi r30,lo8(UIMgr_txFifo)
221 0062 F0E0 ldi r31,hi8(UIMgr_txFifo)
222 0064 E90F add r30,r25
223 0066 F11D adc r31,__zero_reg__
224 0068 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;
225 .stabn 68,0,660,.LM17-UIMgr_writeTxFifo
226 .LM17:
227 006a 9F5F subi r25,lo8(-(1))
228 006c 9F73 andi r25,lo8(63)
229 006e 9093 0000 sts UIMgr_txFifoHead,r25
661:UIMgr.c **** ENABLE_INTS();
230 .stabn 68,0,661,.LM18-UIMgr_writeTxFifo
231 .LM18:
232 /* #APP */
233 0072 7894 sei
234 /* #NOAPP */
235 /* epilogue: frame size=0 */
236 0074 0895 ret
237 /* epilogue end (size=1) */
238 /* function UIMgr_writeTxFifo size 16 (15) */
239 .size UIMgr_writeTxFifo, .-UIMgr_writeTxFifo
240 .Lscope2:
241 .stabs "",36,0,0,.Lscope2-UIMgr_writeTxFifo
242 .stabd 78,0,0
243 .stabs "UIMgr_flushTxBuffer:F(0,15)",36,0,592,UIMgr_flushTxBuffer
244 .global UIMgr_flushTxBuffer
245 .type UIMgr_flushTxBuffer, @function
246 UIMgr_flushTxBuffer:
247 .stabd 46,0,0
248 .stabn 68,0,592,.LM19-UIMgr_flushTxBuffer
249 .LM19:
250 /* prologue: frame size=0 */
251 /* prologue end (size=0) */
GAS LISTING /tmp/ccRvT1Qm.s page 17
252 .stabn 68,0,593,.LM20-UIMgr_flushTxBuffer
253 .LM20:
254 0076 9091 0000 lds r25,UIMgr_txFifoHead
255 007a 8091 0000 lds r24,UIMgr_txFifoTail
256 007e 9817 cp r25,r24
257 0080 41F0 breq .L16
258 .L17:
259 .stabn 68,0,595,.LM21-UIMgr_flushTxBuffer
260 .LM21:
261 0082 DCDF rcall UIMgr_readTxFifo
262 0084 00D0 rcall UartInt_txByte
263 .stabn 68,0,593,.LM22-UIMgr_flushTxBuffer
264 .LM22:
265 0086 9091 0000 lds r25,UIMgr_txFifoHead
266 008a 8091 0000 lds r24,UIMgr_txFifoTail
267 008e 9817 cp r25,r24
268 0090 C1F7 brne .L17
269 .L16:
270 0092 0895 ret
271 /* epilogue: frame size=0 */
272 /* epilogue: noreturn */
273 /* epilogue end (size=0) */
274 /* function UIMgr_flushTxBuffer size 15 (15) */
275 .size UIMgr_flushTxBuffer, .-UIMgr_flushTxBuffer
276 .Lscope3:
277 .stabs "",36,0,0,.Lscope3-UIMgr_flushTxBuffer
278 .stabd 78,0,0
279 .stabs "UIMgr_txBuffer:F(0,15)",36,0,576,UIMgr_txBuffer
280 .stabs "pData:P(0,20)",64,0,575,28
281 .stabs "length:P(0,11)",64,0,575,24
282 .global UIMgr_txBuffer
283 .type UIMgr_txBuffer, @function
284 UIMgr_txBuffer:
285 .stabd 46,0,0
286 .stabn 68,0,576,.LM23-UIMgr_txBuffer
287 .LM23:
288 /* prologue: frame size=0 */
289 0094 0F93 push r16
290 0096 1F93 push r17
291 0098 CF93 push r28
292 009a DF93 push r29
293 /* prologue end (size=4) */
294 009c EC01 movw r28,r24
295 009e 862F mov r24,r22
296 .stabn 68,0,577,.LM24-UIMgr_txBuffer
297 .LM24:
298 00a0 6150 subi r22,lo8(-(-1))
299 00a2 6F3F cpi r22,lo8(-1)
300 00a4 49F0 breq .L23
301 .stabn 68,0,577,.LM25-UIMgr_txBuffer
302 .LM25:
303 00a6 162F mov r17,r22
304 00a8 861B sub r24,r22
305 00aa 082F mov r16,r24
306 00ac 0250 subi r16,lo8(-(-2))
307 .L22:
308 .stabn 68,0,579,.LM26-UIMgr_txBuffer
GAS LISTING /tmp/ccRvT1Qm.s page 18
309 .LM26:
310 00ae 8991 ld r24,Y+
311 00b0 00D0 rcall UartInt_txByte
312 .stabn 68,0,577,.LM27-UIMgr_txBuffer
313 .LM27:
314 00b2 1150 subi r17,lo8(-(-1))
315 00b4 0117 cp r16,r17
316 00b6 D9F7 brne .L22
317 .L23:
318 /* epilogue: frame size=0 */
319 00b8 DF91 pop r29
320 00ba CF91 pop r28
321 00bc 1F91 pop r17
322 00be 0F91 pop r16
323 00c0 0895 ret
324 /* epilogue end (size=5) */
325 /* function UIMgr_txBuffer size 23 (14) */
326 .size UIMgr_txBuffer, .-UIMgr_txBuffer
327 .Lscope4:
328 .stabs "",36,0,0,.Lscope4-UIMgr_txBuffer
329 .stabd 78,0,0
330 .stabs "UIMgr_transmitPendingData:F(0,15)",36,0,178,UIMgr_transmitPendingData
331 .global UIMgr_transmitPendingData
332 .type UIMgr_transmitPendingData, @function
333 UIMgr_transmitPendingData:
334 .stabd 46,0,0
335 .stabn 68,0,178,.LM28-UIMgr_transmitPendingData
336 .LM28:
337 /* prologue: frame size=0 */
338 /* prologue end (size=0) */
339 .stabn 68,0,179,.LM29-UIMgr_transmitPendingData
340 .LM29:
341 00c2 9091 0000 lds r25,UIMgr_txFifoHead
342 00c6 8091 0000 lds r24,UIMgr_txFifoTail
343 00ca 9817 cp r25,r24
344 00cc 11F0 breq .L28
345 .stabn 68,0,182,.LM30-UIMgr_transmitPendingData
346 .LM30:
347 00ce B6DF rcall UIMgr_readTxFifo
348 00d0 00D0 rcall UartInt_txByte
349 .L28:
350 00d2 0895 ret
351 /* epilogue: frame size=0 */
352 /* epilogue: noreturn */
353 /* epilogue end (size=0) */
354 /* function UIMgr_transmitPendingData size 9 (9) */
355 .size UIMgr_transmitPendingData, .-UIMgr_transmitPendingData
356 .Lscope5:
357 .stabs "",36,0,0,.Lscope5-UIMgr_transmitPendingData
358 .stabd 78,0,0
359 .stabs "UIMgr_convertTokenToCmd:f(0,15)",36,0,450,UIMgr_convertTokenToCmd
360 .type UIMgr_convertTokenToCmd, @function
361 UIMgr_convertTokenToCmd:
362 .stabd 46,0,0
363 .stabn 68,0,450,.LM31-UIMgr_convertTokenToCmd
364 .LM31:
365 /* prologue: frame size=0 */
GAS LISTING /tmp/ccRvT1Qm.s page 19
366 /* prologue end (size=0) */
367 .stabn 68,0,451,.LM32-UIMgr_convertTokenToCmd
368 .LM32:
369 00d4 9091 0000 lds r25,asciiTokenBuffer
370 00d8 9035 cpi r25,lo8(80)
371 00da 41F4 brne .L30
372 .stabn 68,0,451,.LM33-UIMgr_convertTokenToCmd
373 .LM33:
374 00dc 8091 0000 lds r24,asciiTokenBuffer+1
375 00e0 8734 cpi r24,lo8(71)
376 00e2 09F5 brne .L32
377 .stabn 68,0,456,.LM34-UIMgr_convertTokenToCmd
378 .LM34:
379 00e4 81E0 ldi r24,lo8(1)
380 00e6 8093 0000 sts receivedCmd,r24
381 00ea 48C0 rjmp .L34
382 .L30:
383 .stabn 68,0,458,.LM35-UIMgr_convertTokenToCmd
384 .LM35:
385 00ec 9734 cpi r25,lo8(71)
386 00ee 39F4 brne .L35
387 00f0 8091 0000 lds r24,asciiTokenBuffer+1
388 00f4 8635 cpi r24,lo8(86)
389 00f6 09F5 brne .L37
390 .stabn 68,0,462,.LM36-UIMgr_convertTokenToCmd
391 .LM36:
392 00f8 1092 0000 sts receivedCmd,__zero_reg__
393 00fc 3FC0 rjmp .L34
394 .L35:
395 .stabn 68,0,464,.LM37-UIMgr_convertTokenToCmd
396 .LM37:
397 00fe 9434 cpi r25,lo8(68)
398 0100 41F4 brne .L39
399 0102 8091 0000 lds r24,asciiTokenBuffer+1
400 0106 8634 cpi r24,lo8(70)
401 0108 11F5 brne .L41
402 .stabn 68,0,468,.LM38-UIMgr_convertTokenToCmd
403 .LM38:
404 010a 83E0 ldi r24,lo8(3)
405 010c 8093 0000 sts receivedCmd,r24
406 0110 35C0 rjmp .L34
407 .L39:
408 .stabn 68,0,470,.LM39-UIMgr_convertTokenToCmd
409 .LM39:
410 0112 9334 cpi r25,lo8(67)
411 0114 41F4 brne .L32
412 0116 8091 0000 lds r24,asciiTokenBuffer+1
413 011a 8235 cpi r24,lo8(82)
414 011c 11F5 brne .L44
415 .stabn 68,0,474,.LM40-UIMgr_convertTokenToCmd
416 .LM40:
417 011e 82E0 ldi r24,lo8(2)
418 0120 8093 0000 sts receivedCmd,r24
419 0124 2BC0 rjmp .L34
420 .L32:
421 .stabn 68,0,476,.LM41-UIMgr_convertTokenToCmd
422 .LM41:
GAS LISTING /tmp/ccRvT1Qm.s page 20
423 0126 9534 cpi r25,lo8(69)
424 0128 41F4 brne .L37
425 012a 8091 0000 lds r24,asciiTokenBuffer+1
426 012e 8435 cpi r24,lo8(84)
427 0130 11F5 brne .L47
428 .stabn 68,0,480,.LM42-UIMgr_convertTokenToCmd
429 .LM42:
430 0132 84E0 ldi r24,lo8(4)
431 0134 8093 0000 sts receivedCmd,r24
432 0138 21C0 rjmp .L34
433 .L37:
434 .stabn 68,0,482,.LM43-UIMgr_convertTokenToCmd
435 .LM43:
436 013a 9335 cpi r25,lo8(83)
437 013c 41F4 brne .L41
438 013e 8091 0000 lds r24,asciiTokenBuffer+1
439 0142 8D34 cpi r24,lo8(77)
440 0144 C1F4 brne .L47
441 .stabn 68,0,486,.LM44-UIMgr_convertTokenToCmd
442 .LM44:
443 0146 86E0 ldi r24,lo8(6)
444 0148 8093 0000 sts receivedCmd,r24
445 014c 17C0 rjmp .L34
446 .L41:
447 .stabn 68,0,488,.LM45-UIMgr_convertTokenToCmd
448 .LM45:
449 014e 9434 cpi r25,lo8(68)
450 0150 41F4 brne .L44
451 0152 8091 0000 lds r24,asciiTokenBuffer+1
452 0156 8435 cpi r24,lo8(84)
453 0158 71F4 brne .L47
454 .stabn 68,0,491,.LM46-UIMgr_convertTokenToCmd
455 .LM46:
456 015a 85E0 ldi r24,lo8(5)
457 015c 8093 0000 sts receivedCmd,r24
458 0160 0DC0 rjmp .L34
459 .L44:
460 .stabn 68,0,493,.LM47-UIMgr_convertTokenToCmd
461 .LM47:
462 0162 9235 cpi r25,lo8(82)
463 0164 41F4 brne .L47
464 0166 8091 0000 lds r24,asciiTokenBuffer+1
465 016a 8335 cpi r24,lo8(83)
466 016c 21F4 brne .L47
467 .stabn 68,0,496,.LM48-UIMgr_convertTokenToCmd
468 .LM48:
469 016e 87E0 ldi r24,lo8(7)
470 0170 8093 0000 sts receivedCmd,r24
471 0174 03C0 rjmp .L34
472 .L47:
473 .stabn 68,0,501,.LM49-UIMgr_convertTokenToCmd
474 .LM49:
475 0176 89E0 ldi r24,lo8(9)
476 0178 8093 0000 sts receivedCmd,r24
477 .L34:
478 .stabn 68,0,503,.LM50-UIMgr_convertTokenToCmd
479 .LM50:
GAS LISTING /tmp/ccRvT1Qm.s page 21
480 017c 83E0 ldi r24,lo8(3)
481 017e E0E0 ldi r30,lo8(asciiTokenBuffer)
482 0180 F0E0 ldi r31,hi8(asciiTokenBuffer)
483 0182 1192 st Z+,__zero_reg__
484 0184 8A95 dec r24
485 0186 E9F7 brne .-6
486 .stabn 68,0,504,.LM51-UIMgr_convertTokenToCmd
487 .LM51:
488 0188 1092 0000 sts charIndex,__zero_reg__
489 .stabn 68,0,505,.LM52-UIMgr_convertTokenToCmd
490 .LM52:
491 018c 1092 0000 sts charCount,__zero_reg__
492 /* epilogue: frame size=0 */
493 0190 0895 ret
494 /* epilogue end (size=1) */
495 /* function UIMgr_convertTokenToCmd size 95 (94) */
496 .size UIMgr_convertTokenToCmd, .-UIMgr_convertTokenToCmd
497 .Lscope6:
498 .stabs "",36,0,0,.Lscope6-UIMgr_convertTokenToCmd
499 .stabd 78,0,0
500 .stabs "UIMgr_init:F(0,15)",36,0,137,UIMgr_init
501 .global UIMgr_init
502 .type UIMgr_init, @function
503 UIMgr_init:
504 .stabd 46,0,0
505 .stabn 68,0,137,.LM53-UIMgr_init
506 .LM53:
507 /* prologue: frame size=0 */
508 /* prologue end (size=0) */
509 .stabn 68,0,138,.LM54-UIMgr_init
510 .LM54:
511 0192 1092 0000 sts asciiTokenBuffer,__zero_reg__
512 0196 1092 0000 sts (asciiTokenBuffer)+1,__zero_reg__
513 019a 1092 0000 sts (asciiTokenBuffer)+2,__zero_reg__
514 019e 1092 0000 sts (asciiTokenBuffer)+3,__zero_reg__
515 .stabn 68,0,139,.LM55-UIMgr_init
516 .LM55:
517 01a2 80E4 ldi r24,lo8(64)
518 01a4 E0E0 ldi r30,lo8(tokenBuffer)
519 01a6 F0E0 ldi r31,hi8(tokenBuffer)
520 01a8 982F mov r25,r24
521 01aa 1192 st Z+,__zero_reg__
522 01ac 9A95 dec r25
523 01ae E9F7 brne .-6
524 .stabn 68,0,140,.LM56-UIMgr_init
525 .LM56:
526 01b0 E0E0 ldi r30,lo8(UIMgr_txFifo)
527 01b2 F0E0 ldi r31,hi8(UIMgr_txFifo)
528 01b4 1192 st Z+,__zero_reg__
529 01b6 8A95 dec r24
530 01b8 E9F7 brne .-6
531 .stabn 68,0,141,.LM57-UIMgr_init
532 .LM57:
533 01ba 80E2 ldi r24,lo8(32)
534 01bc E0E0 ldi r30,lo8(UIMgr_rxFifo)
535 01be F0E0 ldi r31,hi8(UIMgr_rxFifo)
536 01c0 1192 st Z+,__zero_reg__
GAS LISTING /tmp/ccRvT1Qm.s page 22
537 01c2 8A95 dec r24
538 01c4 E9F7 brne .-6
539 /* epilogue: frame size=0 */
540 01c6 0895 ret
541 /* epilogue end (size=1) */
542 /* function UIMgr_init size 27 (26) */
543 .size UIMgr_init, .-UIMgr_init
544 .Lscope7:
545 .stabs "",36,0,0,.Lscope7-UIMgr_init
546 .stabd 78,0,0
547 .stabs "UIMgr_convertTokenToValue:f(0,15)",36,0,422,UIMgr_convertTokenToValue
548 .type UIMgr_convertTokenToValue, @function
549 UIMgr_convertTokenToValue:
550 .stabd 46,0,0
551 .stabn 68,0,422,.LM58-UIMgr_convertTokenToValue
552 .LM58:
553 /* prologue: frame size=0 */
554 /* prologue end (size=0) */
555 .stabn 68,0,425,.LM59-UIMgr_convertTokenToValue
556 .LM59:
557 01c8 80E0 ldi r24,lo8(asciiTokenBuffer)
558 01ca 90E0 ldi r25,hi8(asciiTokenBuffer)
559 01cc 00D0 rcall atoi
560 01ce 9C01 movw r18,r24
561 .stabn 68,0,426,.LM60-UIMgr_convertTokenToValue
562 .LM60:
563 01d0 8F3F cpi r24,255
564 01d2 9105 cpc r25,__zero_reg__
565 01d4 69F0 breq .L59
566 01d6 60F0 brlo .L59
567 .stabn 68,0,429,.LM61-UIMgr_convertTokenToValue
568 .LM61:
569 01d8 89E0 ldi r24,lo8(9)
570 01da 8093 0000 sts receivedCmd,r24
571 .stabn 68,0,430,.LM62-UIMgr_convertTokenToValue
572 .LM62:
573 01de 8091 0000 lds r24,tokenCount
574 01e2 E0E0 ldi r30,lo8(tokenBuffer)
575 01e4 F0E0 ldi r31,hi8(tokenBuffer)
576 01e6 E80F add r30,r24
577 01e8 F11D adc r31,__zero_reg__
578 01ea 8FEF ldi r24,lo8(-1)
579 01ec 8083 st Z,r24
580 01ee 07C0 rjmp .L61
581 .L59:
582 .stabn 68,0,435,.LM63-UIMgr_convertTokenToValue
583 .LM63:
584 01f0 8091 0000 lds r24,tokenCount
585 01f4 E0E0 ldi r30,lo8(tokenBuffer)
586 01f6 F0E0 ldi r31,hi8(tokenBuffer)
587 01f8 E80F add r30,r24
588 01fa F11D adc r31,__zero_reg__
589 01fc 2083 st Z,r18
590 .L61:
591 .stabn 68,0,437,.LM64-UIMgr_convertTokenToValue
592 .LM64:
593 01fe 83E0 ldi r24,lo8(3)
GAS LISTING /tmp/ccRvT1Qm.s page 23
594 0200 E0E0 ldi r30,lo8(asciiTokenBuffer)
595 0202 F0E0 ldi r31,hi8(asciiTokenBuffer)
596 0204 1192 st Z+,__zero_reg__
597 0206 8A95 dec r24
598 0208 E9F7 brne .-6
599 .stabn 68,0,438,.LM65-UIMgr_convertTokenToValue
600 .LM65:
601 020a 1092 0000 sts charIndex,__zero_reg__
602 .stabn 68,0,439,.LM66-UIMgr_convertTokenToValue
603 .LM66:
604 020e 1092 0000 sts charCount,__zero_reg__
605 /* epilogue: frame size=0 */
606 0212 0895 ret
607 /* epilogue end (size=1) */
608 /* function UIMgr_convertTokenToValue size 38 (37) */
609 .size UIMgr_convertTokenToValue, .-UIMgr_convertTokenToValue
610 .stabs "newValue:r(0,4)",64,0,423,18
611 .stabn 192,0,0,UIMgr_convertTokenToValue-UIMgr_convertTokenToValue
612 .stabn 224,0,0,.Lscope8-UIMgr_convertTokenToValue
613 .Lscope8:
614 .stabs "",36,0,0,.Lscope8-UIMgr_convertTokenToValue
615 .stabd 78,0,0
616 .stabs "UIMgr_processReceivedData:F(0,15)",36,0,193,UIMgr_processReceivedData
617 .global UIMgr_processReceivedData
618 .type UIMgr_processReceivedData, @function
619 UIMgr_processReceivedData:
620 .stabd 46,0,0
621 .stabn 68,0,193,.LM67-UIMgr_processReceivedData
622 .LM67:
623 /* prologue: frame size=0 */
624 0214 FF92 push r15
625 0216 0F93 push r16
626 0218 1F93 push r17
627 021a CF93 push r28
628 021c DF93 push r29
629 /* prologue end (size=5) */
630 021e 0F2E mov __tmp_reg__,r31
631 0220 F9E0 ldi r31,lo8(9)
632 0222 FF2E mov r15,r31
633 0224 F02D mov r31,__tmp_reg__
634 0226 FFC0 rjmp .L119
635 .L65:
636 .LBB22:
637 .LBB23:
638 .stabn 68,0,612,.LM68-UIMgr_processReceivedData
639 .LM68:
640 /* #APP */
641 0228 F894 cli
642 .stabn 68,0,613,.LM69-UIMgr_processReceivedData
643 .LM69:
644 /* #NOAPP */
645 022a E22F mov r30,r18
646 022c FF27 clr r31
647 022e E050 subi r30,lo8(-(UIMgr_rxFifo))
648 0230 F040 sbci r31,hi8(-(UIMgr_rxFifo))
649 0232 9081 ld r25,Z
650 .stabn 68,0,615,.LM70-UIMgr_processReceivedData
GAS LISTING /tmp/ccRvT1Qm.s page 24
651 .LM70:
652 0234 822F mov r24,r18
653 0236 8F5F subi r24,lo8(-(1))
654 0238 8F71 andi r24,lo8(31)
655 023a 8093 0000 sts UIMgr_rxFifoTail,r24
656 .stabn 68,0,616,.LM71-UIMgr_processReceivedData
657 .LM71:
658 /* #APP */
659 023e 7894 sei
660 /* #NOAPP */
661 .LBE23:
662 .LBE22:
663 .stabn 68,0,202,.LM72-UIMgr_processReceivedData
664 .LM72:
665 0240 9D30 cpi r25,lo8(13)
666 0242 09F0 breq .+2
667 0244 B1C0 rjmp .L66
668 .stabn 68,0,205,.LM73-UIMgr_processReceivedData
669 .LM73:
670 0246 8091 0000 lds r24,tokenCount
671 024a 8823 tst r24
672 024c 11F4 brne .L68
673 .stabn 68,0,208,.LM74-UIMgr_processReceivedData
674 .LM74:
675 024e 42DF rcall UIMgr_convertTokenToCmd
676 0250 06C0 rjmp .L70
677 .L68:
678 .stabn 68,0,213,.LM75-UIMgr_processReceivedData
679 .LM75:
680 0252 BADF rcall UIMgr_convertTokenToValue
681 .stabn 68,0,214,.LM76-UIMgr_processReceivedData
682 .LM76:
683 0254 8091 0000 lds r24,tokenCount
684 0258 8F5F subi r24,lo8(-(1))
685 025a 8093 0000 sts tokenCount,r24
686 .L70:
687 .stabn 68,0,218,.LM77-UIMgr_processReceivedData
688 .LM77:
689 025e 84E6 ldi r24,lo8(100)
690 0260 90E0 ldi r25,hi8(100)
691 0262 00D0 rcall Utility_delay
692 .stabn 68,0,219,.LM78-UIMgr_processReceivedData
693 .LM78:
694 0264 8091 0000 lds r24,receivedCmd
695 0268 8850 subi r24,lo8(-(-8))
696 026a 8230 cpi r24,lo8(2)
697 026c 58F4 brsh .L71
698 .LBB24:
699 .LBB25:
700 .stabn 68,0,531,.LM79-UIMgr_processReceivedData
701 .LM79:
702 026e 8EE4 ldi r24,lo8(78)
703 0270 F4DE rcall UIMgr_writeTxFifo
704 .stabn 68,0,532,.LM80-UIMgr_processReceivedData
705 .LM80:
706 0272 83E4 ldi r24,lo8(67)
707 0274 F2DE rcall UIMgr_writeTxFifo
GAS LISTING /tmp/ccRvT1Qm.s page 25
708 .stabn 68,0,533,.LM81-UIMgr_processReceivedData
709 .LM81:
710 0276 8BE4 ldi r24,lo8(75)
711 0278 F0DE rcall UIMgr_writeTxFifo
712 .stabn 68,0,534,.LM82-UIMgr_processReceivedData
713 .LM82:
714 027a 8DE0 ldi r24,lo8(13)
715 027c EEDE rcall UIMgr_writeTxFifo
716 .LBE25:
717 .LBE24:
718 .stabn 68,0,223,.LM83-UIMgr_processReceivedData
719 .LM83:
720 027e 80E9 ldi r24,lo8(-112)
721 0280 00D0 rcall Exec_writeEventFifo
722 0282 89C0 rjmp .L73
723 .L71:
724 .LBB26:
725 .LBB27:
726 .stabn 68,0,516,.LM84-UIMgr_processReceivedData
727 .LM84:
728 0284 81E4 ldi r24,lo8(65)
729 0286 E9DE rcall UIMgr_writeTxFifo
730 .stabn 68,0,517,.LM85-UIMgr_processReceivedData
731 .LM85:
732 0288 83E4 ldi r24,lo8(67)
733 028a E7DE rcall UIMgr_writeTxFifo
734 .stabn 68,0,518,.LM86-UIMgr_processReceivedData
735 .LM86:
736 028c 8BE4 ldi r24,lo8(75)
737 028e E5DE rcall UIMgr_writeTxFifo
738 .stabn 68,0,519,.LM87-UIMgr_processReceivedData
739 .LM87:
740 0290 8DE0 ldi r24,lo8(13)
741 0292 E3DE rcall UIMgr_writeTxFifo
742 .LBE27:
743 .LBE26:
744 .stabn 68,0,230,.LM88-UIMgr_processReceivedData
745 .LM88:
746 0294 80E9 ldi r24,lo8(-112)
747 0296 00D0 rcall Exec_writeEventFifo
748 .LBB28:
749 .LBB29:
750 .stabn 68,0,316,.LM89-UIMgr_processReceivedData
751 .LM89:
752 0298 8091 0000 lds r24,receivedCmd
753 029c 8130 cpi r24,lo8(1)
754 029e 09F4 brne .+2
755 02a0 7AC0 rjmp .L73
756 .stabn 68,0,319,.LM90-UIMgr_processReceivedData
757 .LM90:
758 02a2 8823 tst r24
759 02a4 71F4 brne .L75
760 .stabn 68,0,322,.LM91-UIMgr_processReceivedData
761 .LM91:
762 02a6 8091 0000 lds r24,AVRcamVersion
763 02aa 8823 tst r24
764 02ac 09F4 brne .+2
GAS LISTING /tmp/ccRvT1Qm.s page 26
765 02ae 73C0 rjmp .L73
766 02b0 C0E0 ldi r28,lo8(AVRcamVersion)
767 02b2 D0E0 ldi r29,hi8(AVRcamVersion)
768 .L78:
769 .stabn 68,0,324,.LM92-UIMgr_processReceivedData
770 .LM92:
771 02b4 2196 adiw r28,1
772 02b6 D1DE rcall UIMgr_writeTxFifo
773 .stabn 68,0,322,.LM93-UIMgr_processReceivedData
774 .LM93:
775 02b8 8881 ld r24,Y
776 02ba 8823 tst r24
777 02bc 09F4 brne .+2
778 02be 6BC0 rjmp .L73
779 02c0 F9CF rjmp .L78
780 .L75:
781 .stabn 68,0,327,.LM94-UIMgr_processReceivedData
782 .LM94:
783 02c2 8730 cpi r24,lo8(7)
784 02c4 11F4 brne .L79
785 .stabn 68,0,329,.LM95-UIMgr_processReceivedData
786 .LM95:
787 02c6 00D0 rcall CamInt_resetCam
788 02c8 66C0 rjmp .L73
789 .L79:
790 .stabn 68,0,331,.LM96-UIMgr_processReceivedData
791 .LM96:
792 02ca 8330 cpi r24,lo8(3)
793 02cc 31F4 brne .L81
794 .stabn 68,0,340,.LM97-UIMgr_processReceivedData
795 .LM97:
796 02ce 84E6 ldi r24,lo8(100)
797 02d0 90E0 ldi r25,hi8(100)
798 02d2 00D0 rcall Utility_delay
799 .stabn 68,0,341,.LM98-UIMgr_processReceivedData
800 .LM98:
801 02d4 82E0 ldi r24,lo8(2)
802 02d6 00D0 rcall Exec_writeEventFifo
803 02d8 5EC0 rjmp .L73
804 .L81:
805 .stabn 68,0,343,.LM99-UIMgr_processReceivedData
806 .LM99:
807 02da 8230 cpi r24,lo8(2)
808 02dc 99F4 brne .L83
809 .stabn 68,0,347,.LM100-UIMgr_processReceivedData
810 .LM100:
811 02de 8091 0000 lds r24,tokenCount
812 02e2 8230 cpi r24,lo8(2)
813 02e4 68F0 brlo .L85
814 02e6 11E0 ldi r17,lo8(1)
815 .L87:
816 .stabn 68,0,350,.LM101-UIMgr_processReceivedData
817 .LM101:
818 02e8 E12F mov r30,r17
819 02ea FF27 clr r31
820 02ec E050 subi r30,lo8(-(tokenBuffer))
821 02ee F040 sbci r31,hi8(-(tokenBuffer))
GAS LISTING /tmp/ccRvT1Qm.s page 27
822 02f0 6181 ldd r22,Z+1
823 02f2 8081 ld r24,Z
824 02f4 00D0 rcall CamConfig_setCamReg
825 .stabn 68,0,347,.LM102-UIMgr_processReceivedData
826 .LM102:
827 02f6 1E5F subi r17,lo8(-(2))
828 02f8 8091 0000 lds r24,tokenCount
829 02fc 1817 cp r17,r24
830 02fe A0F3 brlo .L87
831 .L85:
832 .stabn 68,0,352,.LM103-UIMgr_processReceivedData
833 .LM103:
834 0300 00D0 rcall CamConfig_sendFifoCmds
835 0302 49C0 rjmp .L73
836 .L83:
837 .stabn 68,0,354,.LM104-UIMgr_processReceivedData
838 .LM104:
839 0304 8430 cpi r24,lo8(4)
840 0306 31F4 brne .L88
841 .stabn 68,0,357,.LM105-UIMgr_processReceivedData
842 .LM105:
843 0308 84E6 ldi r24,lo8(100)
844 030a 90E0 ldi r25,hi8(100)
845 030c 00D0 rcall Utility_delay
846 .stabn 68,0,358,.LM106-UIMgr_processReceivedData
847 .LM106:
848 030e 80E8 ldi r24,lo8(-128)
849 0310 00D0 rcall Exec_writeEventFifo
850 0312 41C0 rjmp .L73
851 .L88:
852 .stabn 68,0,360,.LM107-UIMgr_processReceivedData
853 .LM107:
854 0314 8530 cpi r24,lo8(5)
855 0316 19F4 brne .L90
856 .stabn 68,0,362,.LM108-UIMgr_processReceivedData
857 .LM108:
858 0318 81E8 ldi r24,lo8(-127)
859 031a 00D0 rcall Exec_writeEventFifo
860 031c 3CC0 rjmp .L73
861 .L90:
862 .stabn 68,0,364,.LM109-UIMgr_processReceivedData
863 .LM109:
864 031e 8630 cpi r24,lo8(6)
865 0320 09F0 breq .+2
866 0322 39C0 rjmp .L73
867 .stabn 68,0,367,.LM110-UIMgr_processReceivedData
868 .LM110:
869 0324 8091 0000 lds r24,tokenCount
870 0328 8823 tst r24
871 032a 09F4 brne .+2
872 032c 34C0 rjmp .L73
873 032e 40E0 ldi r20,lo8(0)
874 0330 00E0 ldi r16,lo8(tokenBuffer)
875 0332 10E0 ldi r17,hi8(tokenBuffer)
876 0334 60E0 ldi r22,lo8(colorMap)
877 0336 70E0 ldi r23,hi8(colorMap)
878 .L94:
GAS LISTING /tmp/ccRvT1Qm.s page 28
879 .stabn 68,0,369,.LM111-UIMgr_processReceivedData
880 .LM111:
881 0338 842F mov r24,r20
882 033a 9927 clr r25
883 033c 9C01 movw r18,r24
884 033e 2F5F subi r18,lo8(-(1))
885 0340 3F4F sbci r19,hi8(-(1))
886 0342 F901 movw r30,r18
887 0344 E00F add r30,r16
888 0346 F11F adc r31,r17
889 0348 E081 ld r30,Z
890 034a EC01 movw r28,r24
891 034c C60F add r28,r22
892 034e D71F adc r29,r23
893 0350 E883 st Y,r30
894 .LBB30:
895 .LBB31:
896 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h",132,0,0,.Ltext1
897 .Ltext1:
1:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /* Copyright (c) 2002, 2003, 2004 Marek Michalkiewicz
2:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Copyright (c) 2005, 2006 Bjoern Haase
3:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** All rights reserved.
4:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
5:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Redistribution and use in source and binary forms, with or without
6:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** modification, are permitted provided that the following conditions are met:
7:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
8:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** * Redistributions of source code must retain the above copyright
9:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** notice, this list of conditions and the following disclaimer.
10:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
11:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** * Redistributions in binary form must reproduce the above copyright
12:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** notice, this list of conditions and the following disclaimer in
13:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** the documentation and/or other materials provided with the
14:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** distribution.
15:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
16:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** * Neither the name of the copyright holders nor the names of
17:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** contributors may be used to endorse or promote products derived
18:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** from this software without specific prior written permission.
19:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
20:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29:/usr/lib/gcc/avr/4.1.0/../../../../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.1.0/../../../../avr/include/avr/eeprom.h **** POSSIBILITY OF SUCH DAMAGE. */
31:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
32:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /* $Id: eeprom.h,v 1.17.2.1 2006/02/26 21:51:04 aesok Exp $ */
33:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
34:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /*
35:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** eeprom.h
36:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
37:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Contributors:
38:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Created by Marek Michalkiewicz <marekm@linux.org.pl>
GAS LISTING /tmp/ccRvT1Qm.s page 29
39:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** eeprom_write_word and eeprom_write_block added by Artur Lipowski
40:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** <LAL@pro.onet.pl>
41:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Complete rewrite using the original interface by Bjoern Haase
42:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** <bjoern.haase@de.bosch.com>.
43:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** */
44:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
45:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #ifndef _EEPROM_H_
46:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #define _EEPROM_H_ 1
47:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
48:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #define __need_size_t
49:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #include <stddef.h>
50:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #include <inttypes.h>
51:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
52:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
53:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #ifdef __AVR_MEGA__
54:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #define XCALL "call"
55:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #else
56:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #define XCALL "rcall"
57:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #endif
58:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
59:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #include <avr/io.h>
60:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #ifndef __EEPROM_REG_LOCATIONS__
61:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /** \def __EEPROM_REG_LOCATIONS__
62:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** \ingroup avr_eeprom
63:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** In order to be able to work without a requiring a multilib
64:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** approach for dealing with controllers having the EEPROM registers
65:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** at different positions in memory space, the eeprom functions evaluate
66:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** __EEPROM_REG_LOCATIONS__: It is assumed to be defined by
67:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** the device io header and contains 6 uppercase hex digits encoding the
68:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** addresses of EECR,EEDR and EEAR.
69:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** First two letters: EECR address.
70:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Second two letters: EEDR address.
71:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Last two letters: EEAR address.
72:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** The default 1C1D1E corresponds to the
73:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** register location that is valid for most controllers. The value
74:/usr/lib/gcc/avr/4.1.0/../../../../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.1.0/../../../../avr/include/avr/eeprom.h **** assembler functions. */
76:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #define __EEPROM_REG_LOCATIONS__ 1C1D1E
77:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #endif
78:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #define _STR2(EXP) _STR1(EXP)
79:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #define _STR1(EXP) #EXP
80:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #define _REG_LOCATION_SUFFIX _STR2(__EEPROM_REG_LOCATIONS__)
81:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
82:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #ifndef CR_TAB
83:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #define CR_TAB "\n\t"
84:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #endif
85:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
86:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
87:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /** \defgroup avr_eeprom <avr/eeprom.h>: EEPROM handling
88:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** \code #include <avr/eeprom.h> \endcode
89:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
90:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** This header file declares the interface to some simple library
91:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** routines suitable for handling the data EEPROM contained in the
92:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** AVR microcontrollers. The implementation uses a simple polled
93:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** mode interface. Applications that require interrupt-controlled
94:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** EEPROM access to ensure that no time will be wasted in spinloops
95:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** will have to deploy their own implementation.
GAS LISTING /tmp/ccRvT1Qm.s page 30
96:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
97:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** \note All of the read/write functions first make sure the EEPROM
98:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** is ready to be accessed. Since this may cause long delays if a
99:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** write operation is still pending, time-critical applications
100:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** should first poll the EEPROM e. g. using eeprom_is_ready() before
101:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** attempting any actual I/O.
102:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
103:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** \note This header file declares inline functions that call the
104:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** assembler subroutines directly. This prevents that the compiler
105:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** generates push/pops for the call-clobbered registers. This way
106:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** also a specific calling convention could be used for the eeprom
107:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** routines e.g. by passing values in __tmp_reg__, eeprom addresses in
108:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** X and memory addresses in Z registers. Method is optimized for code
109:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** size.
110:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
111:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** \note Presently supported are two locations of the EEPROM register
112:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** set: 0x1F,0x20,0x21 and 0x1C,0x1D,0x1E
113:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** (see ::__EEPROM_REG_LOCATIONS__).
114:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
115:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** \note As these functions modify IO registers, they are known to be
116:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** non-reentrant. If any of these functions are used from both,
117:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** standard and interrupt context, the applications must ensure
118:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** proper protection (e.g. by disabling interrupts before accessing
119:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** them).
120:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
121:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** */
122:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
123:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
124:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /* forward declarations of the inline functions so that doxygen does
125:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** not get confused by the attribute expression. */
126:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
127:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** static inline uint8_t __attribute__ ((always_inline))
128:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** eeprom_read_byte (const uint8_t *addr);
129:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
130:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** static inline uint16_t __attribute__ ((always_inline))
131:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** eeprom_read_word (const uint16_t *addr);
132:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
133:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** static inline void __attribute__ ((always_inline))
134:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** eeprom_read_block (void *pointer_ram,
135:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** const void *pointer_eeprom,
136:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** size_t size);
137:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
138:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** static inline void __attribute__ ((always_inline))
139:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** eeprom_write_byte (uint8_t *addr,uint8_t value);
140:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
141:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** static inline void __attribute__ ((always_inline))
142:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** eeprom_write_word (uint16_t *addr,uint16_t value);
143:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
144:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** static inline void __attribute__ ((always_inline))
145:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** eeprom_write_block (const void *pointer_ram,
146:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** void *pointer_eeprom,
147:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** size_t size);
148:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
149:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /** \name avr-libc declarations */
150:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
151:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /*@{*/
152:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
GAS LISTING /tmp/ccRvT1Qm.s page 31
153:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /** \def EEMEM
154:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** \ingroup avr_eeprom
155:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Attribute expression causing a variable to be allocated within the .eeprom
156:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** section. */
157:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #define EEMEM __attribute__((section(".eeprom")))
158:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
159:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /** \def eeprom_is_ready
160:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** \ingroup avr_eeprom
161:/usr/lib/gcc/avr/4.1.0/../../../../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.1.0/../../../../avr/include/avr/eeprom.h ****
163:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #if defined(__DOXYGEN__)
164:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** # define eeprom_is_ready()
165:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #elif defined(EEWE)
166:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** # define eeprom_is_ready() bit_is_clear(EECR, EEWE)
167:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #elif defined(EEPE)
168:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** # define eeprom_is_ready() bit_is_clear(EECR, EEPE)
169:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #elif defined(DEECR) && defined(EEL)
170:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** # define eeprom_is_ready() bit_is_clear(DEECR, EEL)
171:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #else
172:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** # error "No write enable bit known for this device's EEPROM."
173:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #endif
174:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
175:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /** \def eeprom_busy_wait
176:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** \ingroup avr_eeprom
177:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
178:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Loops until the eeprom is no longer busy.
179:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
180:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** \returns Nothing. */
181:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
182:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #define eeprom_busy_wait() do {} while (!eeprom_is_ready())
183:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
184:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
185:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /** \ingroup avr_eeprom
186:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Read one byte from EEPROM address \c addr. */
187:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
188:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** uint8_t
189:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** eeprom_read_byte (const uint8_t *addr)
190:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** {
191:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** uint8_t result;
192:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** asm volatile
898 .stabn 68,0,192,.LM112-UIMgr_processReceivedData
899 .LM112:
900 0352 D901 movw r26,r18
901 /* #APP */
902 0354 00D0 rcall __eeprom_read_byte_1C1D1E
903 0356 802D mov r24,__tmp_reg__
904 /* #NOAPP */
905 .LBE31:
906 .LBE30:
907 .stabs "UIMgr.c",132,0,0,.Ltext2
908 .Ltext2:
909 .stabn 68,0,374,.LM113-UIMgr_processReceivedData
910 .LM113:
911 0358 E817 cp r30,r24
912 035a C1F0 breq .L95
913 .LBB32:
914 .LBB33:
GAS LISTING /tmp/ccRvT1Qm.s page 32
915 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h",132,0,0,.Ltext3
916 .Ltext3:
193:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** ( XCALL " __eeprom_read_byte_" _REG_LOCATION_SUFFIX CR_TAB
194:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "mov %1,__tmp_reg__"
195:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** : "+x" (addr),
196:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "=r" (result)
197:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** : );
198:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** return result;
199:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** }
200:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
201:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /** \ingroup avr_eeprom
202:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Read one 16-bit word (little endian) from EEPROM address \c addr. */
203:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** uint16_t
204:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** eeprom_read_word (const uint16_t *addr)
205:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** {
206:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** uint16_t result;
207:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
208:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** asm (
209:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** XCALL " __eeprom_read_word_" _REG_LOCATION_SUFFIX CR_TAB
210:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** : "+x" (addr),
211:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "=z" (result)
212:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** : );
213:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** return result;
214:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** }
215:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
216:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /** \ingroup avr_eeprom
217:/usr/lib/gcc/avr/4.1.0/../../../../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.1.0/../../../../avr/include/avr/eeprom.h **** \c pointer_ram. For constant n <= 256 bytes a library function is used.
219:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** For block sizes unknown at compile time or block sizes > 256 an inline
220:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** loop is expanded. */
221:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
222:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** void
223:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** eeprom_read_block (void *pointer_ram,
224:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** const void *pointer_eeprom,
225:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** size_t n)
226:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** {
227:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** if (!__builtin_constant_p (n)
228:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** || n > 256)
229:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** {
230:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /* make sure size is a 16 bit variable. */
231:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** uint16_t size = n;
232:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
233:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** asm volatile (
234:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** ".%=_start:" CR_TAB
235:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "sbiw %2,1" CR_TAB
236:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "brlt .%=_finished" CR_TAB
237:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** XCALL " __eeprom_read_byte_" _REG_LOCATION_SUFFIX CR_TAB
238:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "st z+,__tmp_reg__" CR_TAB
239:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "rjmp .%=_start" CR_TAB
240:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** ".%=_finished:"
241:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** : "=x" (pointer_eeprom),
242:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "=z" (pointer_ram),
243:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "+w" (size)
244:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** : "x" (pointer_eeprom),
245:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "z" (pointer_ram)
246:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** : "memory");
247:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** }
GAS LISTING /tmp/ccRvT1Qm.s page 33
248:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** else
249:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** {
250:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** if (n != 0)
251:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** {
252:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** if (n == 256)
253:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** {
254:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** asm volatile (
255:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** XCALL " __eeprom_read_block_" _REG_LOCATION_SUFFIX
256:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** : "+x" (pointer_eeprom),
257:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "=z" (pointer_ram)
258:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** : "z" (pointer_ram)
259:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** : "memory");
260:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** }
261:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** else
262:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** {
263:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /* Needed in order to truncate to 8 bit. */
264:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** uint8_t len;
265:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** len = (uint8_t) n;
266:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
267:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** asm volatile (
268:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "mov __zero_reg__,%2" CR_TAB
269:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** XCALL " __eeprom_read_block_" _REG_LOCATION_SUFFIX
270:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** : "+x" (pointer_eeprom),
271:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "=z" (pointer_ram)
272:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** : "r" (len),
273:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "z" (pointer_ram)
274:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** : "memory");
275:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** }
276:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** }
277:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** }
278:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** }
279:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
280:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /** \ingroup avr_eeprom
281:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Write a byte \c value to EEPROM address \c addr. */
282:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h ****
283:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** void
284:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** eeprom_write_byte (uint8_t *addr,uint8_t value)
285:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** {
286:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** asm volatile (
917 .stabn 68,0,286,.LM114-UIMgr_processReceivedData
918 .LM114:
919 035c D901 movw r26,r18
920 /* #APP */
921 035e 0E2E mov __tmp_reg__,r30
922 0360 00D0 rcall __eeprom_write_byte_1C1D1E
923 /* #NOAPP */
924 .LBE33:
925 .LBE32:
926 .LBB34:
927 .LBB35:
928 .stabn 68,0,192,.LM115-UIMgr_processReceivedData
929 .LM115:
930 0362 D901 movw r26,r18
931 /* #APP */
932 0364 00D0 rcall __eeprom_read_byte_1C1D1E
933 0366 802D mov r24,__tmp_reg__
934 /* #NOAPP */
GAS LISTING /tmp/ccRvT1Qm.s page 34
935 .LBE35:
936 .LBE34:
937 .stabs "UIMgr.c",132,0,0,.Ltext4
938 .Ltext4:
939 .stabn 68,0,384,.LM116-UIMgr_processReceivedData
940 .LM116:
941 0368 9881 ld r25,Y
942 036a 9817 cp r25,r24
943 036c 79F0 breq .L95
944 .LBB36:
945 .LBB37:
946 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h",132,0,0,.Ltext5
947 .Ltext5:
948 .stabn 68,0,286,.LM117-UIMgr_processReceivedData
949 .LM117:
950 036e D901 movw r26,r18
951 /* #APP */
952 0370 092E mov __tmp_reg__,r25
953 0372 00D0 rcall __eeprom_write_byte_1C1D1E
954 /* #NOAPP */
955 .LBE37:
956 .LBE36:
957 .LBB38:
958 .LBB39:
959 .stabn 68,0,192,.LM118-UIMgr_processReceivedData
960 .LM118:
961 0374 D901 movw r26,r18
962 /* #APP */
963 0376 00D0 rcall __eeprom_read_byte_1C1D1E
964 0378 802D mov r24,__tmp_reg__
965 /* #NOAPP */
966 .LBE39:
967 .LBE38:
968 .stabs "UIMgr.c",132,0,0,.Ltext6
969 .Ltext6:
970 .stabn 68,0,384,.LM119-UIMgr_processReceivedData
971 .LM119:
972 037a 9881 ld r25,Y
973 037c 9817 cp r25,r24
974 037e 31F0 breq .L95
975 .LBB40:
976 .LBB41:
977 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h",132,0,0,.Ltext7
978 .Ltext7:
979 .stabn 68,0,286,.LM120-UIMgr_processReceivedData
980 .LM120:
981 0380 D901 movw r26,r18
982 /* #APP */
983 0382 092E mov __tmp_reg__,r25
984 0384 00D0 rcall __eeprom_write_byte_1C1D1E
985 /* #NOAPP */
986 .LBE41:
987 .LBE40:
988 .LBB42:
989 .LBB43:
990 .stabn 68,0,192,.LM121-UIMgr_processReceivedData
991 .LM121:
GAS LISTING /tmp/ccRvT1Qm.s page 35
992 0386 D901 movw r26,r18
993 /* #APP */
994 0388 00D0 rcall __eeprom_read_byte_1C1D1E
995 038a 802D mov r24,__tmp_reg__
996 /* #NOAPP */
997 .L95:
998 .LBE43:
999 .LBE42:
1000 .stabs "UIMgr.c",132,0,0,.Ltext8
1001 .Ltext8:
1002 .stabn 68,0,367,.LM122-UIMgr_processReceivedData
1003 .LM122:
1004 038c 4F5F subi r20,lo8(-(1))
1005 038e 8091 0000 lds r24,tokenCount
1006 0392 4817 cp r20,r24
1007 0394 88F2 brlo .L94
1008 .L73:
1009 .LBE29:
1010 .LBE28:
1011 .stabn 68,0,235,.LM123-UIMgr_processReceivedData
1012 .LM123:
1013 0396 1092 0000 sts tokenCount,__zero_reg__
1014 .stabn 68,0,236,.LM124-UIMgr_processReceivedData
1015 .LM124:
1016 039a 80E4 ldi r24,lo8(64)
1017 039c E0E0 ldi r30,lo8(tokenBuffer)
1018 039e F0E0 ldi r31,hi8(tokenBuffer)
1019 03a0 1192 st Z+,__zero_reg__
1020 03a2 8A95 dec r24
1021 03a4 E9F7 brne .-6
1022 03a6 3FC0 rjmp .L119
1023 .L66:
1024 .stabn 68,0,238,.LM125-UIMgr_processReceivedData
1025 .LM125:
1026 03a8 9032 cpi r25,lo8(32)
1027 03aa F1F4 brne .L99
1028 .stabn 68,0,241,.LM126-UIMgr_processReceivedData
1029 .LM126:
1030 03ac 8091 0000 lds r24,tokenCount
1031 03b0 8823 tst r24
1032 03b2 39F4 brne .L101
1033 .stabn 68,0,243,.LM127-UIMgr_processReceivedData
1034 .LM127:
1035 03b4 8FDE rcall UIMgr_convertTokenToCmd
1036 .stabn 68,0,244,.LM128-UIMgr_processReceivedData
1037 .LM128:
1038 03b6 8091 0000 lds r24,tokenCount
1039 03ba 8F5F subi r24,lo8(-(1))
1040 03bc 8093 0000 sts tokenCount,r24
1041 03c0 32C0 rjmp .L119
1042 .L101:
1043 .stabn 68,0,254,.LM129-UIMgr_processReceivedData
1044 .LM129:
1045 03c2 9927 clr r25
1046 03c4 CF97 sbiw r24,63
1047 03c6 4CF0 brlt .L103
1048 .stabn 68,0,259,.LM130-UIMgr_processReceivedData
GAS LISTING /tmp/ccRvT1Qm.s page 36
1049 .LM130:
1050 03c8 1092 0000 sts charCount,__zero_reg__
1051 .stabn 68,0,260,.LM131-UIMgr_processReceivedData
1052 .LM131:
1053 03cc 1092 0000 sts charIndex,__zero_reg__
1054 .stabn 68,0,261,.LM132-UIMgr_processReceivedData
1055 .LM132:
1056 03d0 1092 0000 sts tokenCount,__zero_reg__
1057 .stabn 68,0,262,.LM133-UIMgr_processReceivedData
1058 .LM133:
1059 03d4 F092 0000 sts receivedCmd,r15
1060 03d8 26C0 rjmp .L119
1061 .L103:
1062 .stabn 68,0,267,.LM134-UIMgr_processReceivedData
1063 .LM134:
1064 03da F6DE rcall UIMgr_convertTokenToValue
1065 .stabn 68,0,268,.LM135-UIMgr_processReceivedData
1066 .LM135:
1067 03dc 8091 0000 lds r24,tokenCount
1068 03e0 8F5F subi r24,lo8(-(1))
1069 03e2 8093 0000 sts tokenCount,r24
1070 03e6 1FC0 rjmp .L119
1071 .L99:
1072 .stabn 68,0,272,.LM136-UIMgr_processReceivedData
1073 .LM136:
1074 03e8 892F mov r24,r25
1075 03ea 8154 subi r24,lo8(-(-65))
1076 03ec 8A31 cpi r24,lo8(26)
1077 03ee 18F0 brlo .L105
1078 03f0 8F5E subi r24,lo8(-(17))
1079 03f2 8A30 cpi r24,lo8(10)
1080 03f4 B0F4 brsh .L107
1081 .L105:
1082 .stabn 68,0,276,.LM137-UIMgr_processReceivedData
1083 .LM137:
1084 03f6 8091 0000 lds r24,charIndex
1085 03fa E82F mov r30,r24
1086 03fc FF27 clr r31
1087 03fe E050 subi r30,lo8(-(asciiTokenBuffer))
1088 0400 F040 sbci r31,hi8(-(asciiTokenBuffer))
1089 0402 9083 st Z,r25
1090 .stabn 68,0,277,.LM138-UIMgr_processReceivedData
1091 .LM138:
1092 0404 9091 0000 lds r25,charCount
1093 0408 9F5F subi r25,lo8(-(1))
1094 040a 9093 0000 sts charCount,r25
1095 .stabn 68,0,278,.LM139-UIMgr_processReceivedData
1096 .LM139:
1097 040e 8F5F subi r24,lo8(-(1))
1098 0410 8093 0000 sts charIndex,r24
1099 .stabn 68,0,279,.LM140-UIMgr_processReceivedData
1100 .LM140:
1101 0414 9430 cpi r25,lo8(4)
1102 0416 38F0 brlo .L119
1103 .stabn 68,0,284,.LM141-UIMgr_processReceivedData
1104 .LM141:
1105 0418 F092 0000 sts receivedCmd,r15
GAS LISTING /tmp/ccRvT1Qm.s page 37
1106 .stabn 68,0,285,.LM142-UIMgr_processReceivedData
1107 .LM142:
1108 041c 1092 0000 sts charIndex,__zero_reg__
1109 0420 02C0 rjmp .L119
1110 .L107:
1111 .stabn 68,0,291,.LM143-UIMgr_processReceivedData
1112 .LM143:
1113 0422 F092 0000 sts receivedCmd,r15
1114 .L119:
1115 .stabn 68,0,199,.LM144-UIMgr_processReceivedData
1116 .LM144:
1117 0426 2091 0000 lds r18,UIMgr_rxFifoTail
1118 042a 8091 0000 lds r24,UIMgr_rxFifoHead
1119 042e 8217 cp r24,r18
1120 0430 09F0 breq .+2
1121 0432 FACE rjmp .L65
1122 .stabn 68,0,295,.LM145-UIMgr_processReceivedData
1123 .LM145:
1124 /* #APP */
1125 0434 E894 clt
1126 /* #NOAPP */
1127 /* epilogue: frame size=0 */
1128 0436 DF91 pop r29
1129 0438 CF91 pop r28
1130 043a 1F91 pop r17
1131 043c 0F91 pop r16
1132 043e FF90 pop r15
1133 0440 0895 ret
1134 /* epilogue end (size=6) */
1135 /* function UIMgr_processReceivedData size 297 (286) */
1136 .size UIMgr_processReceivedData, .-UIMgr_processReceivedData
1137 .stabs "tmpData:r(0,11)",64,0,194,25
1138 .stabn 192,0,0,UIMgr_processReceivedData-UIMgr_processReceivedData
1139 .stabs "dataByte:r(0,11)",64,0,609,25
1140 .stabn 192,0,0,.LBB23-UIMgr_processReceivedData
1141 .stabn 224,0,0,.LBE23-UIMgr_processReceivedData
1142 .stabn 224,0,0,.Lscope9-UIMgr_processReceivedData
1143 .Lscope9:
1144 .stabs "",36,0,0,.Lscope9-UIMgr_processReceivedData
1145 .stabd 78,0,0
1146 .stabs "UIMgr_dispatchEvent:F(0,15)",36,0,152,UIMgr_dispatchEvent
1147 .stabs "event:P(0,11)",64,0,151,24
1148 .global UIMgr_dispatchEvent
1149 .type UIMgr_dispatchEvent, @function
1150 UIMgr_dispatchEvent:
1151 .stabd 46,0,0
1152 .stabn 68,0,152,.LM146-UIMgr_dispatchEvent
1153 .LM146:
1154 /* prologue: frame size=0 */
1155 /* prologue end (size=0) */
1156 .stabn 68,0,153,.LM147-UIMgr_dispatchEvent
1157 .LM147:
1158 0442 8031 cpi r24,lo8(16)
1159 0444 29F0 breq .L123
1160 .stabn 68,0,153,.LM148-UIMgr_dispatchEvent
1161 .LM148:
1162 0446 8039 cpi r24,lo8(-112)
GAS LISTING /tmp/ccRvT1Qm.s page 38
1163 0448 39F0 breq .L124
1164 044a 8130 cpi r24,lo8(1)
1165 044c 31F4 brne .L125
1166 044e 02C0 rjmp .L122
1167 .L123:
1168 .stabn 68,0,156,.LM149-UIMgr_dispatchEvent
1169 .LM149:
1170 0450 38DE rcall UIMgr_transmitPendingData
1171 0452 0895 ret
1172 .L122:
1173 .stabn 68,0,160,.LM150-UIMgr_dispatchEvent
1174 .LM150:
1175 0454 DFDE rcall UIMgr_processReceivedData
1176 0456 0895 ret
1177 .L124:
1178 .stabn 68,0,164,.LM151-UIMgr_dispatchEvent
1179 .LM151:
1180 0458 0EDE rcall UIMgr_flushTxBuffer
1181 .L125:
1182 045a 0895 ret
1183 /* epilogue: frame size=0 */
1184 /* epilogue: noreturn */
1185 /* epilogue end (size=0) */
1186 /* function UIMgr_dispatchEvent size 13 (13) */
1187 .size UIMgr_dispatchEvent, .-UIMgr_dispatchEvent
1188 .Lscope10:
1189 .stabs "",36,0,0,.Lscope10-UIMgr_dispatchEvent
1190 .stabd 78,0,0
1191 .global UIMgr_rxFifoHead
1192 .global UIMgr_rxFifoHead
1193 .section .bss
1194 .type UIMgr_rxFifoHead, @object
1195 .size UIMgr_rxFifoHead, 1
1196 UIMgr_rxFifoHead:
1197 0000 00 .skip 1,0
1198 .global UIMgr_rxFifoTail
1199 .global UIMgr_rxFifoTail
1200 .type UIMgr_rxFifoTail, @object
1201 .size UIMgr_rxFifoTail, 1
1202 UIMgr_rxFifoTail:
1203 0001 00 .skip 1,0
1204 .global UIMgr_txFifoHead
1205 .global UIMgr_txFifoHead
1206 .type UIMgr_txFifoHead, @object
1207 .size UIMgr_txFifoHead, 1
1208 UIMgr_txFifoHead:
1209 0002 00 .skip 1,0
1210 .global UIMgr_txFifoTail
1211 .global UIMgr_txFifoTail
1212 .type UIMgr_txFifoTail, @object
1213 .size UIMgr_txFifoTail, 1
1214 UIMgr_txFifoTail:
1215 0003 00 .skip 1,0
1216 .lcomm tokenCount,1
1217 .data
1218 .type receivedCmd, @object
1219 .size receivedCmd, 1
GAS LISTING /tmp/ccRvT1Qm.s page 39
1220 receivedCmd:
1221 0000 08 .byte 8
1222 .lcomm charCount,1
1223 .lcomm charIndex,1
1224 .type AVRcamVersion, @object
1225 .size AVRcamVersion, 13
1226 AVRcamVersion:
1227 0001 4156 5263 .string "AVRcam v1.4\r"
1227 616D 2076
1227 312E 340D
1227 00
1228 .lcomm asciiTokenBuffer,4
1229 .lcomm tokenBuffer,64
1230 .comm UIMgr_rxFifo,32,1
1231 .comm UIMgr_txFifo,64,1
1232 .stabs "charCount:S(0,11)",38,0,92,charCount
1233 .stabs "charIndex:S(0,11)",38,0,93,charIndex
1234 .stabs "asciiTokenBuffer:S(0,21)=ar(0,22)=r(0,22);0;0177777;;0;3;(0,11)",40,0,94,asciiTokenBuffer
1235 .stabs "tokenCount:S(0,11)",38,0,95,tokenCount
1236 .stabs "tokenBuffer:S(0,23)=ar(0,22);0;63;(0,11)",40,0,96,tokenBuffer
1237 .stabs "receivedCmd:S(0,17)",38,0,97,receivedCmd
1238 .stabs "AVRcamVersion:S(0,24)=ar(0,22);0;12;(0,11)",38,0,98,AVRcamVersion
1239 .stabs "UIMgr_rxFifo:G(0,25)=ar(0,22);0;31;(0,11)",32,0,111,0
1240 .stabs "UIMgr_rxFifoHead:G(0,11)",32,0,112,0
1241 .stabs "UIMgr_rxFifoTail:G(0,11)",32,0,113,0
1242 .stabs "UIMgr_txFifo:G(0,23)",32,0,115,0
1243 .stabs "UIMgr_txFifoHead:G(0,11)",32,0,116,0
1244 .stabs "UIMgr_txFifoTail:G(0,11)",32,0,117,0
1245 .text
1246 .stabs "",100,0,0,.Letext0
1247 .Letext0:
1248 /* File "UIMgr.c": code 582 = 0x0246 ( 557), prologues 9, epilogues 16 */
GAS LISTING /tmp/ccRvT1Qm.s page 40
DEFINED SYMBOLS
*ABS*:00000000 UIMgr.c
/tmp/ccRvT1Qm.s:3 *ABS*:0000003f __SREG__
/tmp/ccRvT1Qm.s:4 *ABS*:0000003e __SP_H__
/tmp/ccRvT1Qm.s:5 *ABS*:0000003d __SP_L__
/tmp/ccRvT1Qm.s:6 *ABS*:00000000 __tmp_reg__
/tmp/ccRvT1Qm.s:7 *ABS*:00000001 __zero_reg__
/tmp/ccRvT1Qm.s:94 .text:00000000 UIMgr_writeBufferToTxFifo
*COM*:00000040 UIMgr_txFifo
/tmp/ccRvT1Qm.s:1208 .bss:00000002 UIMgr_txFifoHead
/tmp/ccRvT1Qm.s:159 .text:0000003c UIMgr_readTxFifo
/tmp/ccRvT1Qm.s:1214 .bss:00000003 UIMgr_txFifoTail
/tmp/ccRvT1Qm.s:206 .text:0000005a UIMgr_writeTxFifo
/tmp/ccRvT1Qm.s:246 .text:00000076 UIMgr_flushTxBuffer
/tmp/ccRvT1Qm.s:284 .text:00000094 UIMgr_txBuffer
/tmp/ccRvT1Qm.s:333 .text:000000c2 UIMgr_transmitPendingData
/tmp/ccRvT1Qm.s:361 .text:000000d4 UIMgr_convertTokenToCmd
/tmp/ccRvT1Qm.s:1223 .bss:00000007 asciiTokenBuffer
/tmp/ccRvT1Qm.s:1220 .data:00000000 receivedCmd
/tmp/ccRvT1Qm.s:1222 .bss:00000006 charIndex
/tmp/ccRvT1Qm.s:1216 .bss:00000005 charCount
/tmp/ccRvT1Qm.s:503 .text:00000192 UIMgr_init
/tmp/ccRvT1Qm.s:1228 .bss:0000000b tokenBuffer
*COM*:00000020 UIMgr_rxFifo
/tmp/ccRvT1Qm.s:549 .text:000001c8 UIMgr_convertTokenToValue
.bss:00000004 tokenCount
/tmp/ccRvT1Qm.s:619 .text:00000214 UIMgr_processReceivedData
/tmp/ccRvT1Qm.s:1202 .bss:00000001 UIMgr_rxFifoTail
/tmp/ccRvT1Qm.s:1226 .data:00000001 AVRcamVersion
/tmp/ccRvT1Qm.s:1196 .bss:00000000 UIMgr_rxFifoHead
/tmp/ccRvT1Qm.s:1150 .text:00000442 UIMgr_dispatchEvent
UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss
UartInt_txByte
atoi
Utility_delay
Exec_writeEventFifo
CamInt_resetCam
CamConfig_setCamReg
CamConfig_sendFifoCmds
colorMap
__eeprom_read_byte_1C1D1E
__eeprom_write_byte_1C1D1E