int_handler.c
来自「自己写的ARM移植代码」· C语言 代码 · 共 39 行
C
39 行
/**************************************************************/
/* File: int_handler.c */
/* Purpose: IRQ interrupt handler code */
/**************************************************************/
/*
** Copyright (C) ARM Limited, 2000. All rights reserved.
*/
/* #include "rpsarmul.h" */ /* EITHER: to use with the ARMulator */
/* OR: to use with the Integrator board */
/******************************************************************************
* IRQHandler *
* *
* This function handles IRQ interrupts. In this example, these may come from *
* Timer 1 or Timer 2. *
* *
* This handler simply clears the interrupt and sets corresponding flags. *
* These flags are then checked by the main application. *
* *
*******************************************************************************/
#include "s3c4510b.h"
void __irq IRQ_Handler(void)
{
unsigned long irqstatus;
irqstatus=*ARM_INTPEND;
*ARM_INTPEND=0X03;
if(irqstatus & 0x01) *ARM_IOPDATA=0X0F;
else if(irqstatus & 0x02) *ARM_IOPDATA=0XF0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?