irq.h
来自「最新版IAR FOR ARM(EWARM)5.11中的代码例子」· C头文件 代码 · 共 90 行
H
90 行
/**********************************************************************************/
/* */
/* Copyright (C) 2005 Oki Electric Industry Co., LTD. */
/* */
/* System Name : uPLAT series */
/* Module Name : header file for using IRQ */
/* File Name : irq.h */
/* Revision : 01.00 */
/* Date : 2005/2/08 initial version */
/* */
/**********************************************************************************/
#ifndef IRQ_H
#define IRQ_H
#include "common.h"
/* type definition */
typedef void IRQ_HANDLER(void);
typedef IRQ_HANDLER *pIRQ_HANDLER;
/* functions */
#ifndef __IAR__
/*************************************************************************************************/
/* Enable IRQ */
/* Function : UWORD irq_en(void) */
/* Parameters */
/* input : nothing */
/* output : IRQ state before change */
/* 0 : Enable */
/* others : Disable */
/*************************************************************************************************/
__swi (0x00) UWORD irq_en(void);
/*************************************************************************************************/
/* Disable IRQ */
/* Function : UWORD irq_dis(void) */
/* Parameters */
/* input : nothing */
/* output : IRQ state before change */
/* 0 : Enable */
/* others : Disable */
/*************************************************************************************************/
__swi (0x01) UWORD irq_dis(void);
/****************************************************************************/
/* Enable FIQ */
/* Function : UWORD fiq_en(void) */
/* Parameters */
/* input : nothing */
/* output : FIQ state before change */
/* 0x2 : Enable */
/* 0x3 : Disable */
/* Note : This function depends on software development tools */
/****************************************************************************/
__swi (0x2) UWORD fiq_en(void);
/****************************************************************************/
/* Disable FIQ */
/* Function : UWORD fiq_dis(void) */
/* Parameters */
/* input : nothing */
/* output : FIQ state before change */
/* 0x2 : Enable */
/* 0x3 : Disable */
/* Note : This function depends on software development tools */
/****************************************************************************/
__swi (0x3) UWORD fiq_dis(void);
#endif // End ifndef __IAR__
/*************************************************************************************************/
/* Initialize Interrupt Control Registers (IRQ interrupt) */
/* Function : init_irq */
/* Parameters */
/* Input : Nothing */
/* Output : Nothing */
/*************************************************************************************************/
void init_irq(void);
#define IRQSIZE 64
/*************************************************************************************************/
/* Table of IRQ handler */
/* If interrupt of interrupt number N occurred, */
/* function of IRQ_HANDLER_TABLE[N] is called. */
/*************************************************************************************************/
extern pIRQ_HANDLER IRQ_HANDLER_TABLE[IRQSIZE];
#endif /* #define IRQ_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?