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

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

?? armint.c

?? smdk2410 微軟提供的WINCE4.2 BSP
?? C
字號:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
Copyright (c) 2001. Samsung Electronics, co. ltd  All rights reserved.

Module Name:  

Abstract:

	ARM920(S3C2410) interrupt service routine

rev:
	2002.4.3	: first S3C2410 version (SOC)	

	2002.2.5	: system tick modification (kwangyoon LEE, kwangyoon@samsung.com)	
					- one shot timer
	2002.1.29	: bug fixups (kwangyoon LEE, kwangyoon@samsung.com)	
					- system tick interrupt
	2002.1.28	: CE.NET port (kwangyoon LEE, kwangyoon@samsung.com)
	2002.1.22	: Add USBD interrupt (kwangyoon LEE, kwangyoon@samsung.com)

Notes: 
--*/

#include <windows.h>
#include <nkintr.h>
#include <oalintr.h>
#include "p2.h"
#include "p2debug.h"
#include "odoregs.h"
#include "drv_glob.h"

#include <S2410.h>

extern DWORD CurMSec;
extern DWORD DiffMSec;

#if (CE_MAJOR_VER == 0x0003)
	extern DWORD ticksleft, dwSleepMin, dwPreempt;
	extern DWORD DiffMSec;
#else
	extern DWORD dwReschedTime;
#endif

extern DWORD AlarmTime;
extern volatile LARGE_INTEGER CurTicks;
extern DWORD dwReschedIncrement;
extern int (*PProfileInterrupt)(void);

extern DWORD dwIsrTime1, dwIsrTime2;
extern BOOL fIntrTime, fIntrTimeToggle;
extern WORD wNumInterrupts;    // Reset by a read of the ISR times from the IST
extern DWORD dwIntrTimeCountdown;
extern DWORD dwIntrTimeCountdownRef;
extern DWORD dwSPC;
extern DWORD PerfCountSinceTick();
extern BOOL fInterruptFlag;
extern VOID CPUPowerReset();

DWORD OEMTranslateIrq(DWORD dwIrq)
{
    return dwIrq;
}
DWORD OEMTranslateSysIntr(DWORD SysIntr)
{
    return (SysIntr<SYSINTR_FIRMWARE?(DWORD)-1:SysIntr);
}

void OEMInterruptHandlerFIQ() 
{
}


int flag = 1;
unsigned int tCnt = 0;
unsigned int ttt = 0;



int OEMInterruptHandler(unsigned int ra) 
{
	static BYTE nLED = 0;
	volatile INTreg *s2410INT = (INTreg *)INT_BASE;
	volatile IOPreg *s2410IOP = (IOPreg *)IOP_BASE;
	volatile PWMreg *s2410PWM = (PWMreg *)PWM_BASE;

	unsigned int IntPendVal;
	unsigned int SubIntPendVal;	// for serial

	// Update LEDs.
	//
	if (nLED++ > 0xf) nLED = 0;
	OEMWriteDebugLED(0, ~nLED);
    
	IntPendVal = s2410INT->rINTOFFSET;	// Get pending IRQ mode interrupt in INTPND.
    
	// Fake CPUEnterIdle needs to know about interrupt firing.
	fInterruptFlag = TRUE;

    if (fIntrTime) {
        //
        // We're doing interrupt timing. Get Time to ISR. We subtract TIMER_COUNTDOWN
        // here because the compare register has not been updated.
        //
        dwIsrTime1 = PerfCountSinceTick() - dwReschedIncrement;
        dwSPC = ra;
        wNumInterrupts++;
    }

	//
	// Check the timer interrupt.
	//
	if (IntPendVal == INTSRC_TIMER4) 
	{
		DWORD ttmp;
                             
		s2410PWM->rTCNTB4 = dwReschedIncrement;
                             
		ttmp = s2410PWM->rTCON & (~(0xf << 20));
                             
		s2410PWM->rTCON = ttmp | (2 << 20);		/* update TCVNTB4, stop					*/
		s2410PWM->rTCON = ttmp | (1 << 20);		/* one-shot mode,  start				*/
                             
		// Update the tick counter.
		//
		CurTicks.QuadPart += dwReschedIncrement;
                                     
		// Call the profile ISR if it's enabled.
		//
        if (PProfileInterrupt)
        {
			DWORD dwRetVal = SYSINTR_NOP;

			dwRetVal = PProfileInterrupt();
            if (dwRetVal == SYSINTR_RESCHED)
			{
				// Update the millisecond counter.
				//
				CurMSec  += RESCHED_PERIOD;
#if (CE_MAJOR_VER == 0x0003)
                DiffMSec += RESCHED_PERIOD;
#endif
            }

			// Clear the interrupt
			//
			s2410INT->rSRCPND = BIT_TIMER4;        
			s2410INT->rINTPND = BIT_TIMER4;

            // Return whatever we got back from the profiling ISR.
			//
            return(dwRetVal);
        }

		// Update the millisecond counter.
		//
#if (CE_MAJOR_VER == 0x0003)
		DiffMSec += RESCHED_PERIOD;
#endif
		CurMSec  += RESCHED_PERIOD;

		//
		// Clear the interrupt
		//
		s2410INT->rSRCPND = BIT_TIMER4;        
		s2410INT->rINTPND = BIT_TIMER4;
                             		
		if (fIntrTime) 
		{
			//
			// We're doing interrupt timing. Every other tick is a RESCHED.
			//
			dwIntrTimeCountdown--;
                                                                          
			if (dwIntrTimeCountdown == 0) 
			{
				dwIntrTimeCountdown = dwIntrTimeCountdownRef;
				wNumInterrupts = 0;
                                                                              
				dwIsrTime2 = PerfCountSinceTick();
				return (SYSINTR_TIMING);
			} else {
#if (CE_MAJOR_VER == 0x0003)
				if (ticksleft || (dwSleepMin && (dwSleepMin <= DiffMSec)) || (dwPreempt && (dwPreempt <= DiffMSec)))
#else
				if ((int) (CurMSec - dwReschedTime) >= 0)
#endif
					return(SYSINTR_RESCHED);
			}    
		} else {
#if (CE_MAJOR_VER == 0x0003)
			if (ticksleft || (dwSleepMin && (DiffMSec >= dwSleepMin)) || (dwPreempt && (DiffMSec >= dwPreempt)))
#else
			if ((int) (CurMSec - dwReschedTime) >= 0)
#endif
                             
			{
				return(SYSINTR_RESCHED);
			}
			return(SYSINTR_NOP);
		}
	} else if (IntPendVal == INTSRC_EINT1)	// Keyboard interrupt is connected to EINT1.
	{ 
                s2410INT->rINTMSK |= BIT_EINT1;
                s2410INT->rSRCPND  = BIT_EINT1;        
                s2410INT->rINTPND  = BIT_EINT1;

                return(SYSINTR_KEYBOARD);

	} else if (IntPendVal == INTSRC_EINT2)	// EINT2
	{ 
		s2410INT->rINTMSK |= BIT_EINT2;
		s2410INT->rSRCPND  = BIT_EINT2;	/* Interrupt Clear				*/
		s2410INT->rINTPND  = BIT_EINT2;
		CPUPowerReset();

		return(SYSINTR_POWER);
	}
	else if (IntPendVal == INTSRC_EINT3)	// PCMCIA interrupt is connected to EINT3. (nINT_P_DEV)
	{ 
       		s2410INT->rINTMSK |= BIT_EINT3;
       		s2410INT->rSRCPND  =  BIT_EINT3;        
       		s2410INT->rINTPND  =  BIT_EINT3;
                               
       		return(SYSINTR_PCMCIA_STATE);
	}  
	else if (IntPendVal == INTSRC_EINT8_23)		// EINT8 ~ 23
	{ 
		DWORD dwSubMask = s2410IOP->rEINTPEND & (~s2410IOP->rEINTMASK);

		if (dwSubMask & 0x200)					// EINT9 : CS8900
		{
			s2410IOP->rEINTMASK |= 0x200;		// Mask and clear interrupt at first-level controller.
			s2410IOP->rEINTPEND  = 0x200;		//

			// Note: we don't mask BIT_EINT8_23 because it's shared.
			//
			s2410INT->rSRCPND  = BIT_EINT8_23;	// Clear pending interrupt at second-level controller.
			s2410INT->rINTPND  = BIT_EINT8_23;	//

			return(SYSINTR_ETHER);
		}
		else if (s2410IOP->rEINTPEND & 0x100)	// EINT8 : PD6710
		{
			s2410IOP->rEINTMASK |= 0x100;		// Mask and clear interrupt at first-level controller.
			s2410IOP->rEINTPEND  = 0x100;		//
	
			// Note: we don't mask BIT_EINT8_23 because it's shared.
			//
			s2410INT->rSRCPND	= BIT_EINT8_23;	// Clear pending interrupt at second-level controller.        
			s2410INT->rINTPND	= BIT_EINT8_23;	//

			return(SYSINTR_PCMCIA_LEVEL);
		}
		else
		{
			s2410INT->rSRCPND  = BIT_EINT8_23;		// Clear pending interrupt at second-level controller.
			s2410INT->rINTPND  = BIT_EINT8_23;		//
		}
	}
	else if (IntPendVal == INTSRC_ADC) { 	// INTSRC_ADC
		s2410INT->rINTSUBMSK |= BIT_SUB_TC;
		s2410INT->rINTMSK    |= BIT_ADC;
		s2410INT->rSRCPND     = BIT_ADC;	/* Interrupt Clear			*/
		s2410INT->rINTPND     = BIT_ADC;

		return(SYSINTR_TOUCH);
	}
	else if (IntPendVal == INTSRC_TIMER3) { // INTSRC_TIMER3
		s2410INT->rINTMSK |= BIT_TIMER3;
		s2410INT->rSRCPND  = BIT_TIMER3;	/* Interrupt Clear			*/
		s2410INT->rINTPND  = BIT_TIMER3;

		return(SYSINTR_TOUCH_CHANGED);
	}	     
	else if (IntPendVal == INTSRC_EINT0)  { // POWER BUTTON
		s2410INT->rINTMSK |= BIT_EINT0;
		s2410INT->rSRCPND  = BIT_EINT0;	/* Interrupt Clear				*/
		s2410INT->rINTPND  = BIT_EINT0;

		return(SYSINTR_POWER);	
	}
	else if(IntPendVal == INTSRC_DMA1) // AUDIO DMA input.
	{  
		s2410INT->rINTMSK |= BIT_DMA1;
		s2410INT->rSRCPND  = BIT_DMA1;
		s2410INT->rINTPND  = BIT_DMA1;

		return(SYSINTR_AUDIO);
	}
	else if(IntPendVal == INTSRC_DMA2) // AUDIO DMA output.
	{  
		s2410INT->rINTMSK |= BIT_DMA2;
		s2410INT->rSRCPND  = BIT_DMA2;
		s2410INT->rINTPND  = BIT_DMA2;

		return(SYSINTR_AUDIO);
	}
	else if(IntPendVal == INTSRC_USBH) 	// USB.
	{
		s2410INT->rINTMSK |= BIT_USBH;
		s2410INT->rSRCPND  = BIT_USBH;        
		s2410INT->rINTPND  = BIT_USBH;
		return(SYSINTR_USB);     
	} 
	else if(IntPendVal == INTSRC_USBD) 
	{
		s2410INT->rINTMSK |= BIT_USBD;
		s2410INT->rSRCPND  = BIT_USBD;
		s2410INT->rINTPND  = BIT_USBD;
		return(SYSINTR_USBD);
	}
	else if(IntPendVal == INTSRC_UART0)	// SERIAL (UART0) (physical COM1: P1 connector).
	{  
		SubIntPendVal = s2410INT->rSUBSRCPND;

		// Note that we only mask the sub source interrupt - the serial driver will clear the
		// sub source pending register.
		//
		if(SubIntPendVal & INTSUB_ERR0) 
		{
			s2410INT->rINTSUBMSK |= INTSUB_ERR0;
		}
		else if(SubIntPendVal & INTSUB_RXD0) 
		{
			s2410INT->rINTSUBMSK |= INTSUB_RXD0;
		}
		else if(SubIntPendVal & INTSUB_TXD0) 
		{
			s2410INT->rINTSUBMSK |= INTSUB_TXD0;
		}
		else
		{
			return(SYSINTR_NOP);
		}
	
		// NOTE: Don't clear INTSRC:UART0 here - serial driver does that.
		//
		s2410INT->rINTMSK |= BIT_UART0;
		s2410INT->rINTPND  = BIT_UART0;

		return(SYSINTR_SERIAL);
	}
	else if(IntPendVal == INTSRC_UART2)	// IrDA (UART2)
	{
		SubIntPendVal = s2410INT->rSUBSRCPND;

		if(SubIntPendVal & INTSUB_ERR2) 
		{
			s2410INT->rINTSUBMSK |= INTSUB_ERR2;
		}       
		else if(SubIntPendVal & INTSUB_RXD2) 
		{
			s2410INT->rINTSUBMSK |= INTSUB_RXD2;
		}       
		else if(SubIntPendVal & INTSUB_TXD2) 
		{
			s2410INT->rINTSUBMSK |= INTSUB_TXD2;
		}       
		else
		{
			return(SYSINTR_NOP);
		}

		// NOTE: Don't clear INTSRC:UART2 here - serial driver does that.
		//
		s2410INT->rINTMSK |= BIT_UART2;
		s2410INT->rINTPND  = BIT_UART2;
		
		return(SYSINTR_IR);
	}
	
	return(SYSINTR_NOP);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区偷拍精品| 欧美肥妇毛茸茸| 亚洲桃色在线一区| 日本精品一区二区三区高清| 一区二区在线免费| 欧美男同性恋视频网站| 天天影视涩香欲综合网| 欧美电视剧在线观看完整版| 国产做a爰片久久毛片| 国产精品三级电影| 91国偷自产一区二区三区观看| 亚洲一区二区影院| 日韩欧美国产麻豆| 国产91精品露脸国语对白| 亚洲欧美怡红院| 欧美精品久久久久久久久老牛影院| 美女爽到高潮91| 国产精品久久久久久户外露出| 色女孩综合影院| 男人的天堂亚洲一区| 国产精品天干天干在线综合| 在线观看不卡视频| 久久se精品一区二区| 国产精品成人免费| 这里只有精品免费| 波多野洁衣一区| 日韩精品电影在线观看| 欧美激情一区三区| 91精品黄色片免费大全| av在线不卡免费看| 免费观看日韩av| 国产精品卡一卡二卡三| 欧美另类一区二区三区| 大白屁股一区二区视频| 亚洲成a人片在线观看中文| 国产偷国产偷精品高清尤物| 欧美猛男超大videosgay| 国产精品1024| 日本欧美肥老太交大片| 日韩一区欧美小说| 久久影院午夜片一区| 欧美日韩一二区| 欧美日韩一级大片网址| 精品动漫一区二区三区在线观看| 樱桃视频在线观看一区| 2021久久国产精品不只是精品| 91啪亚洲精品| 国产成人午夜高潮毛片| 美女诱惑一区二区| 亚洲午夜电影在线| 国产精品护士白丝一区av| 亚洲精品一区二区在线观看| 欧美三级在线看| 色综合久久88色综合天天6 | 成人免费毛片a| 免费在线观看一区| 亚洲成av人影院| 亚洲狼人国产精品| 中文字幕在线不卡一区| 久久精子c满五个校花| 日韩视频免费观看高清完整版 | 首页国产欧美日韩丝袜| 国产精品天干天干在观线| 精品美女被调教视频大全网站| 欧美在线观看你懂的| 成人av午夜影院| 国产老妇另类xxxxx| 精品一区二区在线免费观看| 日韩中文字幕91| 午夜激情久久久| 一区二区欧美在线观看| 亚洲男人电影天堂| 一区二区三区不卡视频| 一区二区三区四区不卡在线| 中文字幕佐山爱一区二区免费| 欧美国产国产综合| 国产欧美一区二区在线| 国产欧美在线观看一区| 中文字幕久久午夜不卡| 中文字幕高清一区| 中文幕一区二区三区久久蜜桃| 国产亚洲精品精华液| 国产日产亚洲精品系列| 日本一二三不卡| 成人免费一区二区三区在线观看| 亚洲免费观看高清在线观看| 洋洋成人永久网站入口| 五月激情丁香一区二区三区| 奇米一区二区三区| 久久69国产一区二区蜜臀| 国产乱淫av一区二区三区 | 欧美三级日本三级少妇99| 国产黄色成人av| 99久久精品久久久久久清纯| 99久久免费国产| 日韩一级完整毛片| 中文字幕精品在线不卡| 激情久久五月天| 国产成人免费视频| 成人欧美一区二区三区白人| 欧美一区二区三区人| 日韩欧美在线1卡| 国产欧美久久久精品影院| 亚洲欧美日韩中文播放| 日韩激情av在线| 国产成都精品91一区二区三| 色综合咪咪久久| 欧美一级高清片| 国产精品美女久久久久久| 香蕉久久一区二区不卡无毒影院| 久久不见久久见中文字幕免费| 成人免费视频网站在线观看| gogogo免费视频观看亚洲一| 久久婷婷久久一区二区三区| 欧美主播一区二区三区美女| 精品福利一区二区三区免费视频| 日本一区免费视频| 亚洲国产成人porn| 国产经典欧美精品| 欧美日韩免费视频| 欧美激情一区在线| 日韩成人精品视频| 色婷婷一区二区| 久久综合中文字幕| 亚洲国产精品影院| 粉嫩av一区二区三区粉嫩| 欧美综合天天夜夜久久| 国产欧美日韩另类视频免费观看| 亚洲成人动漫av| av电影天堂一区二区在线观看| 欧美成人性战久久| 一区二区在线看| 成人美女在线视频| 欧美电影精品一区二区| 亚洲高清一区二区三区| 成人av综合在线| 欧美mv和日韩mv国产网站| 亚洲色图丝袜美腿| 国产乱色国产精品免费视频| 欧美一区二区三区视频免费 | 久久久精品综合| 2024国产精品| 波多野结衣亚洲| 国产麻豆成人传媒免费观看| 亚洲久草在线视频| 欧美一二三在线| 欧美日韩国产综合草草| 在线观看一区二区精品视频| 色综合中文综合网| 97成人超碰视| 欧美精品久久99久久在免费线 | 久久99精品国产91久久来源| 在线观看91精品国产麻豆| 亚洲影视在线观看| 欧美成人精品1314www| 亚洲免费av在线| 成人app在线| 日韩美女视频一区| 欧美性猛交一区二区三区精品| 免费亚洲电影在线| 日韩精品最新网址| 人人超碰91尤物精品国产| 久久蜜臀精品av| 久久久www免费人成精品| 精品久久99ma| 欧美精品乱码久久久久久按摩 | 国产午夜精品理论片a级大结局| aaa欧美大片| 九九**精品视频免费播放| 国产精品久久久一本精品| 亚洲精品在线一区二区| 日本人妖一区二区| 欧美精品一区二区高清在线观看| 国产精品主播直播| 亚洲精品免费一二三区| 国产亚洲福利社区一区| 欧美三级视频在线| 精品在线观看视频| 国产精品少妇自拍| 日韩三级高清在线| 欧美在线观看一二区| 欧美日韩一区二区电影| 精品一区二区三区免费视频| 久久人人爽爽爽人久久久| 日韩一卡二卡三卡| 欧美精品99久久久**| 欧美日韩黄色一区二区| 一本大道久久a久久综合| 国产精品亚洲视频| 成人手机电影网| 国产传媒一区在线| 成人精品小蝌蚪| 国产午夜久久久久| 亚洲成年人影院| 国产福利一区二区三区| 成人久久久精品乱码一区二区三区 | 日韩电影在线一区二区| 日韩视频一区二区三区在线播放| 国产成人小视频| 亚洲一区二区三区国产|