📄 irq.h
字号:
/*
********************************************************
// Copyright (c)2004 Ark Pioneer Microelectronics Ltd.,
// All Rights Reserved
//
// Filename: irq.h
// Version: 1.0
// Created: 2004.02.04 By: Philip
*********************************************************
*/
#ifndef _IRQ_H_
#define _IRQ_H_
#include "config.h"
extern BYTE DetectI2sIrq(void);
extern BYTE DetectUsbIrq(void);
extern void OtherExcProcess(void);
extern void IrqProcess(void);
/*----------------------------------------------------------------
Exception Code
----------------------------------------------------------------*/
#define Int 0 /* Interrupt */
#define Mod 1 /* TLB modified */
#define TLBL 2 /* TLB refill (Load/fetch) */
#define TLBS 3 /* TLB refill (Store) */
#define AdEL 4 /* Address error (Load/fetch) */
#define AdES 5 /* Address error (Store) */
#define IBE 6 /* Bus error (Instruction fetch) */
#define DBE 7 /* Bus error (Data load/store) */
#define Sys 8 /* System call */
#define Bp 9 /* Breakpoint */
#define RI 10 /* Reserved instruction */
#define CpU 11 /* Coprocessor unusable */
#define Ov 12 /* Operation overflow */
#define Tr 13 /* Trap */
#define FPE 15 /* Floating point */
#define WATCH 23 /* Watch */
/*-----------------------------------------------------------------------------
Interrupt Request Types
-----------------------------------------------------------------------------*/
//usb
#define OUT2_IRQ 0x21
#define IN2_IRQ 0x22
#define SUDAV_IRQ 0x20
//i2s
#define TUR_CONDITION_IRQ 0x11
#define TFS_REQUEST_IRQ 0x12
/*----------------------------------------------------------------
SCU Interrupt Bitmap (Enable and Clear)
----------------------------------------------------------------*/
// for SCU_INTMASK
#define bmSCU_ALL_INT 0x07 /* 0000 0111 (bit2:0) */
#define bmSCU_ISA_INT bmBIT2 /* 0000 0100 (bit2) */
#define bmSCU_LCDERR_INT bmBIT1 /* 0000 0010 (bit1) */
#define bmSCU_WRAPERR_INT bmBIT0 /* 0000 0001 (bit0) */
// for SCU_INTFLAG
#define bmSCU_ALL_INT_CLEAR 0x00 /* set bit2:0 */
/*----------------------------------------------------------------
ICU Interrupt Bitmap (Enable and Clear)
----------------------------------------------------------------*/
/*
** for IER Enable Interrupt (1:enable 0:disable)
** for ICR Clear Interrupt (1:reset 0:notmal)
** for ISR Get Interrupt Status (1:occurred 0:normal)
*/
#define bmICU_UART0_INT bmBIT0
#define bmICU_UART1_INT bmBIT1
#define bmICU_GPIO_INT bmBIT2
#define bmICU_LPC_INT bmBIT3
#define bmICU_LED_INT bmBIT4 /* bit5 is reserved */
#define bmICU_RTC_ALARM_INT bmBIT6
#define bmICU_RTC_PERIOD_INT bmBIT7
#define bmICU_I2S0_INT bmBIT8
#define bmICU_I2S1_INT bmBIT9 /* the others are reserved */
//edge trigger interrupt
#define bmICU_FLEXIO_WF_INT bmBIT10
#define bmICU_FLEXIO_DONE_INT bmBIT11
// for ITR set interrupt trigger mode
#define ITR_EDGE_TRIGGER 1
#define ITR_LEVEL_TRIGGER 0
/*----------------------------------------------------------------
I2S Interrupt Bitmap (Enable and Clear)
----------------------------------------------------------------*/
#define bmTFS_REQUEST_INT bmBIT3
#define bmRFS_REQUEST_INT bmBIT4
#define bmTUR_CONDITION_INT bmBIT5 // Transmit under-run
#define bmROR_CONDITION_INT bmBIT6 // Receive over-run
//clear irq flag bitmask (SAICR register in i2s.h)
#define bmROR_CLEAR bmBIT6
#define bmTUR_CLEAR bmBIT5
/*----------------------------------------------------------------
USB Interrupt Bitmap (Enable and Clear)
----------------------------------------------------------------*/
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -