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

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

?? tirnec.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 "ioctrl.h"

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

//#define _IR_DEBUG_

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

#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_bNewKey;
extern GBool t_bRemoteKey;

extern Gdata Byte ucAutoOffTimer;

static GByte s_ucTimeOutCount = 0;
#ifdef _IR_DEBUG_
Byte uc;
#endif
static  Void tdIRNEC1msTimer(Void)
{
    if (t_RemoteData.wCount == t_RemoteData.wFirstDelay)
    {
#ifdef _NEW_REPEATKEY_FUNC_
        tdSetFastRepeatKeyFlag(_FALSE_);
        tdSetSlowRepeatKeyFlag(_FALSE_);
#endif       
        tdSetKeyStatusUpFlag(_FALSE_);

        tdAddVirtualKey(s_RemoteData.ucRemoteCode/* | _VK_STATUS_DOWN_*/);
        t_RemoteData.wCount--;
        ucAutoOffTimer = 0;
#ifdef _IR_DEBUG_
        tvDebugPrint("Send none-repeat code!\n");
        tvDebugPrint1("s_ucRemoteFlag = 0x%x\n", s_ucRemoteFlag);
        tvDebugPrint1("s_RemoteData.ucRemoteCode = 0x%x\n", s_RemoteData.ucRemoteCode);        
#endif
        //set g_KeyInfo.bRemoteKeyDown flag
        g_KeyInfo.bRemoteKeyDown = _TRUE_;
        //set g_KeyInfo.bRepeatKeyDown flag
        g_KeyInfo.bRepeatKeyDown = _FALSE_;
        //clear s_ucTimeOutCount
        s_ucTimeOutCount = 0;
    } 
    else
    {
        if (t_RemoteData.wCount) 
        {
            t_RemoteData.wCount--;
            
            if (tdTestValBitTrue(s_ucRemoteFlag, _RF_NEC_REPEAT_) && tdTestValBitTrue(s_ucRemoteFlag, _RF_NEC_LEADERCODE_))
            {  
                //set g_KeyInfo.bRemoteKeyDown flag
                //g_KeyInfo.bRemoteKeyDown = _TRUE_;
                //clear s_ucTimeOutCount
                //s_ucTimeOutCount = 0;
                
                if (t_RemoteData.wCount == 0)
                {
#ifdef _NEW_REPEATKEY_FUNC_
                    if(g_KeyInfo.bFastRepeatKeyEnable||g_KeyInfo.bSlowRepeatKeyEnable)
                    {
#ifdef _IR_DEBUG_
                        Printf("Sent repeat code!\n",12);
                        Printf("s_ucRemoteFlag = 0x%x\n", s_ucRemoteFlag);
#endif
                        tdAddVirtualKey(s_RemoteData.ucRemoteCode /*| _VK_STATUS_DOWN_*/);				
                        g_KeyInfo.bRepeatKeyDown = _TRUE_;
                    }
#else
                    tdAddVirtualKey(s_RemoteData.ucRemoteCode /*| _VK_STATUS_DOWN_*/);
#endif                
                    tdClearValBit(s_ucRemoteFlag, _RF_NEC_LEADERCODE_);
                    if(g_KeyInfo.bSlowRepeatKeyEnable)
                        t_RemoteData.wCount = t_RemoteData.wRepeatDelay*4 - 1;
                    else
                        t_RemoteData.wCount = t_RemoteData.wRepeatDelay - 1;
                }
                return;     //end
            }
        }
        //detect whether key is released up
        if (s_ucTimeOutCount != 0xFF)
            s_ucTimeOutCount++;
        else
            return;
        if (s_ucTimeOutCount > t_RemoteData.wRepeatDelay)       //nomatter last key is _FIRSTKEY_ or _REPEATKEY_
        {
            if (g_KeyInfo.bRemoteKeyDown)
            {
                if (g_KeyInfo.bRepeatKeyDown)       //clear repeat key in fifo
                    tdClearKeyInFIFO((FifoHandle)t_VirtualKeyBuffer, s_RemoteData.ucRemoteCode);

                g_KeyInfo.bRemoteKeyDown = _FALSE_;
                g_KeyInfo.bRepeatKeyDown = _FALSE_;
                s_ucTimeOutCount = 0xFF;            //don't +1 again
#ifdef _IR_DEBUG_
                tvDebugPrint("Before tdClearPreviousKey\n");
                for (uc = 0; uc < VIRTUALKEYBUFFERSIZE ; uc++)
                    tvDebugPrint2("t_VirtualKeyBuffer[%d] = %d\n", uc, t_VirtualKeyBuffer[uc]);
#endif

                if (g_KeyInfo.bKeyStatusUpEnable)
                {
                    tdAddVirtualKey(s_RemoteData.ucRemoteCode | _VK_STATUS_UP_);
                    tdSetKeyStatusUpFlag(_FALSE_);
                }

                s_RemoteData.ucRemoteCode = _VK_NONE_;
                tdSetFastRepeatKeyFlag(_FALSE_);    //to prevent adding repeat key after user obstructs RC for a while when press repeat key
                tdSetSlowRepeatKeyFlag(_FALSE_);

                //clear REPEAT and LEADERCODE flag
                tdClearValBit(s_ucRemoteFlag, _RF_NEC_REPEAT_ | _RF_NEC_LEADERCODE_);

#ifdef _IR_DEBUG_
                tvDebugPrint("After tdClearPreviousKey\n");
                for (uc = 0; uc < VIRTUALKEYBUFFERSIZE ; uc++)
                    tvDebugPrint2("t_VirtualKeyBuffer[%d] = %d\n", uc, t_VirtualKeyBuffer[uc]);
#endif
            }
        }   
    }
}

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();
    

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲高清视频中文字幕| 欧美色国产精品| 精品国产一区久久| 日韩不卡免费视频| 日韩一区二区三区视频在线| 视频一区欧美日韩| 欧美一区二区成人| 精品无人码麻豆乱码1区2区| 久久综合精品国产一区二区三区 | www国产亚洲精品久久麻豆| 日一区二区三区| 日韩亚洲欧美在线观看| 开心九九激情九九欧美日韩精美视频电影| 欧美精品国产精品| 九一九一国产精品| 欧美国产成人精品| 91看片淫黄大片一级| 亚洲国产成人av| 精品国产一区二区亚洲人成毛片| 国产精品亚洲人在线观看| 欧美国产在线观看| 91久久精品一区二区二区| 日本三级亚洲精品| 日本一区二区免费在线观看视频| 91麻豆6部合集magnet| 亚洲午夜一区二区| 久久亚洲一级片| 一本色道久久综合亚洲91| 日韩精品免费视频人成| 日本一区二区三区免费乱视频| 日本高清成人免费播放| 奇米777欧美一区二区| 国产欧美日韩在线观看| 欧美日韩国产一级片| 国产精品一区二区在线观看不卡| 亚洲欧洲日韩av| 日韩免费视频一区| 91免费看`日韩一区二区| 日韩二区三区四区| 中文字幕一区视频| 精品久久久久香蕉网| 色综合久久综合网97色综合| 国产在线看一区| 亚洲午夜电影网| 国产精品视频一二三区| 日韩三级视频在线看| 91老师片黄在线观看| 国产中文字幕一区| 日本特黄久久久高潮| 一区二区三区美女| 国产精品日产欧美久久久久| 日韩一二三区视频| 在线观看免费视频综合| 成人丝袜18视频在线观看| 日本女优在线视频一区二区| 亚洲精品国产无套在线观| 久久久久久久久久美女| 在线成人av影院| 91福利国产精品| fc2成人免费人成在线观看播放| 久久精品国产亚洲高清剧情介绍 | 日韩欧美在线网站| 色94色欧美sute亚洲线路一ni| 国产精品系列在线播放| 麻豆精品在线播放| 婷婷久久综合九色国产成人| 亚洲一区二区在线视频| 国产精品国产三级国产有无不卡 | 午夜视频在线观看一区二区三区| 国产精品久久夜| 日本一区二区三区视频视频| 久久精品夜夜夜夜久久| 26uuu成人网一区二区三区| 日韩欧美国产综合| 欧美精品一二三区| 欧美精品在线一区二区| 在线成人免费视频| 欧美一区二区三区男人的天堂| 欧美高清视频不卡网| 9191久久久久久久久久久| 欧美日韩精品免费观看视频| 欧美日韩精品一区二区三区| 欧美精品18+| 制服丝袜日韩国产| 日韩欧美国产一区二区三区| 日韩美女天天操| 久久免费的精品国产v∧| 久久精品欧美日韩精品| 久久精品亚洲精品国产欧美kt∨| 国产亚洲精品免费| 亚洲欧洲精品一区二区三区| 亚洲视频 欧洲视频| 一区二区三区在线观看欧美| 亚洲成人你懂的| 日本视频免费一区| 国产精品中文字幕欧美| 波多野结衣91| 欧美最猛性xxxxx直播| 欧美日韩国产另类一区| 欧美一级国产精品| 久久嫩草精品久久久精品| 欧美激情一区在线观看| 亚洲欧美激情在线| 性感美女久久精品| 麻豆高清免费国产一区| 国产白丝网站精品污在线入口| jlzzjlzz亚洲日本少妇| 在线播放视频一区| 久久久久久影视| 亚洲精品国产精华液| 蜜桃精品视频在线| jiyouzz国产精品久久| 51精品视频一区二区三区| 久久香蕉国产线看观看99| 亚洲欧美影音先锋| 日产国产高清一区二区三区| 国产不卡在线视频| 欧美久久久久久久久中文字幕| 国产无一区二区| 亚洲最快最全在线视频| 狠狠久久亚洲欧美| 在线视频国内一区二区| 精品电影一区二区三区| 亚洲精品中文在线影院| 精品亚洲aⅴ乱码一区二区三区| 91麻豆福利精品推荐| 精品美女一区二区三区| 亚洲激情综合网| 国产精品系列在线播放| 在线电影欧美成精品| 日韩理论片中文av| 韩国一区二区视频| 欧美偷拍一区二区| 国产精品视频第一区| 日韩成人免费电影| 在线免费精品视频| 国产欧美日韩中文久久| 免费在线观看视频一区| 在线视频国内自拍亚洲视频| 中文字幕av免费专区久久| 日韩精品乱码av一区二区| 色综合久久综合网97色综合| 久久久久国产精品麻豆ai换脸| 婷婷国产在线综合| 一本色道久久综合亚洲精品按摩| 日本一区二区三区高清不卡| 麻豆精品国产91久久久久久| 欧美日韩在线直播| 一区二区三区精品在线| av亚洲精华国产精华精| 久久久久久99精品| 麻豆成人综合网| 日韩视频中午一区| 午夜国产不卡在线观看视频| 91久久久免费一区二区| 亚洲精选视频在线| a级精品国产片在线观看| 国产日韩av一区| 国产真实乱偷精品视频免| 欧美成va人片在线观看| 日本不卡一二三| 欧美日本韩国一区二区三区视频| 亚洲美女少妇撒尿| 色呦呦国产精品| 亚洲精品免费视频| 色婷婷一区二区| 亚洲另类在线制服丝袜| 91精品福利视频| 亚洲综合成人在线视频| 色呦呦一区二区三区| 一区二区三区在线视频免费观看| 色综合久久中文字幕综合网| 亚洲欧洲性图库| 色女孩综合影院| 亚洲国产精品影院| 欧美美女激情18p| 视频精品一区二区| 日韩欧美在线一区二区三区| 麻豆成人免费电影| 久久久久久久综合日本| 成人av免费在线| 亚洲乱码国产乱码精品精98午夜| 色一情一乱一乱一91av| 亚洲国产欧美另类丝袜| 日韩一区二区精品葵司在线| 男女男精品视频| 国产欧美日韩精品a在线观看| 高清国产一区二区| 最新中文字幕一区二区三区 | 国产精品毛片久久久久久| 国产福利91精品一区| 亚洲欧美在线aaa| 欧美日韩精品是欧美日韩精品| 蜜桃视频在线观看一区二区| 久久久久久电影| 欧美视频三区在线播放| 久久国产生活片100| 久久精品欧美一区二区三区麻豆| 91亚洲资源网| 免费视频最近日韩|