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

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

?? interrupt.c

?? 凌陽SPDA1000 MP3開發資料
?? C
字號:
//===========================================================
//   Project Name(項目名稱):  SPCA755 rebuild
//   File Name(模塊名稱): interrupt.c
//   Built Date(創建日期):2004-09-14
//   Abstract(模塊描述): 中斷功能函數模塊
//   Revision History(版本信息):
//   Rev      Date           Author       Comment(修改說明)
//   1.0      2004-09-14      XYQ         created
//================================================================================================
#include "..\userdefine.h"
#include "interrupt.h"
#include "userinit.h"
#include "user.h"
#include "main.h"
//================================================================================================
data U8 gc_KeyValue=0;
data U8 gc_BatteryValue=0xff;
data U8 gc_ADCOldKey=0;
data U8 gc_LongKeyDelay=0;
data U8 gc_LongKeyTimer=0;
data U8 gc_QuarterTimer=0;
data U8 gc_BlinkTimer;
data U8 gc_SysSecondTimer;
//================================================================================================
data U8 gc_SecondTimer;
data U8 gc_minuteTimer;
data U8 gc_basetimerx4;//lyh add
//================================================================================================
#define K_USE_SPCA759_KEYB

//================================================================================================
void UserExtInterrupt() interrupt 0 using 1
{

	INTR_Int0();	
	
}

void User_Timer() interrupt 1 using 2
{//每7.8ms會進行中斷一次(into this intterrupt per 7.8ms)
	//該函數用戶不能刪除,否則定時器會不準確
	

	TIMER0_Routine();//the function must call here(該函數在此必須調用,該函數為設置定時器初值)

	gc_QuarterTimer = (gc_QuarterTimer >= 3)?0:gc_QuarterTimer+1;

	switch(gc_QuarterTimer)
	{
		case 0:
			if (gc_SysSecondTimer)
			{
				gc_SysSecondTimer--;
			}else{
				gc_SysSecondTimer = SECONDTIMER_VALUE;
			}
			break;
		case 1:			
	
			gc_BatteryValue = USER_READSAR(2);  //read SAR output
			
			if (USB_PlugDetect())
    		{
     			gc_BatteryValue = 0xff;
    		}

			if (gc_BlinkTimer)gc_BlinkTimer--;

			if (gc_LongKeyTimer) gc_LongKeyTimer++;			
			break; 
		case 2:
			if (!gc_KeyValue)
			{//if oldevent haven't been deal with, not to get new keyValue
			 
				if (1)
				{
					data U8 tc_ADCCurrentKey;
	
					tc_ADCCurrentKey = USER_READSAR(0);  //read SAR output
					
			#if 0
				#ifdef K_USE_SPCA759_KEYB
					if (tc_ADCCurrentKey>240) tc_ADCCurrentKey=0;
					else if(tc_ADCCurrentKey>171) tc_ADCCurrentKey=1;
					else if(tc_ADCCurrentKey>149) tc_ADCCurrentKey=2;
					else if(tc_ADCCurrentKey>124) tc_ADCCurrentKey=3;
					else if(tc_ADCCurrentKey>96) tc_ADCCurrentKey=4;
					else if(tc_ADCCurrentKey>66) tc_ADCCurrentKey=5;
					else if(tc_ADCCurrentKey>36) tc_ADCCurrentKey=6;
					else if(tc_ADCCurrentKey>11) tc_ADCCurrentKey=7;
					else tc_ADCCurrentKey = 8;
				/*	if (tc_ADCCurrentKey>240) tc_ADCCurrentKey=0;
					else if(tc_ADCCurrentKey>217) tc_ADCCurrentKey=1;
					else if(tc_ADCCurrentKey>182) tc_ADCCurrentKey=2;
					else if(tc_ADCCurrentKey>139) tc_ADCCurrentKey=3;
					else if(tc_ADCCurrentKey>104) tc_ADCCurrentKey=4;
					else if(tc_ADCCurrentKey>75) tc_ADCCurrentKey=5;
					else if(tc_ADCCurrentKey>41) tc_ADCCurrentKey=6;
					else if(tc_ADCCurrentKey>14) tc_ADCCurrentKey=7;
					else tc_ADCCurrentKey = 8;*/
				#else
					if (tc_ADCCurrentKey>240) tc_ADCCurrentKey=0;
					else if(tc_ADCCurrentKey>220) tc_ADCCurrentKey=1;
					else if(tc_ADCCurrentKey>202) tc_ADCCurrentKey=2;
					else if(tc_ADCCurrentKey>181) tc_ADCCurrentKey=3;
					else if(tc_ADCCurrentKey>147) tc_ADCCurrentKey=4;
					else if(tc_ADCCurrentKey>105) tc_ADCCurrentKey=5;
					else if(tc_ADCCurrentKey>61) tc_ADCCurrentKey=6;
					else if(tc_ADCCurrentKey>20) tc_ADCCurrentKey=7;
					else tc_ADCCurrentKey = 8;
				#endif
			#else//MoonBox key value V2.0

					if (tc_ADCCurrentKey>240) tc_ADCCurrentKey=0;
					else if(tc_ADCCurrentKey>217) tc_ADCCurrentKey=7;
					else if(tc_ADCCurrentKey>182) tc_ADCCurrentKey=8;
					else if(tc_ADCCurrentKey>139) tc_ADCCurrentKey=5; 
					else if(tc_ADCCurrentKey>104) tc_ADCCurrentKey=4; //VOL+
					else if(tc_ADCCurrentKey>75) tc_ADCCurrentKey=6;  //MODE
					else if(tc_ADCCurrentKey>41) tc_ADCCurrentKey=2;  //LAST
					else if(tc_ADCCurrentKey>14) tc_ADCCurrentKey=1;  //NEXT
					else tc_ADCCurrentKey = 3;                        //PLAY
/*
					if (tc_ADCCurrentKey>240) tc_ADCCurrentKey=0;					
					else if(tc_ADCCurrentKey>210) tc_ADCCurrentKey=1;
					else if(tc_ADCCurrentKey>180) tc_ADCCurrentKey=2;
					else if(tc_ADCCurrentKey>140) tc_ADCCurrentKey=3;
					else if(tc_ADCCurrentKey>96) tc_ADCCurrentKey=4;
					else if(tc_ADCCurrentKey>66) tc_ADCCurrentKey=5;
					else if(tc_ADCCurrentKey>36) tc_ADCCurrentKey=6;
					else if(tc_ADCCurrentKey>11) tc_ADCCurrentKey=7;
					else tc_ADCCurrentKey = 8;*/
			#endif
				
				
					if ((gc_ADCOldKey & 0x0f) == tc_ADCCurrentKey)
					{//按鍵未釋放
						if (tc_ADCCurrentKey != KEY_NONEKEY)
						{
							if (gc_LongKeyTimer > gc_LongKeyDelay)
							{
								gc_ADCOldKey = gc_ADCOldKey | 0x10;		//長按鍵
								gc_KeyValue = gc_ADCOldKey & 0x7f;
								gc_LongKeyTimer = REPEATKEY_DELAYVALUE;	//設置重復按鍵延時起始值
								gc_LongKeyDelay = (gc_LongKeyDelay < MIN_REPEATKEYDELAY)?MIN_REPEATKEYDELAY:gc_LongKeyDelay-3;	//加速重復按鍵
							}
							else
							{
								gc_ADCOldKey |= 0x80; 
							}
						}
					}
					else if (tc_ADCCurrentKey == KEY_NONEKEY){//按鍵釋放
						if ((gc_ADCOldKey & 0x90) == 0x80)
						{
							gc_KeyValue = gc_ADCOldKey & 0x7f;		//獲取短按鍵值
						}else if ((gc_ADCOldKey & 0x90) == 0x90){
							gc_KeyValue = (gc_ADCOldKey | 0x20) & 0x7f;//key value will be 0x3x
						}
						gc_ADCOldKey = KEY_NONEKEY;
						gc_LongKeyTimer = 0;			//關閉按鍵計時器
						gc_LongKeyDelay = 0;			//復位重復按鍵延時值
					}
					else{//有鍵按下
						gc_ADCOldKey = tc_ADCCurrentKey;
						gc_LongKeyTimer = 1;			//觸發按鍵計時器
						if (!gc_LongKeyDelay) gc_LongKeyDelay = MAX_REPEATKEYDELAY;  //若外部未初始化重復按鍵延時初始值則默認初始化
					}
				}else{
					gc_ADCOldKey = KEY_NONEKEY;
				}
			}			
			break;
		case 3:
			gc_SecondTimer--;
			if (!gc_SecondTimer)
			{
				gc_SecondTimer = SECONDTIMER_VALUE;
				if(gw_PowerOffTimer)
				{
                   // printf("gw_PowerOffTimer =%x \n",gw_PowerOffTimer); 
					gw_PowerOffTimer--;//lizhn modify      
				}
		
				if(gc_Busy_Timer)
				{
					gc_Busy_Timer--;//lyh add 		
				}         
		        if(gc_FileNameRollTimer)
				{
					gc_FileNameRollTimer--;//lyh add    0.125s 
				}
			 	if (gc_minuteTimer)
				{
					gc_minuteTimer--;
				}else{
					gc_minuteTimer = MINUTETIMER_VALUE;
				}
		    }
		    gb_UIEvent=TRUE;//lyh add
		    gc_basetimerx4--;//lyh add
		    if(!gc_basetimerx4)
		    {
		       gc_basetimerx4=BASETIMERX4_VALUE;
			   /*
		       if(gc_Busy_Timer)gc_Busy_Timer--;//lyh add           0.125s  
		       if(gc_FileNameRollTimer)gc_FileNameRollTimer--;//lyh add    0.125s*/ 
		       if(gc_Battery_Detect_Timer)gc_Battery_Detect_Timer--;//lyh add 0.125s
		    }	
		    break;
	}
	
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品福利一二区| 欧美乱熟臀69xxxxxx| 狂野欧美性猛交blacked| 亚洲高清免费视频| 午夜精品久久久久久久久久| 一区二区在线观看视频| 亚洲精品高清在线| 亚洲高清久久久| 蜜臀久久99精品久久久久久9| 三级一区在线视频先锋 | 国产精品一品二品| 国产a精品视频| 波多野结衣一区二区三区| 99久久er热在这里只有精品66| 成人激情av网| 在线观看网站黄不卡| 欧美女孩性生活视频| 精品美女在线播放| 欧美国产1区2区| 尤物在线观看一区| 免费在线观看视频一区| 国产在线视频一区二区三区| 国产白丝网站精品污在线入口| 91老师片黄在线观看| 日韩欧美亚洲一区二区| 国产三级一区二区三区| 亚洲精选视频在线| 免费在线视频一区| 97久久超碰国产精品| 69av一区二区三区| 中文字幕av一区二区三区| 亚洲日本一区二区| 日本v片在线高清不卡在线观看| 水蜜桃久久夜色精品一区的特点| 国产在线视视频有精品| 欧美日韩精品一区二区天天拍小说 | 精品一区二区免费| 欧美韩国日本不卡| 亚洲伊人伊色伊影伊综合网| 中文字幕精品一区二区三区精品| 亚洲国产成人精品视频| 日本高清不卡一区| 亚洲第一福利一区| 欧美一区二区三区啪啪| 久久成人18免费观看| 久久只精品国产| 成人激情小说网站| 亚洲欧美韩国综合色| 欧美日韩一区二区三区免费看 | 国产亚洲综合性久久久影院| 丁香婷婷综合网| 亚洲精品日日夜夜| 日韩一区二区电影| 国产91对白在线观看九色| 国产精品久久久久三级| 欧美最猛黑人xxxxx猛交| 久色婷婷小香蕉久久| 日韩欧美国产三级| 成人sese在线| 亚洲综合丁香婷婷六月香| 91麻豆精品国产91| 国产精品99久久久久久久女警| 国产精品第一页第二页第三页| 欧美日韩一卡二卡三卡| 狠狠色丁香婷婷综合久久片| 国产精品乱码久久久久久| 欧美日韩mp4| 国产精品91xxx| 亚洲一区二区三区四区五区中文 | 久久精品噜噜噜成人88aⅴ| 国产精品丝袜一区| 在线播放中文字幕一区| 成人深夜视频在线观看| 亚洲h在线观看| 国产精品国产精品国产专区不片| 制服丝袜日韩国产| 成人福利在线看| 日韩不卡在线观看日韩不卡视频| 国产精品视频在线看| 5566中文字幕一区二区电影| a美女胸又www黄视频久久| 日韩av一区二区三区| 国产精品国产三级国产| 欧美成人a视频| 欧美日韩国产电影| 91丨九色丨国产丨porny| 久久99这里只有精品| 午夜精品一区在线观看| 亚洲日本va午夜在线电影| 久久久亚洲精品一区二区三区 | 精品粉嫩超白一线天av| 欧美体内she精视频| 99在线精品观看| 国产91精品免费| 极品尤物av久久免费看| 五月开心婷婷久久| 夜夜爽夜夜爽精品视频| 国产精品免费免费| 精品国产一区二区三区忘忧草| 欧美性欧美巨大黑白大战| 成人app下载| 大陆成人av片| 成人免费黄色在线| 粉嫩13p一区二区三区| 国产伦精品一区二区三区在线观看| 日韩av一区二区三区四区| 五月天激情小说综合| 天堂精品中文字幕在线| 亚洲成在人线免费| 午夜日韩在线观看| 日本不卡视频一二三区| 日韩av一级片| 久久精品理论片| 国产精品资源网| 国产成人综合在线| 丁香啪啪综合成人亚洲小说| 岛国精品在线播放| 91丝袜国产在线播放| 日本道免费精品一区二区三区| 91福利在线导航| 在线一区二区三区| 欧美区视频在线观看| 欧美日韩成人一区二区| 欧美一区二区三区视频| 亚洲精品一区二区三区福利 | 91丨九色丨黑人外教| 日本韩国精品一区二区在线观看| 在线观看亚洲精品| 7777精品伊人久久久大香线蕉完整版| 欧美挠脚心视频网站| 欧美r级在线观看| 中文在线一区二区| 亚洲综合网站在线观看| 天天色综合天天| 国产一区二区美女| 99久久精品国产导航| 欧美乱妇20p| 精品电影一区二区| 亚洲人成影院在线观看| 日韩精品1区2区3区| 国产精品一区二区三区四区| 91在线码无精品| 欧美高清激情brazzers| 久久亚洲一级片| 亚洲色图另类专区| 免播放器亚洲一区| 99精品视频一区二区三区| 欧美电影在哪看比较好| 欧美精彩视频一区二区三区| 亚洲综合另类小说| 国产高清在线精品| 欧美精品久久一区二区三区| www国产成人免费观看视频 深夜成人网| 日本一区二区成人在线| 五月天精品一区二区三区| 成人综合在线观看| 日韩亚洲欧美成人一区| 亚洲欧美日韩国产成人精品影院 | 成人午夜在线播放| 制服丝袜亚洲网站| 亚洲视频一区在线观看| 精品制服美女丁香| 精品视频免费看| 日韩一区有码在线| 黄一区二区三区| 91精品在线免费| 亚洲欧美激情一区二区| 国产福利一区二区三区视频| 91精品久久久久久久99蜜桃| 中文字幕一区二区三区色视频| 奇米四色…亚洲| 欧美在线制服丝袜| 亚洲欧美怡红院| 国产不卡在线播放| 欧美大胆人体bbbb| 亚洲国产精品一区二区久久| 91在线免费视频观看| xnxx国产精品| 久久综合综合久久综合| 欧美精品1区2区3区| 亚洲国产另类av| 在线免费观看不卡av| 国产精品久久精品日日| 国产在线精品不卡| 日韩精品一区在线| 美女视频免费一区| 欧美一区二区三区免费| 性感美女极品91精品| 欧美日韩在线观看一区二区 | 亚洲国产欧美日韩另类综合 | 成人免费视频网站在线观看| 久久一区二区视频| 九一久久久久久| 日韩欧美国产三级电影视频| 美女免费视频一区二区| 欧美一区二区三区免费在线看| 奇米影视7777精品一区二区| 欧美一区二区高清| 久久精品国产999大香线蕉| 日韩精品中文字幕一区|