fiq.c

来自「三星2440原版bsp」· C语言 代码 · 共 40 行

C
40
字号
//
// 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.
//
//------------------------------------------------------------------------------
//
//  File: interrupt.c
//
//  This file implement fast interrupt handler for S3C3210X SoC. It is
//  implemented in separate file to allow replacement in platform.
//
#include <windows.h>
#include <ceddk.h>
#include <nkintr.h>
#include <bsp.h>
extern void OEMEmergencyPowerOff(void);

//------------------------------------------------------------------------------
//
//  Function:  OEMInterruptHandlerFIQ
//
void OEMInterruptHandlerFIQ()
{
		// This FIQ interrupt is from BAT_FLT.
	volatile S3C2440X_IOPORT_REG *pPortRegs = (S3C2440X_IOPORT_REG*)OALPAtoVA(S3C2440X_BASE_REG_PA_IOPORT, FALSE);

	pPortRegs->GPFDAT = ~(0xa << 4);
	OEMEmergencyPowerOff();
	while(1);
}

//------------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?