📄 avrcam.lss
字号:
39c: 84 ef ldi r24, 0xF4 ; 244
39e: 91 e0 ldi r25, 0x01 ; 1
3a0: 0e 94 fe 05 call 0xbfc
}
/* check to see if we have retrieved all of the needed lines */
if (lineCount >= 120) /* half 144, since we send two lines at a time */
3a4: 80 91 11 01 lds r24, 0x0111
3a8: 88 37 cpi r24, 0x78 ; 120
3aa: 70 f0 brcs .+28 ; 0x3c8
{
/* we're done, so send the dump complete?...nope, just change
states and we should be fine */
lineCount = 0;
3ac: 10 92 11 01 sts 0x0111, r1
currentState = ST_FrameMgr_idle;
3b0: 10 92 12 01 sts 0x0112, r1
/* disable the PCLK counting overflow interrupt */
TIMSK &= DISABLE_PCLK_TIMER1_OVERFLOW_BITMASK;////0xfb
3b4: 87 b7 in r24, 0x37 ; 55
3b6: 8b 7f andi r24, 0xFB ; 251
3b8: 87 bf out 0x37, r24 ; 55
CamConfig_setCamReg(0x11,0x00); /* reset the frame rate to normal*/
3ba: 60 e0 ldi r22, 0x00 ; 0
3bc: 81 e1 ldi r24, 0x11 ; 17
3be: 0e 94 9b 05 call 0xb36
CamConfig_sendFifoCmds();
3c2: 0e 94 a1 05 call 0xb42
3c6: 05 c0 rjmp .+10 ; 0x3d2
}
else
{
/* we have more lines to acquire in this frame, so keep on truckin...*/
PUBLISH_FAST_EVENT(FEV_PROCESS_LINE_COMPLETE);
3c8: 80 91 10 01 lds r24, 0x0110
3cc: 82 60 ori r24, 0x02 ; 2
3ce: 80 93 10 01 sts 0x0110, r24
3d2: 21 96 adiw r28, 0x01 ; 1
3d4: 0f b6 in r0, 0x3f ; 63
3d6: f8 94 cli
3d8: de bf out 0x3e, r29 ; 62
3da: 0f be out 0x3f, r0 ; 63
3dc: cd bf out 0x3d, r28 ; 61
3de: df 91 pop r29
3e0: cf 91 pop r28
3e2: 1f 91 pop r17
3e4: 0f 91 pop r16
3e6: ff 90 pop r15
3e8: ef 90 pop r14
3ea: df 90 pop r13
3ec: cf 90 pop r12
3ee: bf 90 pop r11
3f0: 08 95 ret
000003f2 <UIMgr_init>:
Outputs: none
***********************************************************/
void UIMgr_init(void)
{
memset(asciiTokenBuffer,0x00,MAX_TOKEN_LENGTH+1);
3f2: 10 92 1a 01 sts 0x011A, r1
3f6: 10 92 1b 01 sts 0x011B, r1
3fa: 10 92 1c 01 sts 0x011C, r1
3fe: 10 92 1d 01 sts 0x011D, r1
memset(tokenBuffer,0x00,MAX_TOKEN_COUNT);
402: 80 e4 ldi r24, 0x40 ; 64
404: ee e1 ldi r30, 0x1E ; 30
406: f1 e0 ldi r31, 0x01 ; 1
408: 98 2f mov r25, r24
40a: 11 92 st Z+, r1
40c: 9a 95 dec r25
40e: e9 f7 brne .-6 ; 0x40a
memset(UIMgr_txFifo,0x00,UI_MGR_TX_FIFO_SIZE);
410: ef e0 ldi r30, 0x0F ; 15
412: f4 e0 ldi r31, 0x04 ; 4
414: 11 92 st Z+, r1
416: 8a 95 dec r24
418: e9 f7 brne .-6 ; 0x414
memset(UIMgr_rxFifo,0x00,UI_MGR_RX_FIFO_SIZE);
41a: 80 e2 ldi r24, 0x20 ; 32
41c: ef ee ldi r30, 0xEF ; 239
41e: f3 e0 ldi r31, 0x03 ; 3
420: 11 92 st Z+, r1
422: 8a 95 dec r24
424: e9 f7 brne .-6 ; 0x420
426: 08 95 ret
00000428 <UIMgr_dispatchEvent>:
}
/***********************************************************
Function Name: UIMgr_dispatchEvent
Function Description: This function is responsible for
processing events that pertain to the UIMgr.
Inputs: event - the generated event
Outputs: none
***********************************************************/
void UIMgr_dispatchEvent(unsigned char event)
{
switch(event)
428: 99 27 eor r25, r25
42a: 81 30 cpi r24, 0x01 ; 1
42c: 91 05 cpc r25, r1
42e: 21 f0 breq .+8 ; 0x438
430: 80 39 cpi r24, 0x90 ; 144
432: 91 05 cpc r25, r1
434: 21 f0 breq .+8 ; 0x43e
436: 08 95 ret
{
case EV_SERIAL_DATA_RECEIVED: //first reach here
UIMgr_processReceivedData();
438: 0e 94 2f 02 call 0x45e
break;
43c: 08 95 ret
case EV_SERIAL_DATA_PENDING_TX:
UIMgr_flushTxBuffer();
43e: 0e 94 b8 03 call 0x770
442: 08 95 ret
444: 08 95 ret
00000446 <UIMgr_transmitPendingData>:
break;
}
}
/***********************************************************
Function Name: UIMgr_transmitPendingData
Function Description: This function is responsible for
transmitting a single byte of data if data is waiting
to be sent. Otherwise, if nothing is waiting, the
function just returns.
Inputs: none
Outputs: none
***********************************************************/
void UIMgr_transmitPendingData(void)
{
if (IS_DATA_IN_TX_FIFO() == TRUE)
446: 90 91 15 01 lds r25, 0x0115
44a: 80 91 16 01 lds r24, 0x0116
44e: 98 17 cp r25, r24
450: 21 f0 breq .+8 ; 0x45a
{
/* data is waiting...send a single byte */
UartInt_txByte( UIMgr_readTxFifo() );
452: 0e 94 db 03 call 0x7b6
456: 0e 94 09 04 call 0x812
45a: 08 95 ret
45c: 08 95 ret
0000045e <UIMgr_processReceivedData>:
}
}
/***********************************************************
Function Name: UIMgr_processReceivedData
Function Description: This function is responsible for
parsing any serial data waiting in the rx fifo
Inputs: none
Outputs: none
***********************************************************/
void UIMgr_processReceivedData(void)
{
45e: cf 93 push r28
unsigned char tmpData = 0;
/* still need to add a mechanism to handle token counts
that are excessive!!! FIX ME!!! */
while(IS_DATA_IN_RX_FIFO() == TRUE)
{
tmpData = UIMgr_readRxFifo();
if (tmpData == '\r')
{
/* we have reached a token separator */
if (tokenCount == 0)
{
/* convert the command */
UIMgr_convertTokenToCmd();
}
else
{
/* convert a value */
UIMgr_convertTokenToValue();
tokenCount++;
}
/* either way, it is time to try to process the received
token list since we have reached the end of the cmd. */
Utility_delay(100);
if (receivedCmd == invalidCmd ||
receivedCmd == noCmd )
{
UIMgr_sendNck();
PUBLISH_EVENT(EV_SERIAL_DATA_PENDING_TX);//Exec_writeEventFifo(event)
}
else
{
UIMgr_sendAck();
/* publish the serial data pending event, so it
will push the ACK out before we execute the cmd */
PUBLISH_EVENT(EV_SERIAL_DATA_PENDING_TX);
UIMgr_executeCmd();
}
/* reset any necessary data */
tokenCount = 0;
memset(tokenBuffer,0x00,MAX_TOKEN_COUNT);
}
else if (tmpData == ' ') /* space char */
{
/* the end of a token has been reached */
if (tokenCount == 0)
{
UIMgr_convertTokenToCmd();
tokenCount++; /* check this...why is this being incremented here??? This
means we have received a token, with tokenCount == 0, which means it is a
command...why is this contributing to tokenCount?
This might cause the set color map command to include too much data, since
it sets the color map based on tokenCount...CHECK*/
}
else
{
/* check to see if this token is going to push
us over the limit...if so, abort the transaction */
if (tokenCount+1 >= MAX_TOKEN_COUNT)//=64
{
/* we received too many tokens, and
need to NCK this request, since its too
large...reset everything...*/
charCount=0;
charIndex=0;
tokenCount=0;
receivedCmd = invalidCmd;
}
else
{
/* tokenCount is still in range...*/
UIMgr_convertTokenToValue();
tokenCount++;
}
}
}
else if ( (tmpData >= 'A' && tmpData <= 'Z') ||
(tmpData >= '0' && tmpData <= '9') )
{
/* a valid range of token was received */
asciiTokenBuffer[charIndex] = tmpData;
charCount++;
charIndex++;
if (charCount > MAX_TOKEN_LENGTH)//=3
{
/* we have received a token that cannot be handled...
set the received cmd to an invalid cmd, and wait
for the \r to process it */
receivedCmd = invalidCmd;
charIndex = 0; /* ...so we won't overwrite memory */
}
}
else
{
/* an invalid character was received */
receivedCmd = invalidCmd;
460: 90 91 13 01 lds r25, 0x0113
464: 80 91 14 01 lds r24, 0x0114
468: 98 17 cp r25, r24
46a: 09 f4 brne .+2 ; 0x46e
46c: 81 c0 rjmp .+258 ; 0x570
46e: c6 e0 ldi r28, 0x06 ; 6
470: 0e 94 c9 03 call 0x792
474: 38 2f mov r19, r24
476: 8d 30 cpi r24, 0x0D ; 13
478: 69 f5 brne .+90 ; 0x4d4
47a: 80 91 19 01 lds r24, 0x0119
47e: 88 23 and r24, r24
480: 19 f4 brne .+6 ; 0x488
482: 0e 94 28 03 call 0x650
486: 07 c0 rjmp .+14 ; 0x496
488: 0e 94 ff 02 call 0x5fe
48c: 80 91 19 01 lds r24, 0x0119
490: 8f 5f subi r24, 0xFF ; 255
492: 80 93 19 01 sts 0x0119, r24
496: 84 e6 ldi r24, 0x64 ; 100
498: 90 e0 ldi r25, 0x00 ; 0
49a: 0e 94 fe 05 call 0xbfc
49e: 80 91 00 01 lds r24, 0x0100
4a2: 85 50 subi r24, 0x05 ; 5
4a4: 82 30 cpi r24, 0x02 ; 2
4a6: 30 f4 brcc .+12 ; 0x4b4
4a8: 0e 94 7e 03 call 0x6fc
4ac: 80 e9 ldi r24, 0x90 ; 144
4ae: 0e 94 00 01 call 0x200
4b2: 07 c0 rjmp .+14 ; 0x4c2
4b4: 0e 94 71 03 call 0x6e2
4b8: 80 e9 ldi r24, 0x90 ; 144
4ba: 0e 94 00 01 call 0x200
4be: 0e 94 bb 02 call 0x576
4c2: 10 92 19 01 sts 0x0119, r1
4c6: 80 e4 ldi r24, 0x40 ; 64
4c8: ee e1 ldi r30, 0x1E ; 30
4ca: f1 e0 ldi r31, 0x01 ; 1
4cc: 11 92 st Z+, r1
4ce: 8a 95 dec r24
4d0: e9 f7 brne .-6 ; 0x4cc
4d2: 47 c0 rjmp .+142 ; 0x562
4d4: 80 32 cpi r24, 0x20 ; 32
4d6: 21 f5 brne .+72 ; 0x520
4d8: 80 91 19 01 lds r24, 0x0119
4dc: 88 23 and r24, r24
4de: 41 f4 brne .+16 ; 0x4f0
4e0: 0e 94 28 03 call 0x650
4e4: 80 91 19 01 lds r24, 0x0119
4e8: 8f 5f subi r24, 0xFF ; 255
4ea: 80 93 19 01 sts 0x0119, r24
4ee: 39 c0 rjmp .+114 ; 0x562
4f0: 80 91 19 01 lds r24, 0x0119
4f4: 99 27 eor r25, r25
4f6: 01 96 adiw r24, 0x01 ; 1
4f8: 80 34 cpi r24, 0x40 ; 64
4fa: 91 05 cpc r25, r1
4fc: 4c f0 brlt .+18 ; 0x510
4fe: 10 92 17 01 sts 0x0117, r1
502: 10 92 18 01 sts 0x0118, r1
506: 10 92 19 01 sts 0x0119, r1
50a: c0 93 00 01 sts 0x0100, r28
50e: 29 c0 rjmp .+82 ; 0x562
510: 0e 94 ff 02 call 0x5fe
514: 80 91 19 01 lds r24, 0x0119
518: 8f 5f subi r24, 0xFF ; 255
51a: 80 93 19 01 sts 0x0119, r24
51e: 21 c0 rjmp .+66 ; 0x562
520: 81 54 subi r24, 0x41 ; 65
522: 8a 31 cpi r24, 0x1A ; 26
524: 18 f0 brcs .+6 ; 0x52c
526: 8f 5e subi r24, 0xEF ; 239
528: 8a 30 cpi r24, 0x0A ; 10
52a: c8 f4 brcc .+50 ; 0x55e
52c: 20 91 18 01 lds r18, 0x0118
530: 82 2f mov r24, r18
532: 99 27 eor r25, r25
534: fc 01 movw r30, r24
536: e6 5e subi r30, 0xE6 ; 230
538: fe 4f sbci r31, 0xFE ; 254
53a: 30 83 st Z, r19
53c: 80 91 17 01 lds r24, 0x0117
540: 98 2f mov r25, r24
542: 9f 5f subi r25, 0xFF ; 255
544: 90 93 17 01 sts 0x0117, r25
548: 82 2f mov r24, r18
54a: 8f 5f subi r24, 0xFF ; 255
54c: 80 93 18 01 sts 0x0118, r24
550: 94 30 cpi r25, 0x04 ; 4
552: 38 f0 brcs .+14 ; 0x562
554: c0 93 00 01 sts 0x0100, r28
558: 10 92 18 01 sts 0x0118, r1
55c: 02 c0 rjmp .+4 ; 0x562
55e: c0 93 00 01 sts 0x0100, r28
562: 90 91 13 01 lds r25, 0x0113
566: 80 91 14 01 lds r24, 0x0114
56a: 98 17 cp r25, r24
56c: 09 f0 breq .+2 ; 0x570
56e: 80 cf rjmp .-256 ; 0x470
}
} /* end while */
asm volatile("clt"::); /* clear out the T flag in case it wasn't
570: e8 94 clt
572: cf 91 pop r28
574: 08 95 ret
00000576 <UIMgr_executeCmd>:
cleared already */
}
/***********************************************************
Function Name: UIMgr_executeCmd
Function Description: This function is responsible for
executing whatever cmd is stored in the receivedCmd
object.
Inputs: none
Outputs: none
***********************************************************/
static void UIMgr_executeCmd(void)
{
576: cf 93 push r28
578: df 93 push r29
unsigned char i;//,eepromData, num_writes=0;
unsigned char *pData;
#if DEBUG_COLOR_MAP
unsigned char asciiBuffer[5];
#endif
if (receivedCmd == pingCmd)
57a: 80 91 00 01 lds r24, 0x0100
57e: 81 30 cpi r24, 0x01 ; 1
580: d9 f1 breq .+118 ; 0x5f8
{
}
else if (receivedCmd == getVersionCmd)
582: 88 23 and r24, r24
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -