亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? executive.c

?? he AVRcam source files were built using the WinAVR distribution (version 3.3.1 of GCC). I haven t t
?? C
字號:
/*
    Copyright (C) 2004    John Orlando
    
   AVRcam: a small real-time image processing engine.

    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    General Public License for more details.

    You should have received a copy of the GNU General Public
    License along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

   For more information on the AVRcam, please contact:

   john@jrobot.net

   or go to www.jrobot.net for more details regarding the system.
*/
/***********************************************************
	Module Name: Executive.c
	Module Date: 04/12/2004
	Module Auth: John Orlando
	
	Description: This file is responsible for implementing a
	minimalist event dispatcher.  It keeps track of an event
	fifo that waits for new events to come in, and dispatches
	them to any entities that care about them.
    
    Revision History:
    Date        Rel Ver.    Notes
    4/10/2004      0.1     Module created
    6/30/2004      1.0     Initial release for Circuit Cellar
                           contest.
    1/16/2005      1.4     Fixed issue where the interrupts weren't
                           being turned off when the fastEventBitmask
                           was being accessed.  Also removed redundant
                           interrupt masking when accessing the
                           main event fifo.  Also fixed issue where
                           the main event fifo wasn't being checked
                           for events if an event was pending in
                           the fast event fifo.
***********************************************************/

/*	Includes */
#include <stdlib.h>
#include "CommonDefs.h"
#include "Executive.h"
#include "FrameMgr.h"
#include "CamInterface.h"
#include "UIMgr.h"
#include "UartInterface.h"
#include "CamConfig.h"
#include "Utility.h"

/*  Local Variables */
unsigned char Exec_eventFifo[EXEC_EVENT_FIFO_SIZE];
unsigned char Exec_eventFifoHead=0;
unsigned char Exec_eventFifoTail=0;

/*  Local Function Definitions */
static unsigned char Exec_readEventFifo(void);

/* 	Local Structures and Typedefs */

/*  Extern Variables */
/* This bitmask holds events that need to be processed as fast as possible */
unsigned char fastEventBitmask = 0x00;

/*  Definitions */
#define IS_DATA_IN_EVENT_FIFO() (!(Exec_eventFifoHead == Exec_eventFifoTail))
/***********************************************************
	Function Name: Exec_run
	Function Description: This function is responsible for
	running the main control loop.  The control loop is 
	based on checking both the fast-event bitmask (for high
    priority events) and the event FIFO to determine if an
    event needs to be handled.  The event is then dispatched
    to the appropriate handler.
	Inputs:  none
	Outputs: none
***********************************************************/	
void Exec_run(void)
{
	unsigned char eventGenerated;
	
	while(1)
	{
		if (fastEventBitmask)
		{
			/* 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)
			{
                DISABLE_INTS();
				fastEventBitmask &= ~FEV_ACQUIRE_LINE_COMPLETE;	
                ENABLE_INTS();
				FrameMgr_processLine();				
			
				/* also check if serial data needs to be sent
				out through UIMgr */
				UIMgr_transmitPendingData();	

				/* 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)
			{
                DISABLE_INTS();
				fastEventBitmask &= ~FEV_PROCESS_LINE_COMPLETE;
                ENABLE_INTS();
				FrameMgr_acquireLine();
			}
		}		
		
        if (IS_DATA_IN_EVENT_FIFO() == TRUE)		
		{			
            eventGenerated = Exec_readEventFifo();
			switch(eventGenerated)
			{
				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);
					UIMgr_dispatchEvent(eventGenerated);
					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);
					FrameMgr_dispatchEvent(eventGenerated);
					break;																

				case (EV_SERIAL_DATA_PENDING_TX):
					UIMgr_dispatchEvent(eventGenerated);
					break;
								
				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();
	/* just return the current tail from the tx fifo */
	dataByte = Exec_eventFifo[Exec_eventFifoTail];	
	tmpTail = (Exec_eventFifoTail+1) & (EXEC_EVENT_FIFO_MASK);
	Exec_eventFifoTail = tmpTail;
	ENABLE_INTS();
	
	return(dataByte);
}

/***********************************************************
	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)
{
	unsigned char tmpHead;

	DISABLE_INTS();
	Exec_eventFifo[Exec_eventFifoHead] = event;

    /* now move the head up */
    tmpHead = (Exec_eventFifoHead + 1) & (EXEC_EVENT_FIFO_MASK);
    Exec_eventFifoHead = tmpHead;
	ENABLE_INTS();
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美tickling网站挠脚心| 欧美成人伊人久久综合网| 国产精品一区二区视频| 久久99久久99| 国内成人免费视频| 国产不卡在线播放| 成人动漫一区二区| 91浏览器打开| 欧美日韩aaa| 欧美一级片在线| 久久综合九色综合欧美98| 26uuu国产电影一区二区| 国产日韩欧美激情| 亚洲欧美经典视频| 天天av天天翘天天综合网色鬼国产| 天堂成人国产精品一区| 麻豆精品一区二区| 国产高清视频一区| 色呦呦日韩精品| 911精品国产一区二区在线| 日韩精品专区在线影院重磅| 久久香蕉国产线看观看99| 亚洲欧洲精品一区二区三区不卡| 一二三区精品视频| 黄色精品一二区| 99久久精品久久久久久清纯| 欧美猛男男办公室激情| 久久久亚洲精品石原莉奈 | 欧美手机在线视频| 欧美一级生活片| 国产精品剧情在线亚洲| 亚洲高清视频在线| 国产成人鲁色资源国产91色综| 色综合久久99| 久久嫩草精品久久久久| 一区二区三区高清不卡| 国产精品一区三区| 欧美色爱综合网| 日本一区二区久久| 日本不卡一区二区三区高清视频| 国产成人高清视频| 这里只有精品免费| 中文字幕字幕中文在线中不卡视频| 秋霞午夜av一区二区三区| 97精品久久久午夜一区二区三区 | 亚洲免费观看高清完整版在线| 视频一区二区国产| 成人黄色小视频| 26uuu精品一区二区| 亚洲bdsm女犯bdsm网站| 99视频精品在线| 久久久久九九视频| 日本欧洲一区二区| 欧美性受xxxx黑人xyx| 国产精品国产三级国产三级人妇| 奇米四色…亚洲| 欧美性xxxxxx少妇| 亚洲女同ⅹxx女同tv| 国产成人免费视频网站高清观看视频| 777久久久精品| 亚洲一区二区三区视频在线| 国产激情视频一区二区在线观看 | 欧美嫩在线观看| 亚洲黄一区二区三区| 成人18精品视频| 久久精品男人的天堂| 久久91精品久久久久久秒播| 欧美巨大另类极品videosbest| 亚洲制服欧美中文字幕中文字幕| 99精品视频在线播放观看| 国产精品你懂的| 99国产欧美久久久精品| 国产精品久99| 日本高清视频一区二区| 亚洲精选免费视频| 色噜噜夜夜夜综合网| 亚洲女同女同女同女同女同69| 99久久久国产精品| 一区二区三区四区乱视频| 91老师国产黑色丝袜在线| 亚洲免费av网站| 欧美日韩在线三区| 日本欧美一区二区| 亚洲精品一区二区三区影院| 韩国女主播成人在线| 日本一区二区三区在线观看| 成人福利电影精品一区二区在线观看| 国产精品视频第一区| 91丨九色porny丨蝌蚪| 亚洲在线视频一区| 欧美一级夜夜爽| 精品亚洲免费视频| 国产精品视频看| 在线免费精品视频| 日韩黄色免费网站| 久久久影院官网| 色婷婷久久久综合中文字幕| 亚洲第一成人在线| 欧美精品一区二区精品网| 成人免费黄色在线| 亚洲在线视频网站| 久久亚洲精品小早川怜子| 99re视频精品| 久久99热狠狠色一区二区| 国产精品天天看| 欧美精品亚洲二区| 国产二区国产一区在线观看| 亚洲精品v日韩精品| 日韩一区二区在线观看| 不卡一区二区在线| 青青草国产成人av片免费| 国产精品久久久久久户外露出| 欧美肥妇bbw| 不卡在线观看av| 蜜桃av一区二区在线观看| 亚洲欧美日韩精品久久久久| 日韩一卡二卡三卡四卡| 一本色道久久综合亚洲精品按摩| 秋霞影院一区二区| 亚洲一区二区三区美女| 国产亚洲一区二区三区在线观看| 欧美私模裸体表演在线观看| 国产成人免费在线视频| 男女性色大片免费观看一区二区 | 国产精品久久二区二区| 日韩精品一区二区三区三区免费| 色呦呦网站一区| 国产精品亚洲成人| 蜜桃av一区二区在线观看| 一区二区在线观看视频| 国产精品免费aⅴ片在线观看| 日韩三级精品电影久久久 | 热久久一区二区| 亚洲综合精品久久| 综合分类小说区另类春色亚洲小说欧美 | 欧美国产激情二区三区| 日韩免费视频线观看| 欧美日韩夫妻久久| 日本电影欧美片| 91蜜桃网址入口| 91亚洲精品一区二区乱码| 风间由美一区二区三区在线观看| 国产在线国偷精品免费看| 久久99久久久久久久久久久| 丝袜亚洲精品中文字幕一区| 亚洲高清久久久| 一区二区三区欧美久久| 亚洲免费高清视频在线| 日韩理论片一区二区| 亚洲欧洲日韩女同| 亚洲欧美另类久久久精品2019| 亚洲国产精品精华液ab| 国产精品网站在线| 国产精品高清亚洲| 亚洲男同1069视频| 亚洲一区二区三区四区在线观看 | 精品国产免费一区二区三区香蕉| 777久久久精品| 欧美大白屁股肥臀xxxxxx| 久久影院午夜论| 国产亚洲一本大道中文在线| 欧美激情一区二区三区蜜桃视频| 国产欧美一区二区三区鸳鸯浴| 国产午夜亚洲精品午夜鲁丝片| 国产色产综合产在线视频| 国产精品久久免费看| 亚洲黄色免费网站| 日韩国产精品久久久| 九九久久精品视频| 国产精品夜夜嗨| 色婷婷综合久久久| 911精品国产一区二区在线| www欧美成人18+| 中文字幕一区二区三区蜜月| 亚洲综合视频在线观看| 美女在线一区二区| 国产成人av资源| 欧美性videosxxxxx| 精品精品国产高清a毛片牛牛| 国产三级精品三级| 亚洲一区二区三区四区五区黄| 免费人成精品欧美精品| 成人动漫一区二区| 欧美日韩免费观看一区二区三区| 精品美女在线观看| 综合久久一区二区三区| 免费观看在线色综合| 成人丝袜18视频在线观看| 欧美日精品一区视频| 久久久噜噜噜久久人人看| 亚洲一线二线三线视频| 国产精选一区二区三区| 欧美日本精品一区二区三区| 久久精品亚洲一区二区三区浴池| 一二三区精品视频| 高清国产一区二区| 日韩一二在线观看| 一级做a爱片久久| www.成人在线| 欧美成人一区二区三区|