irq.h
上传用户:jndfzc
上传日期:2014-06-02
资源大小:325k
文件大小:3k
- #ifndef __IRQ_H
- #define __IRQ_H
- #include "maindef.h"
- #ifdef __IRQ_C
- #define __IRQ_EXT
- #else
- #define __IRQ_EXT extern
- #endif
- //AIC Source Mode Register
- #define AIC_SMR0 0XFFFFF000 //FIQ
- #define AIC_SMR1 0XFFFFF004 //SWIRQ
- #define AIC_SMR2 0XFFFFF008 //US0IRQ
- #define AIC_SMR3 0XFFFFF00C //US1IRQ
- #define AIC_SMR4 0XFFFFF010 //TC0IRQ
- #define AIC_SMR5 0XFFFFF014 //TC1IRQ
- #define AIC_SMR6 0XFFFFF018 //TC2IRQ
- #define AIC_SMR7 0XFFFFF01C //WDIRQ
- #define AIC_SMR8 0XFFFFF020 //PIOIRQ
- #define AIC_SMR16 0XFFFFF040 //IRQ0
- #define AIC_SMR17 0XFFFFF044 //IRQ1
- #define AIC_SMR18 0XFFFFF048 //IRQ2
- //AIC Source Vector Register
- #define AIC_SVR0 0XFFFFF080
- #define AIC_SVR1 0XFFFFF084
- #define AIC_SVR2 0XFFFFF088
- #define AIC_SVR3 0XFFFFF08C
- #define AIC_SVR4 0XFFFFF090
- #define AIC_SVR5 0XFFFFF094
- #define AIC_SVR6 0XFFFFF098
- #define AIC_SVR7 0XFFFFF09C
- #define AIC_SVR8 0XFFFFF0A0
- #define AIC_SVR16 0XFFFFF0C0
- #define AIC_SVR17 0XFFFFF0C4
- #define AIC_SVR18 0XFFFFF0C8
- #define AIC_IVR 0XFFFFF100 //AIC Interrupt Vector Register(Read Only)
- #define AIC_FVR 0XFFFFF104 //AIC FIQ Vector Register(Read Only)
- #define AIC_ISR 0xFFFFF108 //AIC Interrupt Status Register(Read Only)
- #define AIC_IPR 0xFFFFF10C //AIC Interrupt Pending Register(Read Only)
- #define AIC_IMR 0xFFFFF110 //AIC Interrupt Mask Register(Read Only)
- #define AIC_CISR 0xFFFFF114 //AIC Core Interrupt Status Register(Read Only)
- #define AIC_IECR 0XFFFFF120 //AIC Interrupt Enable Command Register(Write Only)
- #define AIC_IDCR 0XFFFFF124 //AIC Interrupt Disable Command Register(Write Only)
- #define AIC_ICCR 0XFFFFF128 //AIC Interrupt Clear Command Register(Write Only)
- #define AIC_ISCR 0XFFFFF12C //AIC Interrupt Set Command Register(Write Only)
- #define AIC_EOICR 0XFFFFF130 //AIC End of Interrupt Command Register(Write Only)
- #define AIC_SPU 0XFFFFF134 //AIC Spurious Vector Register
- typedef enum{
- FIRQ=0x1,
- SWIRQ=0x2,
- US0IRQ=0x4,
- US1IRQ=0x8,
- TC0IRQ=0x10,
- TC1IRQ=0x20,
- TC2IRQ=0x40,
- WDIRQ=0x80,
- PIOIRQ=0x100,
- IRQ0=0x10000,
- IRQ1=0x20000,
- IRQ2=0x40000
- }EnumIntKind;
- __IRQ_EXT void Interrupt_Init(void);
- __IRQ_EXT void Interrupt_Enable(EnumIntKind IntKind);
- __IRQ_EXT void Interrupt_Disable(EnumIntKind IntKind);
- __IRQ_EXT void C_Undefined_Handler(void);
- __IRQ_EXT void C_Prefetch_Handler(void);
- __IRQ_EXT void C_Abort_Handler(void);
- __IRQ_EXT void C_FIQ_Handler(void);
- __IRQ_EXT void C_SWIRQ_Handler(void);
- __IRQ_EXT void C_US0IRQ_Handler(void);
- __IRQ_EXT void C_US1IRQ_Handler(void);
- __IRQ_EXT void C_TC0IRQ_Handler(void);
- __IRQ_EXT void C_TC1IRQ_Handler(void);
- __IRQ_EXT void C_TC2IRQ_Handler(void);
- __IRQ_EXT void C_WDIRQ_Handler(void);
- __IRQ_EXT void C_PIOIRQ_Handler(void);
- __IRQ_EXT void C_IRQ0IRQ_Handler(void);
- __IRQ_EXT void C_IRQ1IRQ_Handler(void);
- __IRQ_EXT void C_IRQ2IRQ_Handler(void);
- __IRQ_EXT void FIQ_Handler(void);
- __IRQ_EXT void SWIRQ_Handler(void);
- __IRQ_EXT void US0IRQ_Handler(void);
- __IRQ_EXT void US1IRQ_Handler(void);
- __IRQ_EXT void TC0IRQ_Handler(void);
- __IRQ_EXT void TC1IRQ_Handler(void);
- __IRQ_EXT void TC2IRQ_Handler(void);
- __IRQ_EXT void WDIRQ_Handler(void);
- __IRQ_EXT void PIOIRQ_Handler(void);
- __IRQ_EXT void IRQ0IRQ_Handler(void);
- __IRQ_EXT void IRQ1IRQ_Handler(void);
- __IRQ_EXT void IRQ2IRQ_Handler(void);
- void EnableIRQ(void);
- #endif