⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 avrcam.lss

📁 he AVRcam source files were built using the WinAVR distribution (version 3.3.1 of GCC). I haven t t
💻 LSS
📖 第 1 页 / 共 5 页
字号:
	Utility_delay(1000);
     176:	88 ee       	ldi	r24, 0xE8	; 232
     178:	93 e0       	ldi	r25, 0x03	; 3
     17a:	65 d6       	rcall	.+3274   	; 0xe46
	
	/* the rest of the application will be under the
	control of the Executive.  */
	Exec_run();	
     17c:	03 d0       	rcall	.+6      	; 0x184
	
	/* this should never be reached */
	return(0);
}
     17e:	80 e0       	ldi	r24, 0x00	; 0
     180:	90 e0       	ldi	r25, 0x00	; 0
     182:	8c c7       	rjmp	.+3864   	; 0x109c

00000184 <Exec_run>:
	Inputs:  none
	Outputs: none
***********************************************************/	
void Exec_run(void)
{
     184:	cf 93       	push	r28
	unsigned char eventGenerated;
	
	while(1)
	{
		if (fastEventBitmask)
     186:	80 91 72 00 	lds	r24, 0x0072
     18a:	88 23       	and	r24, r24
     18c:	b9 f0       	breq	.+46     	; 0x1bc
		{
			/* an event needing fast processing has been received */
			/* a received line needs to be processed...this
			needs to be processed as quickly as possible */
			if (fastEventBitmask & FEV_ACQUIRE_LINE_COMPLETE)
     18e:	80 ff       	sbrs	r24, 0
     190:	09 c0       	rjmp	.+18     	; 0x1a4
			{
                DISABLE_INTS();
     192:	f8 94       	cli
				fastEventBitmask &= ~FEV_ACQUIRE_LINE_COMPLETE;	
     194:	80 91 72 00 	lds	r24, 0x0072
     198:	8e 7f       	andi	r24, 0xFE	; 254
     19a:	80 93 72 00 	sts	0x0072, r24
                ENABLE_INTS();
     19e:	78 94       	sei
				FrameMgr_processLine();				
     1a0:	f8 d0       	rcall	.+496    	; 0x392
			
				/* also check if serial data needs to be sent
				out through UIMgr */
				UIMgr_transmitPendingData();	
     1a2:	ac d2       	rcall	.+1368   	; 0x6fc

				/* we can't just call acquire line again here,
				since we don't know if we need to acquire another
				line or not (it depends on the FrameMgr to figure
				this out) */
			}
			if (fastEventBitmask & FEV_PROCESS_LINE_COMPLETE)
     1a4:	80 91 72 00 	lds	r24, 0x0072
     1a8:	81 ff       	sbrs	r24, 1
     1aa:	08 c0       	rjmp	.+16     	; 0x1bc
			{
                DISABLE_INTS();
     1ac:	f8 94       	cli
				fastEventBitmask &= ~FEV_PROCESS_LINE_COMPLETE;
     1ae:	80 91 72 00 	lds	r24, 0x0072
     1b2:	8d 7f       	andi	r24, 0xFD	; 253
     1b4:	80 93 72 00 	sts	0x0072, r24
                ENABLE_INTS();
     1b8:	78 94       	sei
				FrameMgr_acquireLine();
     1ba:	b9 d0       	rcall	.+370    	; 0x32e
			}
		}		
		
        if (IS_DATA_IN_EVENT_FIFO() == TRUE)		
     1bc:	90 91 70 00 	lds	r25, 0x0070
     1c0:	80 91 71 00 	lds	r24, 0x0071
     1c4:	98 17       	cp	r25, r24
     1c6:	f9 f2       	breq	.-66     	; 0x186
		{			
            eventGenerated = Exec_readEventFifo();
     1c8:	32 d0       	rcall	.+100    	; 0x22e
     1ca:	c8 2f       	mov	r28, r24
			switch(eventGenerated)
     1cc:	99 27       	eor	r25, r25
     1ce:	80 31       	cpi	r24, 0x10	; 16
     1d0:	91 05       	cpc	r25, r1
     1d2:	11 f1       	breq	.+68     	; 0x218
     1d4:	81 31       	cpi	r24, 0x11	; 17
     1d6:	91 05       	cpc	r25, r1
     1d8:	7c f4       	brge	.+30     	; 0x1f8
     1da:	82 30       	cpi	r24, 0x02	; 2
     1dc:	91 05       	cpc	r25, r1
     1de:	09 f1       	breq	.+66     	; 0x222
     1e0:	83 30       	cpi	r24, 0x03	; 3
     1e2:	91 05       	cpc	r25, r1
     1e4:	1c f4       	brge	.+6      	; 0x1ec
     1e6:	01 97       	sbiw	r24, 0x01	; 1
     1e8:	d1 f0       	breq	.+52     	; 0x21e
     1ea:	cd cf       	rjmp	.-102    	; 0x186
     1ec:	84 30       	cpi	r24, 0x04	; 4
     1ee:	91 05       	cpc	r25, r1
     1f0:	c1 f0       	breq	.+48     	; 0x222
     1f2:	08 97       	sbiw	r24, 0x08	; 8
     1f4:	b1 f0       	breq	.+44     	; 0x222
     1f6:	c7 cf       	rjmp	.-114    	; 0x186
     1f8:	80 38       	cpi	r24, 0x80	; 128
     1fa:	91 05       	cpc	r25, r1
     1fc:	91 f0       	breq	.+36     	; 0x222
     1fe:	81 38       	cpi	r24, 0x81	; 129
     200:	91 05       	cpc	r25, r1
     202:	1c f4       	brge	.+6      	; 0x20a
     204:	80 97       	sbiw	r24, 0x20	; 32
     206:	69 f0       	breq	.+26     	; 0x222
     208:	be cf       	rjmp	.-132    	; 0x186
     20a:	81 38       	cpi	r24, 0x81	; 129
     20c:	91 05       	cpc	r25, r1
     20e:	49 f0       	breq	.+18     	; 0x222
     210:	80 39       	cpi	r24, 0x90	; 144
     212:	91 05       	cpc	r25, r1
     214:	49 f0       	breq	.+18     	; 0x228
     216:	b7 cf       	rjmp	.-146    	; 0x186
			{
				case (EV_DUMP_FRAME):
					FrameMgr_dispatchEvent(eventGenerated);
					break;
					
				case (EV_ENABLE_TRACKING):
					FrameMgr_dispatchEvent(eventGenerated);
					break;
					
				case (EV_DISABLE_TRACKING):
					FrameMgr_dispatchEvent(eventGenerated);
					break;
					
				case (EV_ACQUIRE_LINE_COMPLETE):
					FrameMgr_dispatchEvent(eventGenerated);
     218:	8c 2f       	mov	r24, r28
     21a:	33 d0       	rcall	.+102    	; 0x282
					UIMgr_dispatchEvent(eventGenerated);
     21c:	05 c0       	rjmp	.+10     	; 0x228
					break;
					
				case (EV_ACQUIRE_FRAME_COMPLETE):				
					FrameMgr_dispatchEvent(eventGenerated);
					break;
					
				case (EV_PROCESS_LINE_COMPLETE):
					FrameMgr_dispatchEvent(eventGenerated);
					break;
				
				case (EV_PROCESS_FRAME_COMPLETE):
					FrameMgr_dispatchEvent(eventGenerated);
					break;
					
				case (EV_SERIAL_DATA_RECEIVED):
					UIMgr_dispatchEvent(eventGenerated);
     21e:	8c 2f       	mov	r24, r28
     220:	58 d2       	rcall	.+1200   	; 0x6d2
					FrameMgr_dispatchEvent(eventGenerated);
     222:	8c 2f       	mov	r24, r28
     224:	2e d0       	rcall	.+92     	; 0x282
					break;																
     226:	af cf       	rjmp	.-162    	; 0x186

				case (EV_SERIAL_DATA_PENDING_TX):
					UIMgr_dispatchEvent(eventGenerated);
     228:	8c 2f       	mov	r24, r28
     22a:	53 d2       	rcall	.+1190   	; 0x6d2
					break;
     22c:	ac cf       	rjmp	.-168    	; 0x186

0000022e <Exec_readEventFifo>:
								
				default:		
					break;
			}			
		}
        
        /* toggle the debug line */

	}
}

/***********************************************************
	Function Name: Exec_readEventFifo
	Function Description: This function is responsible for
	reading a single event out of the event fifo.
	Inputs:  none 
	Outputs: unsigned char-the data read
***********************************************************/	
static unsigned char Exec_readEventFifo(void)
{
	unsigned char dataByte, tmpTail;
	
	DISABLE_INTS();
     22e:	f8 94       	cli
	/* just return the current tail from the tx fifo */
	dataByte = Exec_eventFifo[Exec_eventFifoTail];	
     230:	20 91 71 00 	lds	r18, 0x0071
     234:	8c e6       	ldi	r24, 0x6C	; 108
     236:	92 e0       	ldi	r25, 0x02	; 2
     238:	fc 01       	movw	r30, r24
     23a:	e2 0f       	add	r30, r18
     23c:	f1 1d       	adc	r31, r1
     23e:	90 81       	ld	r25, Z
	tmpTail = (Exec_eventFifoTail+1) & (EXEC_EVENT_FIFO_MASK);
     240:	82 2f       	mov	r24, r18
     242:	8f 5f       	subi	r24, 0xFF	; 255
     244:	87 70       	andi	r24, 0x07	; 7
	Exec_eventFifoTail = tmpTail;
     246:	80 93 71 00 	sts	0x0071, r24
	ENABLE_INTS();
     24a:	78 94       	sei
	
	return(dataByte);
     24c:	89 2f       	mov	r24, r25
     24e:	99 27       	eor	r25, r25
}
     250:	08 95       	ret

00000252 <Exec_writeEventFifo>:

/***********************************************************
	Function Name: Exec_writeEventFifo
	Function Description: This function is responsible for
	writing a single event to the event fifo and
	updating the appropriate pointers.
	Inputs:  data - the byte to write to the Fifo 
	Outputs: none
***********************************************************/	
void Exec_writeEventFifo(unsigned char event)
{
     252:	38 2f       	mov	r19, r24
	unsigned char tmpHead;

	DISABLE_INTS();
     254:	f8 94       	cli
	Exec_eventFifo[Exec_eventFifoHead] = event;
     256:	20 91 70 00 	lds	r18, 0x0070
     25a:	8c e6       	ldi	r24, 0x6C	; 108
     25c:	92 e0       	ldi	r25, 0x02	; 2
     25e:	fc 01       	movw	r30, r24
     260:	e2 0f       	add	r30, r18
     262:	f1 1d       	adc	r31, r1
     264:	30 83       	st	Z, r19

    /* now move the head up */
    tmpHead = (Exec_eventFifoHead + 1) & (EXEC_EVENT_FIFO_MASK);
     266:	82 2f       	mov	r24, r18
     268:	8f 5f       	subi	r24, 0xFF	; 255
     26a:	87 70       	andi	r24, 0x07	; 7
    Exec_eventFifoHead = tmpHead;
     26c:	80 93 70 00 	sts	0x0070, r24
	ENABLE_INTS();
     270:	78 94       	sei
}
     272:	08 95       	ret

00000274 <FrameMgr_init>:
	Outputs: none
***********************************************************/	
void FrameMgr_init(void)
{
	memset(trackedObjectTable,0x00,sizeof(trackedObjectTable));
     274:	80 e4       	ldi	r24, 0x40	; 64
     276:	e8 e7       	ldi	r30, 0x78	; 120
     278:	f0 e0       	ldi	r31, 0x00	; 0
     27a:	11 92       	st	Z+, r1
     27c:	8a 95       	dec	r24
     27e:	e9 f7       	brne	.-6      	; 0x27a
}
     280:	08 95       	ret

00000282 <FrameMgr_dispatchEvent>:


/***********************************************************
	Function Name: FrameMgr_dispatchEvent
	Function Description: This function is responsible for
	taking an incoming event and performing the needed
	actions with it as pertains to the FrameMgr.
	Inputs:  event - the generated event
	Outputs: none
***********************************************************/	
void FrameMgr_dispatchEvent(unsigned char event)
{	
	switch(event)
     282:	99 27       	eor	r25, r25
     284:	84 30       	cpi	r24, 0x04	; 4
     286:	91 05       	cpc	r25, r1
     288:	51 f1       	breq	.+84     	; 0x2de
     28a:	85 30       	cpi	r24, 0x05	; 5
     28c:	91 05       	cpc	r25, r1
     28e:	34 f4       	brge	.+12     	; 0x29c
     290:	81 30       	cpi	r24, 0x01	; 1
     292:	91 05       	cpc	r25, r1
     294:	31 f1       	breq	.+76     	; 0x2e2
     296:	02 97       	sbiw	r24, 0x02	; 2
     298:	71 f0       	breq	.+28     	; 0x2b6
	{
		case EV_DUMP_FRAME:
            /* try re-initializing the camera before we start dumping */
            
			CamConfig_setCamReg(0x11,0x01);  /* reduce the frame rate for dumping*/
			CamConfig_sendFifoCmds();
			Utility_delay(1000);		/* allow the new frame rate to settle */
			lineCount = 0;
			currentState = ST_FrameMgr_DumpingFrame;
			//CamIntAsm_waitForNewDumpFrame(currentLineBuffer,previousLineBuffer);
            FrameMgr_acquireLine();
			break;
		
		case EV_ENABLE_TRACKING:
			currentState = ST_FrameMgr_TrackingFrame;					
			FrameMgr_acquireFrame();
			break;
			
		case EV_ACQUIRE_FRAME_COMPLETE:
			FrameMgr_processFrame();
			break;
		
		case EV_PROCESS_FRAME_COMPLETE:
			FrameMgr_acquireFrame();
			break;

		case EV_SERIAL_DATA_RECEIVED:
			if (currentState != ST_FrameMgr_idle)
			{
				/* we need to go back to processing line data, since
				serial data reception interrupted us....just trash the
				frame and act like the frame has been processed, which
				will kick off the system to wait for the next line */
				PUBLISH_EVENT(EV_PROCESS_FRAME_COMPLETE);
			}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -