Rev 409 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download
GAS LISTING /tmp/ccRvT1Qm.s page 11 .file "UIMgr.c"2 .arch atmega83 __SREG__ = 0x3f4 __SP_H__ = 0x3e5 __SP_L__ = 0x3d6 __tmp_reg__ = 07 __zero_reg__ = 18 .global __do_copy_data9 .global __do_clear_bss10 .stabs "/home/kaklik/projects/programy/Atmel_C/AVRcam/",100,0,2,.Ltext011 .stabs "UIMgr.c",100,0,2,.Ltext012 .text13 .Ltext0:14 .stabs "gcc2_compiled.",60,0,0,015 .stabs "int:t(0,1)=r(0,1);-32768;32767;",128,0,0,016 .stabs "char:t(0,2)=@s8;r(0,2);0;255;",128,0,0,017 .stabs "long int:t(0,3)=@s32;r(0,3);020000000000;017777777777;",128,0,0,018 .stabs "unsigned int:t(0,4)=r(0,4);0;0177777;",128,0,0,019 .stabs "long unsigned int:t(0,5)=@s32;r(0,5);0;037777777777;",128,0,0,020 .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,022 .stabs "short int:t(0,8)=r(0,8);-32768;32767;",128,0,0,023 .stabs "short unsigned int:t(0,9)=r(0,9);0;0177777;",128,0,0,024 .stabs "signed char:t(0,10)=@s8;r(0,10);-128;127;",128,0,0,025 .stabs "unsigned char:t(0,11)=@s8;r(0,11);0;255;",128,0,0,026 .stabs "float:t(0,12)=r(0,1);4;0;",128,0,0,027 .stabs "double:t(0,13)=r(0,1);4;0;",128,0,0,028 .stabs "long double:t(0,14)=r(0,1);4;0;",128,0,0,029 .stabs "void:t(0,15)=(0,15)",128,0,0,030 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/io.h",130,0,0,031 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/sfr_defs.h",130,0,0,032 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/inttypes.h",130,0,0,033 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/stdint.h",130,0,0,034 .stabs "int8_t:t(4,1)=(0,10)",128,0,116,035 .stabs "uint8_t:t(4,2)=(0,11)",128,0,117,036 .stabs "int16_t:t(4,3)=(0,1)",128,0,118,037 .stabs "uint16_t:t(4,4)=(0,4)",128,0,119,038 .stabs "int32_t:t(4,5)=(0,3)",128,0,120,039 .stabs "uint32_t:t(4,6)=(0,5)",128,0,121,040 .stabs "int64_t:t(4,7)=(0,6)",128,0,122,041 .stabs "uint64_t:t(4,8)=(0,7)",128,0,123,042 .stabs "intptr_t:t(4,9)=(4,3)",128,0,135,043 .stabs "uintptr_t:t(4,10)=(4,4)",128,0,140,044 .stabs "int_least8_t:t(4,11)=(4,1)",128,0,152,045 .stabs "uint_least8_t:t(4,12)=(4,2)",128,0,157,046 .stabs "int_least16_t:t(4,13)=(4,3)",128,0,162,047 .stabs "uint_least16_t:t(4,14)=(4,4)",128,0,167,048 .stabs "int_least32_t:t(4,15)=(4,5)",128,0,172,049 .stabs "uint_least32_t:t(4,16)=(4,6)",128,0,177,050 .stabs "int_least64_t:t(4,17)=(4,7)",128,0,182,051 .stabs "uint_least64_t:t(4,18)=(4,8)",128,0,187,052 .stabs "int_fast8_t:t(4,19)=(4,1)",128,0,200,053 .stabs "uint_fast8_t:t(4,20)=(4,2)",128,0,205,054 .stabs "int_fast16_t:t(4,21)=(4,3)",128,0,210,055 .stabs "uint_fast16_t:t(4,22)=(4,4)",128,0,215,056 .stabs "int_fast32_t:t(4,23)=(4,5)",128,0,220,057 .stabs "uint_fast32_t:t(4,24)=(4,6)",128,0,225,0GAS LISTING /tmp/ccRvT1Qm.s page 258 .stabs "int_fast64_t:t(4,25)=(4,7)",128,0,230,059 .stabs "uint_fast64_t:t(4,26)=(4,8)",128,0,235,060 .stabs "intmax_t:t(4,27)=(4,7)",128,0,249,061 .stabs "uintmax_t:t(4,28)=(4,8)",128,0,254,062 .stabn 162,0,0,063 .stabs "int_farptr_t:t(3,1)=(4,5)",128,0,76,064 .stabs "uint_farptr_t:t(3,2)=(4,6)",128,0,80,065 .stabn 162,0,0,066 .stabn 162,0,0,067 .stabn 162,0,0,068 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/stdlib.h",130,0,0,069 .stabs "/usr/lib/gcc/avr/4.1.0/include/stddef.h",130,0,0,070 .stabs "size_t:t(6,1)=(0,4)",128,0,214,071 .stabs "wchar_t:t(6,2)=(0,1)",128,0,326,072 .stabn 162,0,0,073 .stabs "div_t:t(5,1)=(5,2)=s4quot:(0,1),0,16;rem:(0,1),16,16;;",128,0,69,074 .stabs "ldiv_t:t(5,3)=(5,4)=s8quot:(0,3),0,32;rem:(0,3),32,32;;",128,0,75,075 .stabs "__compar_fn_t:t(5,5)=(5,6)=*(5,7)=f(0,1)",128,0,78,076 .stabn 162,0,0,077 .stabs "CommonDefs.h",130,0,0,078 .stabs "bool_t:t(7,1)=(0,11)",128,0,56,079 .stabn 162,0,0,080 .stabs "CamConfig.h",130,0,0,081 .stabs "I2CInterface.h",130,0,0,082 .stabs "i2cCmd_t:t(9,1)=(9,2)=s2configReg:(0,11),0,8;data:(0,11),8,8;;",128,0,53,083 .stabn 162,0,0,084 .stabn 162,0,0,085 .stabs " :T(0,16)=@s8;egetVersionCmd:0,pingCmd:1,setCameraRegsCmd:2,dumpFrameCmd:3,enableTrackingC86 .stabs "UIMgr_Cmd_t:t(0,17)=(0,16)",128,0,81,087 .stabs " :T(0,18)=@s8;esetRed:0,setGreen:1,setBlue:2,;",128,0,0,088 .stabs "setColorState_t:t(0,19)=(0,18)",128,0,88,089 .stabs "UIMgr_writeBufferToTxFifo:F(0,15)",36,0,547,UIMgr_writeBufferToTxFifo90 .stabs "pData:P(0,20)=*(0,11)",64,0,546,2691 .stabs "length:P(0,11)",64,0,546,2492 .global UIMgr_writeBufferToTxFifo93 .type UIMgr_writeBufferToTxFifo, @function94 UIMgr_writeBufferToTxFifo:95 .stabd 46,0,01:UIMgr.c **** /*2:UIMgr.c **** Copyright (C) 2004 John Orlando3: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/or7:UIMgr.c **** modify it under the terms of the GNU General Public8:UIMgr.c **** License as published by the Free Software Foundation; either9: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 of13:UIMgr.c **** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU14:UIMgr.c **** General Public License for more details.15:UIMgr.c ****16:UIMgr.c **** You should have received a copy of the GNU General Public17:UIMgr.c **** License along with this program; if not, write to the Free Software18:UIMgr.c **** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA19:UIMgr.c ****GAS LISTING /tmp/ccRvT1Qm.s page 320:UIMgr.c **** For more information on the AVRcam, please contact:21:UIMgr.c ****22:UIMgr.c **** john@jrobot.net23: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.c28:UIMgr.c **** Module Date: 04/10/200429:UIMgr.c **** Module Auth: John Orlando30:UIMgr.c ****31:UIMgr.c **** Description: This module is responsible for providing32:UIMgr.c **** the processing to manage the user interface of the33:UIMgr.c **** system. This user interface is provided via the UART.34:UIMgr.c **** This module handles the incoming serial commands, and35:UIMgr.c **** performs the needed functionality. It is then36:UIMgr.c **** responsible for generating any needed response to37:UIMgr.c **** the external entity.38:UIMgr.c ****39:UIMgr.c **** Revision History:40:UIMgr.c **** Date Rel Ver. Notes41:UIMgr.c **** 4/10/2004 0.1 Module created42:UIMgr.c **** 6/30/2004 1.0 Initial release for Circuit Cellar43: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 colorMap46:UIMgr.c **** to EEPROM one byte at a time,47:UIMgr.c **** ensuring that the EEPROM is only48:UIMgr.c **** written when the data is different49:UIMgr.c **** than the current value (thus saving50:UIMgr.c **** EEPROM writes). Updated version51: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 enum70: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 477:UIMgr.c **** setColorMapCmd,78:UIMgr.c **** resetCameraCmd,79:UIMgr.c **** noCmd,80:UIMgr.c **** invalidCmd81:UIMgr.c **** } UIMgr_Cmd_t;82:UIMgr.c ****83:UIMgr.c **** typedef enum84:UIMgr.c **** {85:UIMgr.c **** setRed,86:UIMgr.c **** setGreen,87:UIMgr.c **** setBlue88: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 be124:UIMgr.c **** done to a particular EEPROM cell, so that it can't possible just125:UIMgr.c **** write to the same cell over and over */126:UIMgr.c **** #define MAX_EEPROM_WRITE_ATTEMPTS 3127:UIMgr.c ****128:UIMgr.c **** /***********************************************************129:UIMgr.c **** Function Name: UIMgr_init130:UIMgr.c **** Function Description: This function is responsible for131:UIMgr.c **** initializing the UIMgr module. It sets up the fifo132:UIMgr.c **** used to hold incoming data, etc.133:UIMgr.c **** Inputs: noneGAS LISTING /tmp/ccRvT1Qm.s page 5134:UIMgr.c **** Outputs: none135: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_dispatchEvent146:UIMgr.c **** Function Description: This function is responsible for147:UIMgr.c **** processing events that pertain to the UIMgr.148:UIMgr.c **** Inputs: event - the generated event149:UIMgr.c **** Outputs: none150: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_transmitPendingData170:UIMgr.c **** Function Description: This function is responsible for171:UIMgr.c **** transmitting a single byte of data if data is waiting172:UIMgr.c **** to be sent. Otherwise, if nothing is waiting, the173:UIMgr.c **** function just returns.174:UIMgr.c **** Inputs: none175:UIMgr.c **** Outputs: none176: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_processReceivedData187:UIMgr.c **** Function Description: This function is responsible for188:UIMgr.c **** parsing any serial data waiting in the rx fifo189:UIMgr.c **** Inputs: none190:UIMgr.c **** Outputs: noneGAS LISTING /tmp/ccRvT1Qm.s page 6191: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 counts197: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 **** else211: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 received217: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 **** else226:UIMgr.c **** {227:UIMgr.c **** UIMgr_sendAck();228:UIMgr.c **** /* publish the serial data pending event, so it229: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??? This245:UIMgr.c **** means we have received a token, with tokenCount == 0, which means it is a246: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, sinceGAS LISTING /tmp/ccRvT1Qm.s page 7248:UIMgr.c **** it sets the color map based on tokenCount...CHECK*/249:UIMgr.c **** }250:UIMgr.c **** else251:UIMgr.c **** {252:UIMgr.c **** /* check to see if this token is going to push253: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, and257:UIMgr.c **** need to NCK this request, since its too258: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 **** else265: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 wait283: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 **** else289: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't296:UIMgr.c **** cleared already */297:UIMgr.c **** }298:UIMgr.c ****299:UIMgr.c **** /***********************************************************300:UIMgr.c **** Function Name: UIMgr_executeCmd301:UIMgr.c **** Function Description: This function is responsible for302:UIMgr.c **** executing whatever cmd is stored in the receivedCmd303:UIMgr.c **** object.304:UIMgr.c **** Inputs: noneGAS LISTING /tmp/ccRvT1Qm.s page 8305:UIMgr.c **** Outputs: none306: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_MAP313:UIMgr.c **** unsigned char asciiBuffer[5];314:UIMgr.c **** #endif315: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 that334:UIMgr.c **** a request has come to dump a frame...this will335:UIMgr.c **** be received by the FrameMgr, which will begin336:UIMgr.c **** dumping the frame...a short delay is needed337:UIMgr.c **** here to keep the Java demo app happy (sometimes338:UIMgr.c **** it wouldn't be able to receive the serial data339: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 and346: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 token348: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 9362: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 those372: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 the377: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_MAP394: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 **** #endif409:UIMgr.c **** }410:UIMgr.c **** }411:UIMgr.c ****412:UIMgr.c **** /***********************************************************413:UIMgr.c **** Function Name: UIMgr_convertTokenToValue414:UIMgr.c **** Function Description: This function is responsible for415:UIMgr.c **** converting a received token to a hex value It will416:UIMgr.c **** access the asciiTokenBuffer directly, and store the417:UIMgr.c **** result in the appropriate token buffer.418:UIMgr.c **** Inputs: noneGAS LISTING /tmp/ccRvT1Qm.s page 10419:UIMgr.c **** Outputs: none420: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 **** else433: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_convertTokenToCmd443:UIMgr.c **** Function Description: This function is responsible for444:UIMgr.c **** parsing a received 2-character command. It will445:UIMgr.c **** access the asciiTokenBuffer directly.446:UIMgr.c **** Inputs: none447:UIMgr.c **** Outputs: none448: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 see455: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 11476: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 **** else499: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_sendAck509:UIMgr.c **** Function Description: This function is responsible for510:UIMgr.c **** queuing up an ACK to be sent to the user.511:UIMgr.c **** Inputs: none512:UIMgr.c **** Outputs: none513: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_sendNck524:UIMgr.c **** Function Description: This function is responsible for525:UIMgr.c **** queueing up an NCK to be sent to the user.526:UIMgr.c **** Inputs: none527:UIMgr.c **** Outputs: none528: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 12533: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_writeBufferToTxFifo540:UIMgr.c **** Function Description: This function is responsible for541:UIMgr.c **** placing "length" bytes into the tx FIFO.542:UIMgr.c **** Inputs: pData - a pointer to the data to send543:UIMgr.c **** length - the number of bytes to send544:UIMgr.c **** Outputs: none545:UIMgr.c **** ***********************************************************/546:UIMgr.c **** void UIMgr_writeBufferToTxFifo(unsigned char *pData, unsigned char length)547:UIMgr.c **** {96 .stabn 68,0,547,.LM0-UIMgr_writeBufferToTxFifo97 .LM0:98 /* prologue: frame size=0 */99 /* prologue end (size=0) */100 0000 DC01 movw r26,r24101 0002 862F mov r24,r22548:UIMgr.c **** unsigned char tmpHead;549:UIMgr.c **** if (length == 0)102 .stabn 68,0,549,.LM1-UIMgr_writeBufferToTxFifo103 .LM1:104 0004 6623 tst r22105 0006 C9F0 breq .L7550:UIMgr.c **** {551:UIMgr.c **** return;552:UIMgr.c **** }553:UIMgr.c ****554:UIMgr.c **** DISABLE_INTS();106 .stabn 68,0,554,.LM2-UIMgr_writeBufferToTxFifo107 .LM2:108 /* #APP */109 0008 F894 cli555:UIMgr.c **** while(length-- != 0)110 .stabn 68,0,555,.LM3-UIMgr_writeBufferToTxFifo111 .LM3:112 /* #NOAPP */113 000a 6150 subi r22,lo8(-(-1))114 000c 6F3F cpi r22,lo8(-1)115 000e A1F0 breq .L4116 0010 262F mov r18,r22117 0012 40E0 ldi r20,lo8(UIMgr_txFifo)118 0014 50E0 ldi r21,hi8(UIMgr_txFifo)119 0016 861B sub r24,r22120 0018 682F mov r22,r24121 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_writeBufferToTxFifo124 .LM4:125 001c 8091 0000 lds r24,UIMgr_txFifoHead126 0020 FA01 movw r30,r20127 0022 E80F add r30,r24GAS LISTING /tmp/ccRvT1Qm.s page 13128 0024 F11D adc r31,__zero_reg__129 0026 9D91 ld r25,X+130 0028 9083 st Z,r25558: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_writeBufferToTxFifo132 .LM5:133 002a 8F5F subi r24,lo8(-(1))134 002c 8F73 andi r24,lo8(63)135 002e 8093 0000 sts UIMgr_txFifoHead,r24136 .stabn 68,0,555,.LM6-UIMgr_writeBufferToTxFifo137 .LM6:138 0032 2150 subi r18,lo8(-(-1))139 0034 6217 cp r22,r18140 0036 91F7 brne .L6141 .L4:562:UIMgr.c **** }563:UIMgr.c **** ENABLE_INTS();142 .stabn 68,0,563,.LM7-UIMgr_writeBufferToTxFifo143 .LM7:144 /* #APP */145 0038 7894 sei146 /* #NOAPP */147 .L7:148 003a 0895 ret149 /* epilogue: frame size=0 */150 /* epilogue: noreturn */151 /* epilogue end (size=0) */152 /* function UIMgr_writeBufferToTxFifo size 32 (32) */153 .size UIMgr_writeBufferToTxFifo, .-UIMgr_writeBufferToTxFifo154 .Lscope0:155 .stabs "",36,0,0,.Lscope0-UIMgr_writeBufferToTxFifo156 .stabd 78,0,0157 .stabs "UIMgr_readTxFifo:f(0,11)",36,0,630,UIMgr_readTxFifo158 .type UIMgr_readTxFifo, @function159 UIMgr_readTxFifo:160 .stabd 46,0,0564:UIMgr.c **** }565:UIMgr.c ****566:UIMgr.c **** /***********************************************************567:UIMgr.c **** Function Name: UIMgr_txBuffer568:UIMgr.c **** Function Description: This function is responsible for569:UIMgr.c **** sending 'length' bytes out using the UartInterface570:UIMgr.c **** module.571:UIMgr.c **** Inputs: pData - a pointer to the data to send572:UIMgr.c **** length - the number of bytes to send573:UIMgr.c **** Outputs: none574: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 14582:UIMgr.c ****583:UIMgr.c **** /***********************************************************584:UIMgr.c **** Function Name: UIMgr_flushTxBuffer585:UIMgr.c **** Function Description: This function is responsible for586:UIMgr.c **** sending all data currently in the serial tx buffer587:UIMgr.c **** to the user.588:UIMgr.c **** Inputs: none589:UIMgr.c **** Outputs: none590: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_readRxFifo601:UIMgr.c **** Function Description: This function is responsible for602:UIMgr.c **** reading a single byte of data from the rx fifo, and603:UIMgr.c **** updating the appropriate pointers.604:UIMgr.c **** Inputs: none605:UIMgr.c **** Outputs: unsigned char-the data read606: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_readTxFifo623:UIMgr.c **** Function Description: This function is responsible for624:UIMgr.c **** reading a single byte of data from the tx fifo, and625:UIMgr.c **** updating the appropriate pointers.626:UIMgr.c **** Inputs: none627:UIMgr.c **** Outputs: unsigned char-the data read628:UIMgr.c **** ***********************************************************/629:UIMgr.c **** static unsigned char UIMgr_readTxFifo(void)630:UIMgr.c **** {161 .stabn 68,0,630,.LM8-UIMgr_readTxFifo162 .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 15165 .stabn 68,0,634,.LM9-UIMgr_readTxFifo166 .LM9:167 /* #APP */168 003c F894 cli635:UIMgr.c **** dataByte = UIMgr_txFifo[UIMgr_txFifoTail];169 .stabn 68,0,635,.LM10-UIMgr_readTxFifo170 .LM10:171 /* #NOAPP */172 003e 9091 0000 lds r25,UIMgr_txFifoTail173 0042 E0E0 ldi r30,lo8(UIMgr_txFifo)174 0044 F0E0 ldi r31,hi8(UIMgr_txFifo)175 0046 E90F add r30,r25176 0048 F11D adc r31,__zero_reg__177 004a 8081 ld r24,Z636:UIMgr.c **** tmpTail = (UIMgr_txFifoTail+1) & (UI_MGR_TX_FIFO_MASK);637:UIMgr.c **** UIMgr_txFifoTail = tmpTail;178 .stabn 68,0,637,.LM11-UIMgr_readTxFifo179 .LM11:180 004c 9F5F subi r25,lo8(-(1))181 004e 9F73 andi r25,lo8(63)182 0050 9093 0000 sts UIMgr_txFifoTail,r25638:UIMgr.c **** ENABLE_INTS();183 .stabn 68,0,638,.LM12-UIMgr_readTxFifo184 .LM12:185 /* #APP */186 0054 7894 sei639:UIMgr.c ****640:UIMgr.c **** return(dataByte);641:UIMgr.c **** }187 .stabn 68,0,641,.LM13-UIMgr_readTxFifo188 .LM13:189 /* #NOAPP */190 0056 9927 clr r25191 /* epilogue: frame size=0 */192 0058 0895 ret193 /* epilogue end (size=1) */194 /* function UIMgr_readTxFifo size 17 (16) */195 .size UIMgr_readTxFifo, .-UIMgr_readTxFifo196 .stabs "dataByte:r(0,11)",64,0,631,24197 .stabn 192,0,0,UIMgr_readTxFifo-UIMgr_readTxFifo198 .stabn 224,0,0,.Lscope1-UIMgr_readTxFifo199 .Lscope1:200 .stabs "",36,0,0,.Lscope1-UIMgr_readTxFifo201 .stabd 78,0,0202 .stabs "UIMgr_writeTxFifo:F(0,15)",36,0,652,UIMgr_writeTxFifo203 .stabs "data:P(0,11)",64,0,651,24204 .global UIMgr_writeTxFifo205 .type UIMgr_writeTxFifo, @function206 UIMgr_writeTxFifo:207 .stabd 46,0,0642:UIMgr.c ****643:UIMgr.c **** /***********************************************************644:UIMgr.c **** Function Name: UIMgr_writeTxFifo645:UIMgr.c **** Function Description: This function is responsible for646:UIMgr.c **** writing a single byte to the TxFifo and647:UIMgr.c **** updating the appropriate pointers.648:UIMgr.c **** Inputs: data - the byte to write to the FifoGAS LISTING /tmp/ccRvT1Qm.s page 16649:UIMgr.c **** Outputs: none650:UIMgr.c **** ***********************************************************/651:UIMgr.c **** void UIMgr_writeTxFifo(unsigned char data)652:UIMgr.c **** {208 .stabn 68,0,652,.LM14-UIMgr_writeTxFifo209 .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_writeTxFifo213 .LM15:214 /* #APP */215 005a F894 cli656:UIMgr.c **** UIMgr_txFifo[UIMgr_txFifoHead] = data;216 .stabn 68,0,656,.LM16-UIMgr_writeTxFifo217 .LM16:218 /* #NOAPP */219 005c 9091 0000 lds r25,UIMgr_txFifoHead220 0060 E0E0 ldi r30,lo8(UIMgr_txFifo)221 0062 F0E0 ldi r31,hi8(UIMgr_txFifo)222 0064 E90F add r30,r25223 0066 F11D adc r31,__zero_reg__224 0068 8083 st Z,r24657: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_writeTxFifo226 .LM17:227 006a 9F5F subi r25,lo8(-(1))228 006c 9F73 andi r25,lo8(63)229 006e 9093 0000 sts UIMgr_txFifoHead,r25661:UIMgr.c **** ENABLE_INTS();230 .stabn 68,0,661,.LM18-UIMgr_writeTxFifo231 .LM18:232 /* #APP */233 0072 7894 sei234 /* #NOAPP */235 /* epilogue: frame size=0 */236 0074 0895 ret237 /* epilogue end (size=1) */238 /* function UIMgr_writeTxFifo size 16 (15) */239 .size UIMgr_writeTxFifo, .-UIMgr_writeTxFifo240 .Lscope2:241 .stabs "",36,0,0,.Lscope2-UIMgr_writeTxFifo242 .stabd 78,0,0243 .stabs "UIMgr_flushTxBuffer:F(0,15)",36,0,592,UIMgr_flushTxBuffer244 .global UIMgr_flushTxBuffer245 .type UIMgr_flushTxBuffer, @function246 UIMgr_flushTxBuffer:247 .stabd 46,0,0248 .stabn 68,0,592,.LM19-UIMgr_flushTxBuffer249 .LM19:250 /* prologue: frame size=0 */251 /* prologue end (size=0) */GAS LISTING /tmp/ccRvT1Qm.s page 17252 .stabn 68,0,593,.LM20-UIMgr_flushTxBuffer253 .LM20:254 0076 9091 0000 lds r25,UIMgr_txFifoHead255 007a 8091 0000 lds r24,UIMgr_txFifoTail256 007e 9817 cp r25,r24257 0080 41F0 breq .L16258 .L17:259 .stabn 68,0,595,.LM21-UIMgr_flushTxBuffer260 .LM21:261 0082 DCDF rcall UIMgr_readTxFifo262 0084 00D0 rcall UartInt_txByte263 .stabn 68,0,593,.LM22-UIMgr_flushTxBuffer264 .LM22:265 0086 9091 0000 lds r25,UIMgr_txFifoHead266 008a 8091 0000 lds r24,UIMgr_txFifoTail267 008e 9817 cp r25,r24268 0090 C1F7 brne .L17269 .L16:270 0092 0895 ret271 /* epilogue: frame size=0 */272 /* epilogue: noreturn */273 /* epilogue end (size=0) */274 /* function UIMgr_flushTxBuffer size 15 (15) */275 .size UIMgr_flushTxBuffer, .-UIMgr_flushTxBuffer276 .Lscope3:277 .stabs "",36,0,0,.Lscope3-UIMgr_flushTxBuffer278 .stabd 78,0,0279 .stabs "UIMgr_txBuffer:F(0,15)",36,0,576,UIMgr_txBuffer280 .stabs "pData:P(0,20)",64,0,575,28281 .stabs "length:P(0,11)",64,0,575,24282 .global UIMgr_txBuffer283 .type UIMgr_txBuffer, @function284 UIMgr_txBuffer:285 .stabd 46,0,0286 .stabn 68,0,576,.LM23-UIMgr_txBuffer287 .LM23:288 /* prologue: frame size=0 */289 0094 0F93 push r16290 0096 1F93 push r17291 0098 CF93 push r28292 009a DF93 push r29293 /* prologue end (size=4) */294 009c EC01 movw r28,r24295 009e 862F mov r24,r22296 .stabn 68,0,577,.LM24-UIMgr_txBuffer297 .LM24:298 00a0 6150 subi r22,lo8(-(-1))299 00a2 6F3F cpi r22,lo8(-1)300 00a4 49F0 breq .L23301 .stabn 68,0,577,.LM25-UIMgr_txBuffer302 .LM25:303 00a6 162F mov r17,r22304 00a8 861B sub r24,r22305 00aa 082F mov r16,r24306 00ac 0250 subi r16,lo8(-(-2))307 .L22:308 .stabn 68,0,579,.LM26-UIMgr_txBufferGAS LISTING /tmp/ccRvT1Qm.s page 18309 .LM26:310 00ae 8991 ld r24,Y+311 00b0 00D0 rcall UartInt_txByte312 .stabn 68,0,577,.LM27-UIMgr_txBuffer313 .LM27:314 00b2 1150 subi r17,lo8(-(-1))315 00b4 0117 cp r16,r17316 00b6 D9F7 brne .L22317 .L23:318 /* epilogue: frame size=0 */319 00b8 DF91 pop r29320 00ba CF91 pop r28321 00bc 1F91 pop r17322 00be 0F91 pop r16323 00c0 0895 ret324 /* epilogue end (size=5) */325 /* function UIMgr_txBuffer size 23 (14) */326 .size UIMgr_txBuffer, .-UIMgr_txBuffer327 .Lscope4:328 .stabs "",36,0,0,.Lscope4-UIMgr_txBuffer329 .stabd 78,0,0330 .stabs "UIMgr_transmitPendingData:F(0,15)",36,0,178,UIMgr_transmitPendingData331 .global UIMgr_transmitPendingData332 .type UIMgr_transmitPendingData, @function333 UIMgr_transmitPendingData:334 .stabd 46,0,0335 .stabn 68,0,178,.LM28-UIMgr_transmitPendingData336 .LM28:337 /* prologue: frame size=0 */338 /* prologue end (size=0) */339 .stabn 68,0,179,.LM29-UIMgr_transmitPendingData340 .LM29:341 00c2 9091 0000 lds r25,UIMgr_txFifoHead342 00c6 8091 0000 lds r24,UIMgr_txFifoTail343 00ca 9817 cp r25,r24344 00cc 11F0 breq .L28345 .stabn 68,0,182,.LM30-UIMgr_transmitPendingData346 .LM30:347 00ce B6DF rcall UIMgr_readTxFifo348 00d0 00D0 rcall UartInt_txByte349 .L28:350 00d2 0895 ret351 /* epilogue: frame size=0 */352 /* epilogue: noreturn */353 /* epilogue end (size=0) */354 /* function UIMgr_transmitPendingData size 9 (9) */355 .size UIMgr_transmitPendingData, .-UIMgr_transmitPendingData356 .Lscope5:357 .stabs "",36,0,0,.Lscope5-UIMgr_transmitPendingData358 .stabd 78,0,0359 .stabs "UIMgr_convertTokenToCmd:f(0,15)",36,0,450,UIMgr_convertTokenToCmd360 .type UIMgr_convertTokenToCmd, @function361 UIMgr_convertTokenToCmd:362 .stabd 46,0,0363 .stabn 68,0,450,.LM31-UIMgr_convertTokenToCmd364 .LM31:365 /* prologue: frame size=0 */GAS LISTING /tmp/ccRvT1Qm.s page 19366 /* prologue end (size=0) */367 .stabn 68,0,451,.LM32-UIMgr_convertTokenToCmd368 .LM32:369 00d4 9091 0000 lds r25,asciiTokenBuffer370 00d8 9035 cpi r25,lo8(80)371 00da 41F4 brne .L30372 .stabn 68,0,451,.LM33-UIMgr_convertTokenToCmd373 .LM33:374 00dc 8091 0000 lds r24,asciiTokenBuffer+1375 00e0 8734 cpi r24,lo8(71)376 00e2 09F5 brne .L32377 .stabn 68,0,456,.LM34-UIMgr_convertTokenToCmd378 .LM34:379 00e4 81E0 ldi r24,lo8(1)380 00e6 8093 0000 sts receivedCmd,r24381 00ea 48C0 rjmp .L34382 .L30:383 .stabn 68,0,458,.LM35-UIMgr_convertTokenToCmd384 .LM35:385 00ec 9734 cpi r25,lo8(71)386 00ee 39F4 brne .L35387 00f0 8091 0000 lds r24,asciiTokenBuffer+1388 00f4 8635 cpi r24,lo8(86)389 00f6 09F5 brne .L37390 .stabn 68,0,462,.LM36-UIMgr_convertTokenToCmd391 .LM36:392 00f8 1092 0000 sts receivedCmd,__zero_reg__393 00fc 3FC0 rjmp .L34394 .L35:395 .stabn 68,0,464,.LM37-UIMgr_convertTokenToCmd396 .LM37:397 00fe 9434 cpi r25,lo8(68)398 0100 41F4 brne .L39399 0102 8091 0000 lds r24,asciiTokenBuffer+1400 0106 8634 cpi r24,lo8(70)401 0108 11F5 brne .L41402 .stabn 68,0,468,.LM38-UIMgr_convertTokenToCmd403 .LM38:404 010a 83E0 ldi r24,lo8(3)405 010c 8093 0000 sts receivedCmd,r24406 0110 35C0 rjmp .L34407 .L39:408 .stabn 68,0,470,.LM39-UIMgr_convertTokenToCmd409 .LM39:410 0112 9334 cpi r25,lo8(67)411 0114 41F4 brne .L32412 0116 8091 0000 lds r24,asciiTokenBuffer+1413 011a 8235 cpi r24,lo8(82)414 011c 11F5 brne .L44415 .stabn 68,0,474,.LM40-UIMgr_convertTokenToCmd416 .LM40:417 011e 82E0 ldi r24,lo8(2)418 0120 8093 0000 sts receivedCmd,r24419 0124 2BC0 rjmp .L34420 .L32:421 .stabn 68,0,476,.LM41-UIMgr_convertTokenToCmd422 .LM41:GAS LISTING /tmp/ccRvT1Qm.s page 20423 0126 9534 cpi r25,lo8(69)424 0128 41F4 brne .L37425 012a 8091 0000 lds r24,asciiTokenBuffer+1426 012e 8435 cpi r24,lo8(84)427 0130 11F5 brne .L47428 .stabn 68,0,480,.LM42-UIMgr_convertTokenToCmd429 .LM42:430 0132 84E0 ldi r24,lo8(4)431 0134 8093 0000 sts receivedCmd,r24432 0138 21C0 rjmp .L34433 .L37:434 .stabn 68,0,482,.LM43-UIMgr_convertTokenToCmd435 .LM43:436 013a 9335 cpi r25,lo8(83)437 013c 41F4 brne .L41438 013e 8091 0000 lds r24,asciiTokenBuffer+1439 0142 8D34 cpi r24,lo8(77)440 0144 C1F4 brne .L47441 .stabn 68,0,486,.LM44-UIMgr_convertTokenToCmd442 .LM44:443 0146 86E0 ldi r24,lo8(6)444 0148 8093 0000 sts receivedCmd,r24445 014c 17C0 rjmp .L34446 .L41:447 .stabn 68,0,488,.LM45-UIMgr_convertTokenToCmd448 .LM45:449 014e 9434 cpi r25,lo8(68)450 0150 41F4 brne .L44451 0152 8091 0000 lds r24,asciiTokenBuffer+1452 0156 8435 cpi r24,lo8(84)453 0158 71F4 brne .L47454 .stabn 68,0,491,.LM46-UIMgr_convertTokenToCmd455 .LM46:456 015a 85E0 ldi r24,lo8(5)457 015c 8093 0000 sts receivedCmd,r24458 0160 0DC0 rjmp .L34459 .L44:460 .stabn 68,0,493,.LM47-UIMgr_convertTokenToCmd461 .LM47:462 0162 9235 cpi r25,lo8(82)463 0164 41F4 brne .L47464 0166 8091 0000 lds r24,asciiTokenBuffer+1465 016a 8335 cpi r24,lo8(83)466 016c 21F4 brne .L47467 .stabn 68,0,496,.LM48-UIMgr_convertTokenToCmd468 .LM48:469 016e 87E0 ldi r24,lo8(7)470 0170 8093 0000 sts receivedCmd,r24471 0174 03C0 rjmp .L34472 .L47:473 .stabn 68,0,501,.LM49-UIMgr_convertTokenToCmd474 .LM49:475 0176 89E0 ldi r24,lo8(9)476 0178 8093 0000 sts receivedCmd,r24477 .L34:478 .stabn 68,0,503,.LM50-UIMgr_convertTokenToCmd479 .LM50:GAS LISTING /tmp/ccRvT1Qm.s page 21480 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 r24485 0186 E9F7 brne .-6486 .stabn 68,0,504,.LM51-UIMgr_convertTokenToCmd487 .LM51:488 0188 1092 0000 sts charIndex,__zero_reg__489 .stabn 68,0,505,.LM52-UIMgr_convertTokenToCmd490 .LM52:491 018c 1092 0000 sts charCount,__zero_reg__492 /* epilogue: frame size=0 */493 0190 0895 ret494 /* epilogue end (size=1) */495 /* function UIMgr_convertTokenToCmd size 95 (94) */496 .size UIMgr_convertTokenToCmd, .-UIMgr_convertTokenToCmd497 .Lscope6:498 .stabs "",36,0,0,.Lscope6-UIMgr_convertTokenToCmd499 .stabd 78,0,0500 .stabs "UIMgr_init:F(0,15)",36,0,137,UIMgr_init501 .global UIMgr_init502 .type UIMgr_init, @function503 UIMgr_init:504 .stabd 46,0,0505 .stabn 68,0,137,.LM53-UIMgr_init506 .LM53:507 /* prologue: frame size=0 */508 /* prologue end (size=0) */509 .stabn 68,0,138,.LM54-UIMgr_init510 .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_init516 .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,r24521 01aa 1192 st Z+,__zero_reg__522 01ac 9A95 dec r25523 01ae E9F7 brne .-6524 .stabn 68,0,140,.LM56-UIMgr_init525 .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 r24530 01b8 E9F7 brne .-6531 .stabn 68,0,141,.LM57-UIMgr_init532 .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 22537 01c2 8A95 dec r24538 01c4 E9F7 brne .-6539 /* epilogue: frame size=0 */540 01c6 0895 ret541 /* epilogue end (size=1) */542 /* function UIMgr_init size 27 (26) */543 .size UIMgr_init, .-UIMgr_init544 .Lscope7:545 .stabs "",36,0,0,.Lscope7-UIMgr_init546 .stabd 78,0,0547 .stabs "UIMgr_convertTokenToValue:f(0,15)",36,0,422,UIMgr_convertTokenToValue548 .type UIMgr_convertTokenToValue, @function549 UIMgr_convertTokenToValue:550 .stabd 46,0,0551 .stabn 68,0,422,.LM58-UIMgr_convertTokenToValue552 .LM58:553 /* prologue: frame size=0 */554 /* prologue end (size=0) */555 .stabn 68,0,425,.LM59-UIMgr_convertTokenToValue556 .LM59:557 01c8 80E0 ldi r24,lo8(asciiTokenBuffer)558 01ca 90E0 ldi r25,hi8(asciiTokenBuffer)559 01cc 00D0 rcall atoi560 01ce 9C01 movw r18,r24561 .stabn 68,0,426,.LM60-UIMgr_convertTokenToValue562 .LM60:563 01d0 8F3F cpi r24,255564 01d2 9105 cpc r25,__zero_reg__565 01d4 69F0 breq .L59566 01d6 60F0 brlo .L59567 .stabn 68,0,429,.LM61-UIMgr_convertTokenToValue568 .LM61:569 01d8 89E0 ldi r24,lo8(9)570 01da 8093 0000 sts receivedCmd,r24571 .stabn 68,0,430,.LM62-UIMgr_convertTokenToValue572 .LM62:573 01de 8091 0000 lds r24,tokenCount574 01e2 E0E0 ldi r30,lo8(tokenBuffer)575 01e4 F0E0 ldi r31,hi8(tokenBuffer)576 01e6 E80F add r30,r24577 01e8 F11D adc r31,__zero_reg__578 01ea 8FEF ldi r24,lo8(-1)579 01ec 8083 st Z,r24580 01ee 07C0 rjmp .L61581 .L59:582 .stabn 68,0,435,.LM63-UIMgr_convertTokenToValue583 .LM63:584 01f0 8091 0000 lds r24,tokenCount585 01f4 E0E0 ldi r30,lo8(tokenBuffer)586 01f6 F0E0 ldi r31,hi8(tokenBuffer)587 01f8 E80F add r30,r24588 01fa F11D adc r31,__zero_reg__589 01fc 2083 st Z,r18590 .L61:591 .stabn 68,0,437,.LM64-UIMgr_convertTokenToValue592 .LM64:593 01fe 83E0 ldi r24,lo8(3)GAS LISTING /tmp/ccRvT1Qm.s page 23594 0200 E0E0 ldi r30,lo8(asciiTokenBuffer)595 0202 F0E0 ldi r31,hi8(asciiTokenBuffer)596 0204 1192 st Z+,__zero_reg__597 0206 8A95 dec r24598 0208 E9F7 brne .-6599 .stabn 68,0,438,.LM65-UIMgr_convertTokenToValue600 .LM65:601 020a 1092 0000 sts charIndex,__zero_reg__602 .stabn 68,0,439,.LM66-UIMgr_convertTokenToValue603 .LM66:604 020e 1092 0000 sts charCount,__zero_reg__605 /* epilogue: frame size=0 */606 0212 0895 ret607 /* epilogue end (size=1) */608 /* function UIMgr_convertTokenToValue size 38 (37) */609 .size UIMgr_convertTokenToValue, .-UIMgr_convertTokenToValue610 .stabs "newValue:r(0,4)",64,0,423,18611 .stabn 192,0,0,UIMgr_convertTokenToValue-UIMgr_convertTokenToValue612 .stabn 224,0,0,.Lscope8-UIMgr_convertTokenToValue613 .Lscope8:614 .stabs "",36,0,0,.Lscope8-UIMgr_convertTokenToValue615 .stabd 78,0,0616 .stabs "UIMgr_processReceivedData:F(0,15)",36,0,193,UIMgr_processReceivedData617 .global UIMgr_processReceivedData618 .type UIMgr_processReceivedData, @function619 UIMgr_processReceivedData:620 .stabd 46,0,0621 .stabn 68,0,193,.LM67-UIMgr_processReceivedData622 .LM67:623 /* prologue: frame size=0 */624 0214 FF92 push r15625 0216 0F93 push r16626 0218 1F93 push r17627 021a CF93 push r28628 021c DF93 push r29629 /* prologue end (size=5) */630 021e 0F2E mov __tmp_reg__,r31631 0220 F9E0 ldi r31,lo8(9)632 0222 FF2E mov r15,r31633 0224 F02D mov r31,__tmp_reg__634 0226 FFC0 rjmp .L119635 .L65:636 .LBB22:637 .LBB23:638 .stabn 68,0,612,.LM68-UIMgr_processReceivedData639 .LM68:640 /* #APP */641 0228 F894 cli642 .stabn 68,0,613,.LM69-UIMgr_processReceivedData643 .LM69:644 /* #NOAPP */645 022a E22F mov r30,r18646 022c FF27 clr r31647 022e E050 subi r30,lo8(-(UIMgr_rxFifo))648 0230 F040 sbci r31,hi8(-(UIMgr_rxFifo))649 0232 9081 ld r25,Z650 .stabn 68,0,615,.LM70-UIMgr_processReceivedDataGAS LISTING /tmp/ccRvT1Qm.s page 24651 .LM70:652 0234 822F mov r24,r18653 0236 8F5F subi r24,lo8(-(1))654 0238 8F71 andi r24,lo8(31)655 023a 8093 0000 sts UIMgr_rxFifoTail,r24656 .stabn 68,0,616,.LM71-UIMgr_processReceivedData657 .LM71:658 /* #APP */659 023e 7894 sei660 /* #NOAPP */661 .LBE23:662 .LBE22:663 .stabn 68,0,202,.LM72-UIMgr_processReceivedData664 .LM72:665 0240 9D30 cpi r25,lo8(13)666 0242 09F0 breq .+2667 0244 B1C0 rjmp .L66668 .stabn 68,0,205,.LM73-UIMgr_processReceivedData669 .LM73:670 0246 8091 0000 lds r24,tokenCount671 024a 8823 tst r24672 024c 11F4 brne .L68673 .stabn 68,0,208,.LM74-UIMgr_processReceivedData674 .LM74:675 024e 42DF rcall UIMgr_convertTokenToCmd676 0250 06C0 rjmp .L70677 .L68:678 .stabn 68,0,213,.LM75-UIMgr_processReceivedData679 .LM75:680 0252 BADF rcall UIMgr_convertTokenToValue681 .stabn 68,0,214,.LM76-UIMgr_processReceivedData682 .LM76:683 0254 8091 0000 lds r24,tokenCount684 0258 8F5F subi r24,lo8(-(1))685 025a 8093 0000 sts tokenCount,r24686 .L70:687 .stabn 68,0,218,.LM77-UIMgr_processReceivedData688 .LM77:689 025e 84E6 ldi r24,lo8(100)690 0260 90E0 ldi r25,hi8(100)691 0262 00D0 rcall Utility_delay692 .stabn 68,0,219,.LM78-UIMgr_processReceivedData693 .LM78:694 0264 8091 0000 lds r24,receivedCmd695 0268 8850 subi r24,lo8(-(-8))696 026a 8230 cpi r24,lo8(2)697 026c 58F4 brsh .L71698 .LBB24:699 .LBB25:700 .stabn 68,0,531,.LM79-UIMgr_processReceivedData701 .LM79:702 026e 8EE4 ldi r24,lo8(78)703 0270 F4DE rcall UIMgr_writeTxFifo704 .stabn 68,0,532,.LM80-UIMgr_processReceivedData705 .LM80:706 0272 83E4 ldi r24,lo8(67)707 0274 F2DE rcall UIMgr_writeTxFifoGAS LISTING /tmp/ccRvT1Qm.s page 25708 .stabn 68,0,533,.LM81-UIMgr_processReceivedData709 .LM81:710 0276 8BE4 ldi r24,lo8(75)711 0278 F0DE rcall UIMgr_writeTxFifo712 .stabn 68,0,534,.LM82-UIMgr_processReceivedData713 .LM82:714 027a 8DE0 ldi r24,lo8(13)715 027c EEDE rcall UIMgr_writeTxFifo716 .LBE25:717 .LBE24:718 .stabn 68,0,223,.LM83-UIMgr_processReceivedData719 .LM83:720 027e 80E9 ldi r24,lo8(-112)721 0280 00D0 rcall Exec_writeEventFifo722 0282 89C0 rjmp .L73723 .L71:724 .LBB26:725 .LBB27:726 .stabn 68,0,516,.LM84-UIMgr_processReceivedData727 .LM84:728 0284 81E4 ldi r24,lo8(65)729 0286 E9DE rcall UIMgr_writeTxFifo730 .stabn 68,0,517,.LM85-UIMgr_processReceivedData731 .LM85:732 0288 83E4 ldi r24,lo8(67)733 028a E7DE rcall UIMgr_writeTxFifo734 .stabn 68,0,518,.LM86-UIMgr_processReceivedData735 .LM86:736 028c 8BE4 ldi r24,lo8(75)737 028e E5DE rcall UIMgr_writeTxFifo738 .stabn 68,0,519,.LM87-UIMgr_processReceivedData739 .LM87:740 0290 8DE0 ldi r24,lo8(13)741 0292 E3DE rcall UIMgr_writeTxFifo742 .LBE27:743 .LBE26:744 .stabn 68,0,230,.LM88-UIMgr_processReceivedData745 .LM88:746 0294 80E9 ldi r24,lo8(-112)747 0296 00D0 rcall Exec_writeEventFifo748 .LBB28:749 .LBB29:750 .stabn 68,0,316,.LM89-UIMgr_processReceivedData751 .LM89:752 0298 8091 0000 lds r24,receivedCmd753 029c 8130 cpi r24,lo8(1)754 029e 09F4 brne .+2755 02a0 7AC0 rjmp .L73756 .stabn 68,0,319,.LM90-UIMgr_processReceivedData757 .LM90:758 02a2 8823 tst r24759 02a4 71F4 brne .L75760 .stabn 68,0,322,.LM91-UIMgr_processReceivedData761 .LM91:762 02a6 8091 0000 lds r24,AVRcamVersion763 02aa 8823 tst r24764 02ac 09F4 brne .+2GAS LISTING /tmp/ccRvT1Qm.s page 26765 02ae 73C0 rjmp .L73766 02b0 C0E0 ldi r28,lo8(AVRcamVersion)767 02b2 D0E0 ldi r29,hi8(AVRcamVersion)768 .L78:769 .stabn 68,0,324,.LM92-UIMgr_processReceivedData770 .LM92:771 02b4 2196 adiw r28,1772 02b6 D1DE rcall UIMgr_writeTxFifo773 .stabn 68,0,322,.LM93-UIMgr_processReceivedData774 .LM93:775 02b8 8881 ld r24,Y776 02ba 8823 tst r24777 02bc 09F4 brne .+2778 02be 6BC0 rjmp .L73779 02c0 F9CF rjmp .L78780 .L75:781 .stabn 68,0,327,.LM94-UIMgr_processReceivedData782 .LM94:783 02c2 8730 cpi r24,lo8(7)784 02c4 11F4 brne .L79785 .stabn 68,0,329,.LM95-UIMgr_processReceivedData786 .LM95:787 02c6 00D0 rcall CamInt_resetCam788 02c8 66C0 rjmp .L73789 .L79:790 .stabn 68,0,331,.LM96-UIMgr_processReceivedData791 .LM96:792 02ca 8330 cpi r24,lo8(3)793 02cc 31F4 brne .L81794 .stabn 68,0,340,.LM97-UIMgr_processReceivedData795 .LM97:796 02ce 84E6 ldi r24,lo8(100)797 02d0 90E0 ldi r25,hi8(100)798 02d2 00D0 rcall Utility_delay799 .stabn 68,0,341,.LM98-UIMgr_processReceivedData800 .LM98:801 02d4 82E0 ldi r24,lo8(2)802 02d6 00D0 rcall Exec_writeEventFifo803 02d8 5EC0 rjmp .L73804 .L81:805 .stabn 68,0,343,.LM99-UIMgr_processReceivedData806 .LM99:807 02da 8230 cpi r24,lo8(2)808 02dc 99F4 brne .L83809 .stabn 68,0,347,.LM100-UIMgr_processReceivedData810 .LM100:811 02de 8091 0000 lds r24,tokenCount812 02e2 8230 cpi r24,lo8(2)813 02e4 68F0 brlo .L85814 02e6 11E0 ldi r17,lo8(1)815 .L87:816 .stabn 68,0,350,.LM101-UIMgr_processReceivedData817 .LM101:818 02e8 E12F mov r30,r17819 02ea FF27 clr r31820 02ec E050 subi r30,lo8(-(tokenBuffer))821 02ee F040 sbci r31,hi8(-(tokenBuffer))GAS LISTING /tmp/ccRvT1Qm.s page 27822 02f0 6181 ldd r22,Z+1823 02f2 8081 ld r24,Z824 02f4 00D0 rcall CamConfig_setCamReg825 .stabn 68,0,347,.LM102-UIMgr_processReceivedData826 .LM102:827 02f6 1E5F subi r17,lo8(-(2))828 02f8 8091 0000 lds r24,tokenCount829 02fc 1817 cp r17,r24830 02fe A0F3 brlo .L87831 .L85:832 .stabn 68,0,352,.LM103-UIMgr_processReceivedData833 .LM103:834 0300 00D0 rcall CamConfig_sendFifoCmds835 0302 49C0 rjmp .L73836 .L83:837 .stabn 68,0,354,.LM104-UIMgr_processReceivedData838 .LM104:839 0304 8430 cpi r24,lo8(4)840 0306 31F4 brne .L88841 .stabn 68,0,357,.LM105-UIMgr_processReceivedData842 .LM105:843 0308 84E6 ldi r24,lo8(100)844 030a 90E0 ldi r25,hi8(100)845 030c 00D0 rcall Utility_delay846 .stabn 68,0,358,.LM106-UIMgr_processReceivedData847 .LM106:848 030e 80E8 ldi r24,lo8(-128)849 0310 00D0 rcall Exec_writeEventFifo850 0312 41C0 rjmp .L73851 .L88:852 .stabn 68,0,360,.LM107-UIMgr_processReceivedData853 .LM107:854 0314 8530 cpi r24,lo8(5)855 0316 19F4 brne .L90856 .stabn 68,0,362,.LM108-UIMgr_processReceivedData857 .LM108:858 0318 81E8 ldi r24,lo8(-127)859 031a 00D0 rcall Exec_writeEventFifo860 031c 3CC0 rjmp .L73861 .L90:862 .stabn 68,0,364,.LM109-UIMgr_processReceivedData863 .LM109:864 031e 8630 cpi r24,lo8(6)865 0320 09F0 breq .+2866 0322 39C0 rjmp .L73867 .stabn 68,0,367,.LM110-UIMgr_processReceivedData868 .LM110:869 0324 8091 0000 lds r24,tokenCount870 0328 8823 tst r24871 032a 09F4 brne .+2872 032c 34C0 rjmp .L73873 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 28879 .stabn 68,0,369,.LM111-UIMgr_processReceivedData880 .LM111:881 0338 842F mov r24,r20882 033a 9927 clr r25883 033c 9C01 movw r18,r24884 033e 2F5F subi r18,lo8(-(1))885 0340 3F4F sbci r19,hi8(-(1))886 0342 F901 movw r30,r18887 0344 E00F add r30,r16888 0346 F11F adc r31,r17889 0348 E081 ld r30,Z890 034a EC01 movw r28,r24891 034c C60F add r28,r22892 034e D71F adc r29,r23893 0350 E883 st Y,r30894 .LBB30:895 .LBB31:896 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h",132,0,0,.Ltext1897 .Ltext1:1:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /* Copyright (c) 2002, 2003, 2004 Marek Michalkiewicz2:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Copyright (c) 2005, 2006 Bjoern Haase3:/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 without6:/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 copyright9:/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 copyright12:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** notice, this list of conditions and the following disclaimer in13:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** the documentation and/or other materials provided with the14:/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 of17:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** contributors may be used to endorse or promote products derived18:/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, THE22:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE23:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE24:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR25:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF26:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS27:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN28:/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 THE30:/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.h36:/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 2939:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** eeprom_write_word and eeprom_write_block added by Artur Lipowski40:/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 Haase42:/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_ 147:/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_t49:/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 **** #else56:/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 **** #endif58:/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_eeprom63:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** In order to be able to work without a requiring a multilib64:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** approach for dealing with controllers having the EEPROM registers65:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** at different positions in memory space, the eeprom functions evaluate66:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** __EEPROM_REG_LOCATIONS__: It is assumed to be defined by67:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** the device io header and contains 6 uppercase hex digits encoding the68:/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 the73:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** register location that is valid for most controllers. The value74:/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 the75:/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__ 1C1D1E77:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #endif78:/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) #EXP80:/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_TAB83:/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 **** #endif85:/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 handling88:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** \code #include <avr/eeprom.h> \endcode89:/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 library91:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** routines suitable for handling the data EEPROM contained in the92:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** AVR microcontrollers. The implementation uses a simple polled93:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** mode interface. Applications that require interrupt-controlled94:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** EEPROM access to ensure that no time will be wasted in spinloops95:/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 3096:/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 EEPROM98:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** is ready to be accessed. Since this may cause long delays if a99:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** write operation is still pending, time-critical applications100:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** should first poll the EEPROM e. g. using eeprom_is_ready() before101:/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 the104:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** assembler subroutines directly. This prevents that the compiler105:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** generates push/pops for the call-clobbered registers. This way106:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** also a specific calling convention could be used for the eeprom107:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** routines e.g. by passing values in __tmp_reg__, eeprom addresses in108:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** X and memory addresses in Z registers. Method is optimized for code109:/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 register112:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** set: 0x1F,0x20,0x21 and 0x1C,0x1D,0x1E113:/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 be116:/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 ensure118:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** proper protection (e.g. by disabling interrupts before accessing119:/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 does125:/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 31153:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /** \def EEMEM154:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** \ingroup avr_eeprom155:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Attribute expression causing a variable to be allocated within the .eeprom156:/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_ready160:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** \ingroup avr_eeprom161:/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 **** #else172:/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 **** #endif174:/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_wait176:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** \ingroup avr_eeprom177:/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_eeprom186:/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_t189:/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 volatile898 .stabn 68,0,192,.LM112-UIMgr_processReceivedData899 .LM112:900 0352 D901 movw r26,r18901 /* #APP */902 0354 00D0 rcall __eeprom_read_byte_1C1D1E903 0356 802D mov r24,__tmp_reg__904 /* #NOAPP */905 .LBE31:906 .LBE30:907 .stabs "UIMgr.c",132,0,0,.Ltext2908 .Ltext2:909 .stabn 68,0,374,.LM113-UIMgr_processReceivedData910 .LM113:911 0358 E817 cp r30,r24912 035a C1F0 breq .L95913 .LBB32:914 .LBB33:GAS LISTING /tmp/ccRvT1Qm.s page 32915 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h",132,0,0,.Ltext3916 .Ltext3:193:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** ( XCALL " __eeprom_read_byte_" _REG_LOCATION_SUFFIX CR_TAB194:/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_eeprom202:/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_t204:/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_TAB210:/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_eeprom217:/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 to218:/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 inline220:/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 **** void223:/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_TAB235:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "sbiw %2,1" CR_TAB236:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "brlt .%=_finished" CR_TAB237:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** XCALL " __eeprom_read_byte_" _REG_LOCATION_SUFFIX CR_TAB238:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "st z+,__tmp_reg__" CR_TAB239:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "rjmp .%=_start" CR_TAB240:/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 33248:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** else249:/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_SUFFIX256:/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 **** else262:/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_TAB269:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** XCALL " __eeprom_read_block_" _REG_LOCATION_SUFFIX270:/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_eeprom281:/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 **** void284:/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_processReceivedData918 .LM114:919 035c D901 movw r26,r18920 /* #APP */921 035e 0E2E mov __tmp_reg__,r30922 0360 00D0 rcall __eeprom_write_byte_1C1D1E923 /* #NOAPP */924 .LBE33:925 .LBE32:926 .LBB34:927 .LBB35:928 .stabn 68,0,192,.LM115-UIMgr_processReceivedData929 .LM115:930 0362 D901 movw r26,r18931 /* #APP */932 0364 00D0 rcall __eeprom_read_byte_1C1D1E933 0366 802D mov r24,__tmp_reg__934 /* #NOAPP */GAS LISTING /tmp/ccRvT1Qm.s page 34935 .LBE35:936 .LBE34:937 .stabs "UIMgr.c",132,0,0,.Ltext4938 .Ltext4:939 .stabn 68,0,384,.LM116-UIMgr_processReceivedData940 .LM116:941 0368 9881 ld r25,Y942 036a 9817 cp r25,r24943 036c 79F0 breq .L95944 .LBB36:945 .LBB37:946 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h",132,0,0,.Ltext5947 .Ltext5:948 .stabn 68,0,286,.LM117-UIMgr_processReceivedData949 .LM117:950 036e D901 movw r26,r18951 /* #APP */952 0370 092E mov __tmp_reg__,r25953 0372 00D0 rcall __eeprom_write_byte_1C1D1E954 /* #NOAPP */955 .LBE37:956 .LBE36:957 .LBB38:958 .LBB39:959 .stabn 68,0,192,.LM118-UIMgr_processReceivedData960 .LM118:961 0374 D901 movw r26,r18962 /* #APP */963 0376 00D0 rcall __eeprom_read_byte_1C1D1E964 0378 802D mov r24,__tmp_reg__965 /* #NOAPP */966 .LBE39:967 .LBE38:968 .stabs "UIMgr.c",132,0,0,.Ltext6969 .Ltext6:970 .stabn 68,0,384,.LM119-UIMgr_processReceivedData971 .LM119:972 037a 9881 ld r25,Y973 037c 9817 cp r25,r24974 037e 31F0 breq .L95975 .LBB40:976 .LBB41:977 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h",132,0,0,.Ltext7978 .Ltext7:979 .stabn 68,0,286,.LM120-UIMgr_processReceivedData980 .LM120:981 0380 D901 movw r26,r18982 /* #APP */983 0382 092E mov __tmp_reg__,r25984 0384 00D0 rcall __eeprom_write_byte_1C1D1E985 /* #NOAPP */986 .LBE41:987 .LBE40:988 .LBB42:989 .LBB43:990 .stabn 68,0,192,.LM121-UIMgr_processReceivedData991 .LM121:GAS LISTING /tmp/ccRvT1Qm.s page 35992 0386 D901 movw r26,r18993 /* #APP */994 0388 00D0 rcall __eeprom_read_byte_1C1D1E995 038a 802D mov r24,__tmp_reg__996 /* #NOAPP */997 .L95:998 .LBE43:999 .LBE42:1000 .stabs "UIMgr.c",132,0,0,.Ltext81001 .Ltext8:1002 .stabn 68,0,367,.LM122-UIMgr_processReceivedData1003 .LM122:1004 038c 4F5F subi r20,lo8(-(1))1005 038e 8091 0000 lds r24,tokenCount1006 0392 4817 cp r20,r241007 0394 88F2 brlo .L941008 .L73:1009 .LBE29:1010 .LBE28:1011 .stabn 68,0,235,.LM123-UIMgr_processReceivedData1012 .LM123:1013 0396 1092 0000 sts tokenCount,__zero_reg__1014 .stabn 68,0,236,.LM124-UIMgr_processReceivedData1015 .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 r241021 03a4 E9F7 brne .-61022 03a6 3FC0 rjmp .L1191023 .L66:1024 .stabn 68,0,238,.LM125-UIMgr_processReceivedData1025 .LM125:1026 03a8 9032 cpi r25,lo8(32)1027 03aa F1F4 brne .L991028 .stabn 68,0,241,.LM126-UIMgr_processReceivedData1029 .LM126:1030 03ac 8091 0000 lds r24,tokenCount1031 03b0 8823 tst r241032 03b2 39F4 brne .L1011033 .stabn 68,0,243,.LM127-UIMgr_processReceivedData1034 .LM127:1035 03b4 8FDE rcall UIMgr_convertTokenToCmd1036 .stabn 68,0,244,.LM128-UIMgr_processReceivedData1037 .LM128:1038 03b6 8091 0000 lds r24,tokenCount1039 03ba 8F5F subi r24,lo8(-(1))1040 03bc 8093 0000 sts tokenCount,r241041 03c0 32C0 rjmp .L1191042 .L101:1043 .stabn 68,0,254,.LM129-UIMgr_processReceivedData1044 .LM129:1045 03c2 9927 clr r251046 03c4 CF97 sbiw r24,631047 03c6 4CF0 brlt .L1031048 .stabn 68,0,259,.LM130-UIMgr_processReceivedDataGAS LISTING /tmp/ccRvT1Qm.s page 361049 .LM130:1050 03c8 1092 0000 sts charCount,__zero_reg__1051 .stabn 68,0,260,.LM131-UIMgr_processReceivedData1052 .LM131:1053 03cc 1092 0000 sts charIndex,__zero_reg__1054 .stabn 68,0,261,.LM132-UIMgr_processReceivedData1055 .LM132:1056 03d0 1092 0000 sts tokenCount,__zero_reg__1057 .stabn 68,0,262,.LM133-UIMgr_processReceivedData1058 .LM133:1059 03d4 F092 0000 sts receivedCmd,r151060 03d8 26C0 rjmp .L1191061 .L103:1062 .stabn 68,0,267,.LM134-UIMgr_processReceivedData1063 .LM134:1064 03da F6DE rcall UIMgr_convertTokenToValue1065 .stabn 68,0,268,.LM135-UIMgr_processReceivedData1066 .LM135:1067 03dc 8091 0000 lds r24,tokenCount1068 03e0 8F5F subi r24,lo8(-(1))1069 03e2 8093 0000 sts tokenCount,r241070 03e6 1FC0 rjmp .L1191071 .L99:1072 .stabn 68,0,272,.LM136-UIMgr_processReceivedData1073 .LM136:1074 03e8 892F mov r24,r251075 03ea 8154 subi r24,lo8(-(-65))1076 03ec 8A31 cpi r24,lo8(26)1077 03ee 18F0 brlo .L1051078 03f0 8F5E subi r24,lo8(-(17))1079 03f2 8A30 cpi r24,lo8(10)1080 03f4 B0F4 brsh .L1071081 .L105:1082 .stabn 68,0,276,.LM137-UIMgr_processReceivedData1083 .LM137:1084 03f6 8091 0000 lds r24,charIndex1085 03fa E82F mov r30,r241086 03fc FF27 clr r311087 03fe E050 subi r30,lo8(-(asciiTokenBuffer))1088 0400 F040 sbci r31,hi8(-(asciiTokenBuffer))1089 0402 9083 st Z,r251090 .stabn 68,0,277,.LM138-UIMgr_processReceivedData1091 .LM138:1092 0404 9091 0000 lds r25,charCount1093 0408 9F5F subi r25,lo8(-(1))1094 040a 9093 0000 sts charCount,r251095 .stabn 68,0,278,.LM139-UIMgr_processReceivedData1096 .LM139:1097 040e 8F5F subi r24,lo8(-(1))1098 0410 8093 0000 sts charIndex,r241099 .stabn 68,0,279,.LM140-UIMgr_processReceivedData1100 .LM140:1101 0414 9430 cpi r25,lo8(4)1102 0416 38F0 brlo .L1191103 .stabn 68,0,284,.LM141-UIMgr_processReceivedData1104 .LM141:1105 0418 F092 0000 sts receivedCmd,r15GAS LISTING /tmp/ccRvT1Qm.s page 371106 .stabn 68,0,285,.LM142-UIMgr_processReceivedData1107 .LM142:1108 041c 1092 0000 sts charIndex,__zero_reg__1109 0420 02C0 rjmp .L1191110 .L107:1111 .stabn 68,0,291,.LM143-UIMgr_processReceivedData1112 .LM143:1113 0422 F092 0000 sts receivedCmd,r151114 .L119:1115 .stabn 68,0,199,.LM144-UIMgr_processReceivedData1116 .LM144:1117 0426 2091 0000 lds r18,UIMgr_rxFifoTail1118 042a 8091 0000 lds r24,UIMgr_rxFifoHead1119 042e 8217 cp r24,r181120 0430 09F0 breq .+21121 0432 FACE rjmp .L651122 .stabn 68,0,295,.LM145-UIMgr_processReceivedData1123 .LM145:1124 /* #APP */1125 0434 E894 clt1126 /* #NOAPP */1127 /* epilogue: frame size=0 */1128 0436 DF91 pop r291129 0438 CF91 pop r281130 043a 1F91 pop r171131 043c 0F91 pop r161132 043e FF90 pop r151133 0440 0895 ret1134 /* epilogue end (size=6) */1135 /* function UIMgr_processReceivedData size 297 (286) */1136 .size UIMgr_processReceivedData, .-UIMgr_processReceivedData1137 .stabs "tmpData:r(0,11)",64,0,194,251138 .stabn 192,0,0,UIMgr_processReceivedData-UIMgr_processReceivedData1139 .stabs "dataByte:r(0,11)",64,0,609,251140 .stabn 192,0,0,.LBB23-UIMgr_processReceivedData1141 .stabn 224,0,0,.LBE23-UIMgr_processReceivedData1142 .stabn 224,0,0,.Lscope9-UIMgr_processReceivedData1143 .Lscope9:1144 .stabs "",36,0,0,.Lscope9-UIMgr_processReceivedData1145 .stabd 78,0,01146 .stabs "UIMgr_dispatchEvent:F(0,15)",36,0,152,UIMgr_dispatchEvent1147 .stabs "event:P(0,11)",64,0,151,241148 .global UIMgr_dispatchEvent1149 .type UIMgr_dispatchEvent, @function1150 UIMgr_dispatchEvent:1151 .stabd 46,0,01152 .stabn 68,0,152,.LM146-UIMgr_dispatchEvent1153 .LM146:1154 /* prologue: frame size=0 */1155 /* prologue end (size=0) */1156 .stabn 68,0,153,.LM147-UIMgr_dispatchEvent1157 .LM147:1158 0442 8031 cpi r24,lo8(16)1159 0444 29F0 breq .L1231160 .stabn 68,0,153,.LM148-UIMgr_dispatchEvent1161 .LM148:1162 0446 8039 cpi r24,lo8(-112)GAS LISTING /tmp/ccRvT1Qm.s page 381163 0448 39F0 breq .L1241164 044a 8130 cpi r24,lo8(1)1165 044c 31F4 brne .L1251166 044e 02C0 rjmp .L1221167 .L123:1168 .stabn 68,0,156,.LM149-UIMgr_dispatchEvent1169 .LM149:1170 0450 38DE rcall UIMgr_transmitPendingData1171 0452 0895 ret1172 .L122:1173 .stabn 68,0,160,.LM150-UIMgr_dispatchEvent1174 .LM150:1175 0454 DFDE rcall UIMgr_processReceivedData1176 0456 0895 ret1177 .L124:1178 .stabn 68,0,164,.LM151-UIMgr_dispatchEvent1179 .LM151:1180 0458 0EDE rcall UIMgr_flushTxBuffer1181 .L125:1182 045a 0895 ret1183 /* epilogue: frame size=0 */1184 /* epilogue: noreturn */1185 /* epilogue end (size=0) */1186 /* function UIMgr_dispatchEvent size 13 (13) */1187 .size UIMgr_dispatchEvent, .-UIMgr_dispatchEvent1188 .Lscope10:1189 .stabs "",36,0,0,.Lscope10-UIMgr_dispatchEvent1190 .stabd 78,0,01191 .global UIMgr_rxFifoHead1192 .global UIMgr_rxFifoHead1193 .section .bss1194 .type UIMgr_rxFifoHead, @object1195 .size UIMgr_rxFifoHead, 11196 UIMgr_rxFifoHead:1197 0000 00 .skip 1,01198 .global UIMgr_rxFifoTail1199 .global UIMgr_rxFifoTail1200 .type UIMgr_rxFifoTail, @object1201 .size UIMgr_rxFifoTail, 11202 UIMgr_rxFifoTail:1203 0001 00 .skip 1,01204 .global UIMgr_txFifoHead1205 .global UIMgr_txFifoHead1206 .type UIMgr_txFifoHead, @object1207 .size UIMgr_txFifoHead, 11208 UIMgr_txFifoHead:1209 0002 00 .skip 1,01210 .global UIMgr_txFifoTail1211 .global UIMgr_txFifoTail1212 .type UIMgr_txFifoTail, @object1213 .size UIMgr_txFifoTail, 11214 UIMgr_txFifoTail:1215 0003 00 .skip 1,01216 .lcomm tokenCount,11217 .data1218 .type receivedCmd, @object1219 .size receivedCmd, 1GAS LISTING /tmp/ccRvT1Qm.s page 391220 receivedCmd:1221 0000 08 .byte 81222 .lcomm charCount,11223 .lcomm charIndex,11224 .type AVRcamVersion, @object1225 .size AVRcamVersion, 131226 AVRcamVersion:1227 0001 4156 5263 .string "AVRcam v1.4\r"1227 616D 20761227 312E 340D1227 001228 .lcomm asciiTokenBuffer,41229 .lcomm tokenBuffer,641230 .comm UIMgr_rxFifo,32,11231 .comm UIMgr_txFifo,64,11232 .stabs "charCount:S(0,11)",38,0,92,charCount1233 .stabs "charIndex:S(0,11)",38,0,93,charIndex1234 .stabs "asciiTokenBuffer:S(0,21)=ar(0,22)=r(0,22);0;0177777;;0;3;(0,11)",40,0,94,asciiTokenBuffer1235 .stabs "tokenCount:S(0,11)",38,0,95,tokenCount1236 .stabs "tokenBuffer:S(0,23)=ar(0,22);0;63;(0,11)",40,0,96,tokenBuffer1237 .stabs "receivedCmd:S(0,17)",38,0,97,receivedCmd1238 .stabs "AVRcamVersion:S(0,24)=ar(0,22);0;12;(0,11)",38,0,98,AVRcamVersion1239 .stabs "UIMgr_rxFifo:G(0,25)=ar(0,22);0;31;(0,11)",32,0,111,01240 .stabs "UIMgr_rxFifoHead:G(0,11)",32,0,112,01241 .stabs "UIMgr_rxFifoTail:G(0,11)",32,0,113,01242 .stabs "UIMgr_txFifo:G(0,23)",32,0,115,01243 .stabs "UIMgr_txFifoHead:G(0,11)",32,0,116,01244 .stabs "UIMgr_txFifoTail:G(0,11)",32,0,117,01245 .text1246 .stabs "",100,0,0,.Letext01247 .Letext0:1248 /* File "UIMgr.c": code 582 = 0x0246 ( 557), prologues 9, epilogues 16 */GAS LISTING /tmp/ccRvT1Qm.s page 40DEFINED 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_dispatchEventUNDEFINED SYMBOLS__do_copy_data__do_clear_bssUartInt_txByteatoiUtility_delayExec_writeEventFifoCamInt_resetCamCamConfig_setCamRegCamConfig_sendFifoCmdscolorMap__eeprom_read_byte_1C1D1E__eeprom_write_byte_1C1D1E