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

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

?? tirnec_2.c.svn-base

?? 最新火熱的CX32 源代碼
?? SVN-BASE
?? 第 1 頁 / 共 2 頁
字號:
 /**
 *  This code and information is part of Trident DPTV API (TDAPI)
 *
 *  Copyright (C) Trident Multimedia Technologies (Shanghai) Co., Ltd.
 *         2002 - 2003  All rights reserved.
 *
 *  This file provides functions for TV or demoboard remote controller.
 *
 *  Revision:
 *  03/04/2004     Modify RC5 part(decode & repeat) by Max and Joy
 *  04/18/2003     Added repeat key support by Archie
 *  08/01/2002     Created by Rick, York, Joy and Archie
 *
 */

#include "tdefs.h"
#include "tio.h"
#include "tutils.h"
#include "tvkey.h"
#include "tRemote.h"

#include "thilevel.h"
#include "ttimer.h"

//#define _IR_DEBUG_

enum SYSCODE
{
	SYSUSER = 0xFC,//0xBF,
	SYSFACTORY = 0xEE,
	SYSDATAW = 0xE2,
	SYSDATAR = 0xE3,
	SYSEEPROM = 0xE6,
	SYSTESTSIGNAL = 0xEA,
	SYSDIRECTAV = 0xEB
};


/*remote flag*/
static Byte s_ucRemoteFlag = 0;
static Byte SYS_MODE = 0xff;
Byte	 Factory_Data[4];

#ifdef _IR_DEBUG_
Byte IR_DATA[50];
Byte IR_Index ;
#endif

/*dy
const Byte KeyCodeFactory[][2] =
{
	{0x01, COMMAND_M},
	{0x08, COMMAND_BUSOFF},
};
*/
/*the following two global variables are used by remote routines*/
static Void tdRemoteCodeDetect(Byte ucRemoteCode);

static Gdata struct tagRemoteData
{
    Byte ucRemoteBackup;     /*store the first code of system or data*/
    Byte ucRemoteTemp;       /*store the temporary value of a code,tdRemoteCodeDetect was call 8 times to generate a code*/
    Byte ucRemoteShift;      /*used to count shift times and generate s_RemoteData.ucRemoteTemp*/
    Byte ucSCheckSum;
    Byte ucDCheckSum;
    Byte ucPreviousCountVal; /*timer count value of last time*/
    Byte ucSystemCode;
    Byte ucRemoteCode;
    Byte ucOffset;
    Byte ucKeyNum;
} s_RemoteData;

extern GBool t_bFastRepeatKeyEnable;
extern GBool t_bSlowRepeatKeyEnable;
extern GBool t_bNewKey;
extern GBool t_bRemoteKey;

extern Gdata Byte ucAutoOffTimer;
static  Void tdIRNEC1msTimer(Void)
{
	if (t_RemoteData.wCount == t_RemoteData.wFirstDelay)
	{
#ifdef _NEW_REPEATKEY_FUNC_
		t_bFastRepeatKeyEnable = _FALSE_;
		t_bSlowRepeatKeyEnable = _FALSE_;
#endif       
		tdAddVirtualKey(s_RemoteData.ucRemoteCode/* | _VK_STATUS_DOWN_*/);
		t_RemoteData.wCount--;
		ucAutoOffTimer = 0;
#ifdef _IR_DEBUG_
		Printf("Downing Code:0x%x\n", s_RemoteData.ucRemoteCode);
#endif

	} 
	else if (t_RemoteData.wCount) 
	{
		t_RemoteData.wCount--;
		if (tdTestValBitTrue(s_ucRemoteFlag, _RF_NEC_LEADERCODE_))
		{  
			if (t_RemoteData.wCount == 0)
			{
#ifdef _NEW_REPEATKEY_FUNC_
				if(t_bFastRepeatKeyEnable||t_bSlowRepeatKeyEnable)
				{
			#ifdef _IR_DEBUG_
					Printf("Repeating Code:0x%x\n", s_RemoteData.ucRemoteCode);
			#endif
					tdAddVirtualKey(s_RemoteData.ucRemoteCode/*| _VK_STATUS_DOWN_*/);				
				}
#else
				tdAddVirtualKey(s_RemoteData.ucRemoteCode | _VK_STATUS_DOWN_);
#endif                
				tdClearValBit(s_ucRemoteFlag, _RF_NEC_LEADERCODE_);
				if(t_bSlowRepeatKeyEnable)
					t_RemoteData.wCount = t_RemoteData.wRepeatDelay*4 - 1;
				else
					t_RemoteData.wCount = t_RemoteData.wRepeatDelay - 1;
				t_bNewKey = 0;
			}
		} 
	}
	/*
	else
	{
	#ifdef _IR_DEBUG_
		Printf("Key is up!\n", 12);
	#endif
		tdAddVirtualKey(s_RemoteData.ucRemoteCode);
		s_RemoteData.ucRemoteCode = _VK_NONE_;
	}*/
}

static Byte tdGetTimeInterval(Byte ucCurrentCountVal)
{
	/* when the INT0 interrupt the timer interrupt service */
	if (!ucCurrentCountVal)
		ucCurrentCountVal = tdLoadInitTimerCount();

#ifdef _TIMERCOUNT_DOWN_        
	if (ucCurrentCountVal < s_RemoteData.ucPreviousCountVal)
		ucCurrentCountVal =  s_RemoteData.ucPreviousCountVal - ucCurrentCountVal;
	else
		ucCurrentCountVal = s_RemoteData.ucPreviousCountVal + tdGetTimerBInterval() - ucCurrentCountVal;
#else
	if (ucCurrentCountVal >= s_RemoteData.ucPreviousCountVal)
		ucCurrentCountVal =  ucCurrentCountVal - s_RemoteData.ucPreviousCountVal;
	else
		ucCurrentCountVal =  ucCurrentCountVal + tdGetTimerBInterval() - s_RemoteData.ucPreviousCountVal;
#endif  
	return ucCurrentCountVal;
}


Bool ucselect = _TRUE_;
IWord ucCurrentCountValtemp1,ucCurrentCountValtemp2;
Word ucRemotecodetest[100];
static BYTE ucRemotetestIndex = 0;

static Void tdIRNECService(Void)
{                      
    IByte ucRemoteCode;
    IWord ucCurrentCountVal;
 /*   ucCurrentCountVal =  tdGetTimerBCurrentCount();
    
#ifdef _TIMERCOUNT_DOWN_        
    if(ucCurrentCountVal > tdLoadInitTimerCount()) 
#else
    if(ucCurrentCountVal < tdLoadInitTimerCount()) 
#endif
        ucCurrentCountVal = tdLoadInitTimerCount();
    tdClearInterruptPend();
    ucRemoteCode = tdGetTimeInterval(ucCurrentCountVal);
    s_RemoteData.ucPreviousCountVal = ucCurrentCountVal;
    tdRemoteCodeDetect(ucRemoteCode);    // Analyse remote key */
       REMOTE_TIMER_LOAD;
       ucCurrentCountVal = REMOTE_TIMER_VALUE;  
       ucRemoteCode = ucCurrentCountVal / 0x05;
   	REMOTE_TIMER_STOP;      // Stop & Clear Timer
   	REMOTE_TIMER_START;     // ReStart Timer
   	//if (ucRemoteCode > 10)
   	{
   	 if (ucRemotetestIndex <99)
   	 	ucRemotecodetest[ucRemotetestIndex++] = ucRemoteCode;
	tdRemoteCodeDetect(ucRemoteCode); 
   	}

}

/**
 *    This function translates the pressed remote key code.
 *    When user press on the remote controller, the key code
 *    will store in a global value and let the function RemoteInput()
 *    return key code.
 *    
 *                     
 * @param  ucRemoteCode(I) - the time distance between two pulse
 *                           generated by remote controller
 * @return None 
 * @see    tdRemoteService
 */
 //Defined for NEC Remote Protocol.
static Void tdRemoteCodeDetect(Byte ucRemoteCode)
{
	IByte ucIndex;
	IByte i;

	Byte j;
	
	if (tdTestValBitTrue(s_ucRemoteFlag, _RF_NEC_STARTED_))
	{
		if ((pNECRemote->Remote_Code_0_Min <= ucRemoteCode) && (ucRemoteCode <= pNECRemote->Remote_Code_0_Max)) /*code 0*/
		{
			tdLeftShift1(s_RemoteData.ucRemoteShift); 
#ifdef _IR_DEBUG_
			//IR_DATA[IR_Index++] = ucRemoteCode;
#endif
		}
		else if ((pNECRemote->Remote_Code_1_Min <= ucRemoteCode) && ( ucRemoteCode <= pNECRemote->Remote_Code_1_Max))   /*code 1*/
		{
#ifdef _IR_DEBUG_
			//IR_DATA[IR_Index++] = ucRemoteCode;
#endif
			s_RemoteData.ucRemoteTemp += s_RemoteData.ucRemoteShift;
			tdLeftShift1(s_RemoteData.ucRemoteShift);        
		}
		else
		{
			/*if error remote code,do not translate.*/
			tdClearValBit(s_ucRemoteFlag, (_RF_NEC_TRANSLATE_|_RF_NEC_CONVERT_|_RF_NEC_STARTED_));
			goto detect_head;
		}

		if (s_RemoteData.ucRemoteShift)        /*if hasn't finished to shift eight times, return. */
			return;

		if (tdTestValBitTrue(s_ucRemoteFlag, _RF_NEC_CONVERT_))  /*Is the second code*/
		{
			tdClearValBit(s_ucRemoteFlag, _RF_NEC_CONVERT_);
			if (tdTestValBitTrue(s_ucRemoteFlag, _RF_NEC_SYSTEMCODE_))  /*Is the system code*/
			{
#ifdef _IR_DEBUG_
				//Printf(" P2= %x\n",s_RemoteData.ucRemoteTemp);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久国产一区二区三区四区小说| 国产精品久久久久久久久免费丝袜| 国产在线精品一区二区不卡了| 国产精品初高中害羞小美女文| 欧美男同性恋视频网站| 国产69精品久久99不卡| 亚洲成人在线网站| 中文字幕视频一区| 精品88久久久久88久久久| 91九色02白丝porn| 国产91清纯白嫩初高中在线观看| 亚洲成人免费影院| 成人欧美一区二区三区黑人麻豆 | 依依成人精品视频| 2020国产成人综合网| 欧美精品视频www在线观看| 不卡的av网站| 韩国成人福利片在线播放| 亚洲成人免费视| 亚洲精品国产a| 日本一区二区高清| 欧美www视频| 91精品免费观看| 欧美午夜不卡视频| 欧美做爰猛烈大尺度电影无法无天| 成人小视频免费在线观看| 久久99国产乱子伦精品免费| 丝袜美腿亚洲综合| 午夜视频在线观看一区二区| 亚洲人成精品久久久久久| 国产精品无圣光一区二区| 精品国产a毛片| 欧美成人r级一区二区三区| 欧美精品tushy高清| 欧美久久久久久久久久| 欧美性videosxxxxx| 欧美亚洲图片小说| 欧美色爱综合网| 欧美日韩免费一区二区三区| 欧美伊人久久久久久午夜久久久久| 色综合久久久久综合| 99久久er热在这里只有精品66| 国产成人久久精品77777最新版本| 国产一区二区在线观看免费| 国产做a爰片久久毛片| 国产在线国偷精品免费看| 国模套图日韩精品一区二区| 国产精品一区二区免费不卡 | 国产原创一区二区三区| 麻豆精品在线看| 老司机午夜精品| 极品少妇一区二区| 国产精品小仙女| www.成人网.com| 色香蕉久久蜜桃| 欧美日韩高清在线| 日韩精品一区二区三区四区视频| 欧美变态tickle挠乳网站| 精品久久久网站| 国产欧美精品日韩区二区麻豆天美| 国产精品色噜噜| 亚洲免费三区一区二区| 天天爽夜夜爽夜夜爽精品视频| 免费观看一级欧美片| 国产老妇另类xxxxx| av亚洲产国偷v产偷v自拍| 欧美影院一区二区| 欧美成人一区二区| 国产精品欧美久久久久无广告| 一级中文字幕一区二区| 日韩国产一区二| 国产高清在线精品| 色婷婷国产精品| 精品免费国产二区三区| 中文字幕精品综合| 亚洲国产色一区| 国内精品国产成人| 色老汉av一区二区三区| 9191成人精品久久| 国产午夜三级一区二区三| 亚洲精品成人少妇| 久久精品国产77777蜜臀| 成人av在线网| 欧美年轻男男videosbes| 久久久精品免费网站| 亚洲综合免费观看高清完整版 | 亚洲高清久久久| 麻豆成人久久精品二区三区小说| 成人精品国产免费网站| 欧美日韩aaa| 国产精品久久久久永久免费观看| 午夜精彩视频在线观看不卡| 国产91丝袜在线播放| 91精品国产aⅴ一区二区| 国产精品视频麻豆| 麻豆成人91精品二区三区| 91免费观看视频| 亚洲精品一区二区在线观看| 怡红院av一区二区三区| 国产成人免费视频| 日韩一级免费一区| 一区二区三区中文在线| 国产电影精品久久禁18| 日韩一级成人av| 亚洲综合一区二区| 成人高清视频在线观看| 26uuu另类欧美亚洲曰本| 亚洲国产成人精品视频| 97久久久精品综合88久久| xnxx国产精品| 青青草97国产精品免费观看无弹窗版 | 久久色在线视频| 国产不卡一区视频| 日韩一区二区在线观看视频| 一区二区三区中文字幕电影 | 欧美日韩国产高清一区二区| 亚洲视频小说图片| 高清不卡在线观看av| 日韩一区二区三区电影在线观看| 亚洲自拍与偷拍| 91在线观看免费视频| 国产欧美日韩另类一区| 久久99精品国产麻豆婷婷 | 欧美亚男人的天堂| 国产精品国产三级国产有无不卡 | 国产一区二区三区免费| 777亚洲妇女| 午夜精品免费在线观看| 在线中文字幕一区| 亚洲欧美日韩在线| 在线精品亚洲一区二区不卡| 亚洲色图在线视频| 91一区二区三区在线播放| 成人欧美一区二区三区1314| 91在线免费看| 亚洲免费观看高清完整版在线观看 | 欧美性xxxxxxxx| 亚洲综合色成人| 精品视频在线视频| 亚洲五月六月丁香激情| 91久久精品一区二区三| 亚洲国产婷婷综合在线精品| 欧美日韩国产色站一区二区三区| 视频一区二区三区入口| 7777精品伊人久久久大香线蕉| 午夜精品福利一区二区三区蜜桃| 欧美日韩视频在线一区二区| 午夜精品在线看| 日韩免费看的电影| 激情五月播播久久久精品| 久久久电影一区二区三区| www.色综合.com| 亚洲裸体xxx| 欧美日本国产视频| 免费看日韩精品| 国产欧美日本一区视频| 91视频在线观看| 天涯成人国产亚洲精品一区av| 91精品国产黑色紧身裤美女| 精品在线播放免费| 国产精品欧美精品| 欧美亚洲动漫另类| 美女被吸乳得到大胸91| 国产午夜精品一区二区三区视频| 99国产精品视频免费观看| 亚洲国产精品一区二区久久 | 日韩伦理电影网| 欧美日韩一区中文字幕| 麻豆91免费看| 国产精品欧美经典| 欧美日韩国产综合一区二区三区| 久久99国内精品| 亚洲人被黑人高潮完整版| 欧美日韩国产中文| 韩国av一区二区三区在线观看| 亚洲日本乱码在线观看| 制服丝袜亚洲精品中文字幕| 国产a久久麻豆| 午夜免费久久看| 国产欧美日本一区视频| 精品视频在线免费| 成人免费高清视频| 丝袜美腿亚洲一区| 国产精品高潮呻吟久久| 538prom精品视频线放| 成人v精品蜜桃久久一区| 日本欧美一区二区| 亚洲欧美综合色| 精品国产伦一区二区三区观看方式 | 欧美亚洲动漫制服丝袜| 国产美女精品一区二区三区| 亚洲影院理伦片| 国产清纯美女被跳蛋高潮一区二区久久w | 亚洲777理论| 日本一区二区免费在线观看视频| 欧美日韩一区不卡| 高清国产午夜精品久久久久久| 日韩影视精彩在线| 中文字幕综合网| 久久久精品影视|