/*
 * Copyright (C) 2021-2022 Suzhou Tiancheng Software Inc. All Rights Reserved.
 *
 */
/*
 * ls2k500_irq.h
 *
 * created: 2022-02-18
 *  author: Bian
 */

#ifndef _LS2K500_IRQ_H
#define _LS2K500_IRQ_H

#include "ls2k500.h"

/**************************************************************************************************
 * Loongarch64 Vector numbers for exception. This is a direct map to the ESTAT.
 **************************************************************************************************/

#define LA_EXCEPTION_BASE           0

#define LA_EXCEPTION_INT            LA_EXCEPTION_BASE+0     // 仅当CSR.ECFG.VS=0时, 表示是中断
#define LA_EXCEPTION_PIL            LA_EXCEPTION_BASE+1     // load  操作页无效例外
#define LA_EXCEPTION_PIS            LA_EXCEPTION_BASE+2     // store 操作页无效例外
#define LA_EXCEPTION_PIF            LA_EXCEPTION_BASE+3     // 取指操作页无效例外
#define LA_EXCEPTION_PME            LA_EXCEPTION_BASE+4     // 页修改例外
#define LA_EXCEPTION_PNR            LA_EXCEPTION_BASE+5     // 页不可读例外
#define LA_EXCEPTION_PNX            LA_EXCEPTION_BASE+6     // 页不可执行例外
#define LA_EXCEPTION_PPI            LA_EXCEPTION_BASE+7     // 页特权等级不合规例外
#define LA_EXCEPTION_ADEF_ADEM      LA_EXCEPTION_BASE+8     // subcode=0: 取指地址错例外/subcode=1: 访存指令地址错例外
#define LA_EXCEPTION_ALE            LA_EXCEPTION_BASE+9     // 地址非对齐例外
#define LA_EXCEPTION_BCE            LA_EXCEPTION_BASE+10    // 边界约束检查错例外
#define LA_EXCEPTION_SYSCALL        LA_EXCEPTION_BASE+11    // 系统调用例外
#define LA_EXCEPTION_BREAK          LA_EXCEPTION_BASE+12    // 断点例外
#define LA_EXCEPTION_INE            LA_EXCEPTION_BASE+13    // 指令不存在例外
#define LA_EXCEPTION_IPE            LA_EXCEPTION_BASE+14    // 指令特权等级错例外
#define LA_EXCEPTION_FPD            LA_EXCEPTION_BASE+15    // 浮点指令未使能例外
#define LA_EXCEPTION_SXD            LA_EXCEPTION_BASE+16    // 128位向量扩展指令未使能例外
#define LA_EXCEPTION_ASXD           LA_EXCEPTION_BASE+17    // 256位向量扩展指令未使能例外
#define LA_EXCEPTION_FPE_VFPE       LA_EXCEPTION_BASE+18    // subcode=0: 基础浮点指令例外/subcode=1: 向量浮点指令例外
#define LA_EXCEPTION_WPEF_WPEM      LA_EXCEPTION_BASE+19    // subcode=0: 取指监测点例外/subcode=1: load/store操作监测点例外
#define LA_EXCEPTION_BTD            LA_EXCEPTION_BASE+20    // 二进制翻译扩展指令未使能例外
#define LA_EXCEPTION_BTE            LA_EXCEPTION_BASE+21    // 二进制翻译相关例外
#define LA_EXCEPTION_GSPR           LA_EXCEPTION_BASE+22    // 客户机敏感特权资源例外
#define LA_EXCEPTION_HVC            LA_EXCEPTION_BASE+23    // 虚拟机监控调用例外
#define LA_EXCEPTION_GCSC_GCHC      LA_EXCEPTION_BASE+24    // subcode=0: 客户机CSR软件修改例外/ subcode=1: 客户机CSR硬件修改例外

/*0x1A-0x3E 保留 */

#define LA_INTERRUPT_BASE           LA_EXCEPTION_BASE+64    // 64

/**************************************************************************************************
 * Interrupt Vector Numbers
 * Loongarch64 LA_INTERRUPT_BASE should be 64 (0x40)
 **************************************************************************************************/

/*
 * Loongarch64 ECFG (0x4)  LIP bit(12:0)=IPI, TI, PMI, HWI[7:0], SWI[1:0]
 *             ESTAT(0x5)  IS  bit(12:0) if interrupt, status bit equal 1
 *
 */
#define LS2K500_IRQ_SW0             (LA_INTERRUPT_BASE+0)   // 软中断 SWI0~SWI1
#define LS2K500_IRQ_SW1             (LA_INTERRUPT_BASE+1)
#define LS2K500_IRQ_HW0             (LA_INTERRUPT_BASE+2)   // 硬中断 HWI0~HWI7
#define LS2K500_IRQ_HW1             (LA_INTERRUPT_BASE+3)
#define LS2K500_IRQ_HW2             (LA_INTERRUPT_BASE+4)
#define LS2K500_IRQ_HW3             (LA_INTERRUPT_BASE+5)
#define LS2K500_IRQ_HW4             (LA_INTERRUPT_BASE+6)
#define LS2K500_IRQ_HW5             (LA_INTERRUPT_BASE+7)
#define LS2K500_IRQ_HW6             (LA_INTERRUPT_BASE+8)
#define LS2K500_IRQ_HW7             (LA_INTERRUPT_BASE+9)
#define LS2K500_IRQ_PERF            (LA_INTERRUPT_BASE+10)  // 性能监测计数溢出中断
#define LS2K500_IRQ_TIMER           (LA_INTERRUPT_BASE+11)  // 定时器中断
#define LS2K500_IRQ_IPI             (LA_INTERRUPT_BASE+12)  // 核间中断

#if (!USE_EXTINT)   /* 使用传统中断 */

/**************************************************************************************************
 * 使用系统传统中断模式, 共支持64个中断
 **************************************************************************************************/
 
/*
 * Interrupt Control 0 Interrupts
 */
#define LS2K500_IRQ0_BASE           (LA_INTERRUPT_BASE+16)      // 80

#define INTC0_SDIO0_1_IRQ           (LS2K500_IRQ0_BASE+31)
#define INTC0_USB3_IRQ              (LS2K500_IRQ0_BASE+30)
#define INTC0_GPU_IRQ               (LS2K500_IRQ0_BASE+29)
#define INTC0_DC_IRQ                (LS2K500_IRQ0_BASE+28)
#define INTC0_PWM12_15_IRQ          (LS2K500_IRQ0_BASE+27)
#define INTC0_PWM8_11_IRQ           (LS2K500_IRQ0_BASE+26)
#define INTC0_PWM4_7_IRQ            (LS2K500_IRQ0_BASE+25)
#define INTC0_PWM0_3_IRQ            (LS2K500_IRQ0_BASE+24)
#define INTC0_I2C1_IRQ              (LS2K500_IRQ0_BASE+23)
#define INTC0_I2C0_IRQ              (LS2K500_IRQ0_BASE+22)
#define INTC0_HPET0_IRQ             (LS2K500_IRQ0_BASE+21)
#define INTC0_NAND_IRQ              (LS2K500_IRQ0_BASE+20)
#define INTC0_SATA_IRQ              (LS2K500_IRQ0_BASE+19)
#define INTC0_SATA_PME_IRQ          (LS2K500_IRQ0_BASE+18)
#define INTC0_CAN2_3_IRQ            (LS2K500_IRQ0_BASE+17)
#define INTC0_CAN0_1_IRQ            (LS2K500_IRQ0_BASE+16)
#define INTC0_PRINT_IRQ             (LS2K500_IRQ0_BASE+15)
#define INTC0_GMAC1_IRQ             (LS2K500_IRQ0_BASE+14)
#define INTC0_LS132_IRQ             (LS2K500_IRQ0_BASE+13)
#define INTC0_GMAC0_IRQ             (LS2K500_IRQ0_BASE+12)
#define INTC0_KEYBOARD_IRQ          (LS2K500_IRQ0_BASE+11)
#define INTC0_MOUSE_IRQ             (LS2K500_IRQ0_BASE+10)
#define INTC0_RTC_TICK_IRQ          (LS2K500_IRQ0_BASE+9)
#define INTC0_TOY_TICK_IRQ          (LS2K500_IRQ0_BASE+8)
#define INTC0_THSENS_IRQ            (LS2K500_IRQ0_BASE+7)
#define INTC0_AC97_IRQ              (LS2K500_IRQ0_BASE+6)
#define INTC0_LPC_IRQ               (LS2K500_IRQ0_BASE+5)
#define INTC0_HDA_IRQ               (LS2K500_IRQ0_BASE+4)
#define INTC0_UART3_IRQ             (LS2K500_IRQ0_BASE+3)
#define INTC0_UART2_IRQ             (LS2K500_IRQ0_BASE+2)
#define INTC0_UART1_IRQ             (LS2K500_IRQ0_BASE+1)
#define INTC0_UART0_IRQ             (LS2K500_IRQ0_BASE+0)

/*
 * Interrupt Control 1 Interrupts
 */
#define LS2K500_IRQ1_BASE           (LS2K500_IRQ0_BASE+32)      // 112

#define INTC1_UART7_9_IRQ           (LS2K500_IRQ1_BASE+31)
#define INTC1_UART4_6_IRQ           (LS2K500_IRQ1_BASE+30)
#define INTC1_GPIO96_127_IRQ        (LS2K500_IRQ1_BASE+29)
#define INTC1_GPIO64_95_IRQ         (LS2K500_IRQ1_BASE+28)
#define INTC1_GPIO32_63_IRQ         (LS2K500_IRQ1_BASE+27)
#define INTC1_GPIO0_31_IRQ          (LS2K500_IRQ1_BASE+26)
#define INTC1_I2C4_5_IRQ            (LS2K500_IRQ1_BASE+25)
#define INTC1_I2C3_IRQ              (LS2K500_IRQ1_BASE+24)
#define INTC1_I2C2_IRQ              (LS2K500_IRQ1_BASE+23)
#define INTC1_RTC2_IRQ              (LS2K500_IRQ1_BASE+22)
#define INTC1_RTC1_IRQ              (LS2K500_IRQ1_BASE+21)
#define INTC1_RTC0_IRQ              (LS2K500_IRQ1_BASE+20)
#define INTC1_OHCI_IRQ              (LS2K500_IRQ1_BASE+19)
#define INTC1_EHCI_IRQ              (LS2K500_IRQ1_BASE+18)
#define INTC1_OTG_IRQ               (LS2K500_IRQ1_BASE+17)
#define INTC1_HPET3_IRQ             (LS2K500_IRQ1_BASE+16)
#define INTC1_DMA3_IRQ              (LS2K500_IRQ1_BASE+15)
#define INTC1_DMA2_IRQ              (LS2K500_IRQ1_BASE+14)
#define INTC1_DMA1_IRQ              (LS2K500_IRQ1_BASE+13)
#define INTC1_DMA0_IRQ              (LS2K500_IRQ1_BASE+12)
#define INTC1_ACPI_IRQ              (LS2K500_IRQ1_BASE+11)
#define INTC1_TOY2_IRQ              (LS2K500_IRQ1_BASE+10)
#define INTC1_TOY1_IRQ              (LS2K500_IRQ1_BASE+9)
#define INTC1_TOY0_IRQ              (LS2K500_IRQ1_BASE+8)
#define INTC1_HPET2_IRQ             (LS2K500_IRQ1_BASE+7)
#define INTC1_HPET1_IRQ             (LS2K500_IRQ1_BASE+6)
#define INTC1_SPI4_5_IRQ            (LS2K500_IRQ1_BASE+5)
#define INTC1_SPI2_3_IRQ            (LS2K500_IRQ1_BASE+4)
#define INTC1_SPI1_IRQ              (LS2K500_IRQ1_BASE+3)
#define INTC1_SPI0_IRQ              (LS2K500_IRQ1_BASE+2)
#define INTC1_PCIE1_IRQ             (LS2K500_IRQ1_BASE+1)
#define INTC1_PCIE0_IRQ             (LS2K500_IRQ1_BASE+0)

#define LS2K500_IRQ_COUNT           (LS2K500_IRQ1_BASE+32)      // 传统中断总数

#else   /* 使用扩展中断 */

/**************************************************************************************************
 * 使用系统扩展断模式, 共支持128个中断
 **************************************************************************************************/

#define LS2K500_EXTIRQ0_BASE        (LA_INTERRUPT_BASE+16)      // 80

#define EXTINTC0_NAND_IRQ           (LS2K500_EXTIRQ0_BASE+31)
#define EXTINTC0_HPET3_IRQ          (LS2K500_EXTIRQ0_BASE+30)
#define EXTINTC0_HPET2_IRQ          (LS2K500_EXTIRQ0_BASE+29)
#define EXTINTC0_HPET1_IRQ          (LS2K500_EXTIRQ0_BASE+28)
#define EXTINTC0_HPET0_IRQ          (LS2K500_EXTIRQ0_BASE+27)
#define EXTINTC0_SPI5_IRQ           (LS2K500_EXTIRQ0_BASE+26)
#define EXTINTC0_SPI4_IRQ           (LS2K500_EXTIRQ0_BASE+25)
#define EXTINTC0_SPI3_IRQ           (LS2K500_EXTIRQ0_BASE+24)
#define EXTINTC0_SPI2_IRQ           (LS2K500_EXTIRQ0_BASE+23)
#define EXTINTC0_MOUSE_IRQ          (LS2K500_EXTIRQ0_BASE+22)
#define EXTINTC0_KEYBOARD_IRQ       (LS2K500_EXTIRQ0_BASE+21)
#define EXTINTC0_AC97_IRQ           (LS2K500_EXTIRQ0_BASE+20)
#define EXTINTC0_I2C5_IRQ           (LS2K500_EXTIRQ0_BASE+19)
#define EXTINTC0_I2C4_IRQ           (LS2K500_EXTIRQ0_BASE+18)
#define EXTINTC0_I2C3_IRQ           (LS2K500_EXTIRQ0_BASE+17)
#define EXTINTC0_I2C2_IRQ           (LS2K500_EXTIRQ0_BASE+16)
#define EXTINTC0_I2C1_IRQ           (LS2K500_EXTIRQ0_BASE+15)
#define EXTINTC0_I2C0_IRQ           (LS2K500_EXTIRQ0_BASE+14)
#define EXTINTC0_CAN3_IRQ           (LS2K500_EXTIRQ0_BASE+13)
#define EXTINTC0_CAN2_IRQ           (LS2K500_EXTIRQ0_BASE+12)
#define EXTINTC0_CAN1_IRQ           (LS2K500_EXTIRQ0_BASE+11)
#define EXTINTC0_CAN0_IRQ           (LS2K500_EXTIRQ0_BASE+10)
#define EXTINTC0_UART9_IRQ          (LS2K500_EXTIRQ0_BASE+9)
#define EXTINTC0_UART8_IRQ          (LS2K500_EXTIRQ0_BASE+8)
#define EXTINTC0_UART7_IRQ          (LS2K500_EXTIRQ0_BASE+7)
#define EXTINTC0_UART6_IRQ          (LS2K500_EXTIRQ0_BASE+6)
#define EXTINTC0_UART5_IRQ          (LS2K500_EXTIRQ0_BASE+5)
#define EXTINTC0_UART4_IRQ          (LS2K500_EXTIRQ0_BASE+4)
#define EXTINTC0_UART3_IRQ          (LS2K500_EXTIRQ0_BASE+3)
#define EXTINTC0_UART2_IRQ          (LS2K500_EXTIRQ0_BASE+2)
#define EXTINTC0_UART1_IRQ          (LS2K500_EXTIRQ0_BASE+1)
#define EXTINTC0_UART0_IRQ          (LS2K500_EXTIRQ0_BASE+0)

#define LS2K500_EXTIRQ1_BASE        (LS2K500_EXTIRQ0_BASE+32)   // 112

#define EXTINTC1_LS132_IRQ          (LS2K500_EXTIRQ1_BASE+27)
#define EXTINTC1_SDIO1_IRQ          (LS2K500_EXTIRQ1_BASE+26)
#define EXTINTC1_SDIO0_IRQ          (LS2K500_EXTIRQ1_BASE+25)
#define EXTINTC1_ACPI_IRQ           (LS2K500_EXTIRQ1_BASE+24)
#define EXTINTC1_PWM15_IRQ          (LS2K500_EXTIRQ1_BASE+23)
#define EXTINTC1_PWM14_IRQ          (LS2K500_EXTIRQ1_BASE+22)
#define EXTINTC1_PWM13_IRQ          (LS2K500_EXTIRQ1_BASE+21)
#define EXTINTC1_PWM12_IRQ          (LS2K500_EXTIRQ1_BASE+20)
#define EXTINTC1_PWM11_IRQ          (LS2K500_EXTIRQ1_BASE+19)
#define EXTINTC1_PWM10_IRQ          (LS2K500_EXTIRQ1_BASE+18)
#define EXTINTC1_PWM9_IRQ           (LS2K500_EXTIRQ1_BASE+17)
#define EXTINTC1_PWM8_IRQ           (LS2K500_EXTIRQ1_BASE+16)
#define EXTINTC1_PWM7_IRQ           (LS2K500_EXTIRQ1_BASE+15)
#define EXTINTC1_PWM6_IRQ           (LS2K500_EXTIRQ1_BASE+14)
#define EXTINTC1_PWM5_IRQ           (LS2K500_EXTIRQ1_BASE+13)
#define EXTINTC1_PWM4_IRQ           (LS2K500_EXTIRQ1_BASE+12)
#define EXTINTC1_PWM3_IRQ           (LS2K500_EXTIRQ1_BASE+11)
#define EXTINTC1_PWM2_IRQ           (LS2K500_EXTIRQ1_BASE+10)
#define EXTINTC1_PWM1_IRQ           (LS2K500_EXTIRQ1_BASE+9)
#define EXTINTC1_PWM0_IRQ           (LS2K500_EXTIRQ1_BASE+8)
#define EXTINTC1_RTC_TICK_IRQ       (LS2K500_EXTIRQ1_BASE+7)
#define EXTINTC1_RTC2_IRQ           (LS2K500_EXTIRQ1_BASE+6)
#define EXTINTC1_RTC1_IRQ           (LS2K500_EXTIRQ1_BASE+5)
#define EXTINTC1_RTC0_IRQ           (LS2K500_EXTIRQ1_BASE+4)
#define EXTINTC1_TOY_TICK_IRQ       (LS2K500_EXTIRQ1_BASE+3)
#define EXTINTC1_TOY2_IRQ           (LS2K500_EXTIRQ1_BASE+2)
#define EXTINTC1_TOY1_IRQ           (LS2K500_EXTIRQ1_BASE+1)
#define EXTINTC1_TOY0_IRQ           (LS2K500_EXTIRQ1_BASE+0)

#define LS2K500_EXTIRQ2_BASE        (LS2K500_EXTIRQ1_BASE+32)   // 144

#define EXTINTC2_GPIO32_34_IRQ      (LS2K500_EXTIRQ2_BASE+31)
#define EXTINTC2_GPIO28_30_IRQ      (LS2K500_EXTIRQ2_BASE+30)
#define EXTINTC2_GPIO24_26_IRQ      (LS2K500_EXTIRQ2_BASE+29)
#define EXTINTC2_GPIO20_22_IRQ      (LS2K500_EXTIRQ2_BASE+28)
#define EXTINTC2_GPIO16_18_IRQ      (LS2K500_EXTIRQ2_BASE+27)
#define EXTINTC2_GPIO12_14_IRQ      (LS2K500_EXTIRQ2_BASE+26)
#define EXTINTC2_GPIO8_10_IRQ       (LS2K500_EXTIRQ2_BASE+25)
#define EXTINTC2_GPIO4_6_IRQ        (LS2K500_EXTIRQ2_BASE+24)
#define EXTINTC2_GPIO0_2_IRQ        (LS2K500_EXTIRQ2_BASE+23)
#define EXTINTC2_THSENS_IRQ         (LS2K500_EXTIRQ2_BASE+22)
#define EXTINTC2_HDA_IRQ            (LS2K500_EXTIRQ2_BASE+21)
#define EXTINTC2_PRINTE_IRQ         (LS2K500_EXTIRQ2_BASE+20)
#define EXTINTC2_PRINTS_IRQ         (LS2K500_EXTIRQ2_BASE+19)
#define EXTINTC2_PCIE1_IRQ          (LS2K500_EXTIRQ2_BASE+18)
#define EXTINTC2_PCIE0_IRQ          (LS2K500_EXTIRQ2_BASE+17)
#define EXTINTC2_DC_IRQ             (LS2K500_EXTIRQ2_BASE+16)
#define EXTINTC2_SATA_PME1_IRQ      (LS2K500_EXTIRQ2_BASE+15)
#define EXTINTC2_SATA_PME0_IRQ      (LS2K500_EXTIRQ2_BASE+14)
#define EXTINTC2_GPU_IRQ            (LS2K500_EXTIRQ2_BASE+13)
#define EXTINTC2_SATA1_IRQ          (LS2K500_EXTIRQ2_BASE+12)
#define EXTINTC2_SATA0_IRQ          (LS2K500_EXTIRQ2_BASE+11)
#define EXTINTC2_USB3_IRQ           (LS2K500_EXTIRQ2_BASE+10)
#define EXTINTC2_OTG_IRQ            (LS2K500_EXTIRQ2_BASE+9)
#define EXTINTC2_OHCI_IRQ           (LS2K500_EXTIRQ2_BASE+8)
#define EXTINTC2_EHCI_IRQ           (LS2K500_EXTIRQ2_BASE+7)
#define EXTINTC2_DMA3_IRQ           (LS2K500_EXTIRQ2_BASE+6)
#define EXTINTC2_DMA2_IRQ           (LS2K500_EXTIRQ2_BASE+5)
#define EXTINTC2_DMA1_IRQ           (LS2K500_EXTIRQ2_BASE+4)
#define EXTINTC2_DMA0_IRQ           (LS2K500_EXTIRQ2_BASE+3)
#define EXTINTC2_LPC_IRQ            (LS2K500_EXTIRQ2_BASE+2)
#define EXTINTC2_SPI1_IRQ           (LS2K500_EXTIRQ2_BASE+1)
#define EXTINTC2_SPI0_IRQ           (LS2K500_EXTIRQ2_BASE+0)

#define LS2K500_EXTIRQ3_BASE        (LS2K500_EXTIRQ2_BASE+32)   // 176

#define EXTINTC3_GMAC1_IRQ          (LS2K500_EXTIRQ3_BASE+23)
#define EXTINTC3_GMAC0_IRQ          (LS2K500_EXTIRQ3_BASE+22)
#define EXTINTC3_GPIO120_122_IRQ    (LS2K500_EXTIRQ3_BASE+21)
#define EXTINTC3_GPIO116_118_IRQ    (LS2K500_EXTIRQ3_BASE+20)
#define EXTINTC3_GPIO112_114_IRQ    (LS2K500_EXTIRQ3_BASE+19)
#define EXTINTC3_GPIO108_110_IRQ    (LS2K500_EXTIRQ3_BASE+18)
#define EXTINTC3_GPIO104_106_IRQ    (LS2K500_EXTIRQ3_BASE+17)
#define EXTINTC3_GPIO100_102_IRQ    (LS2K500_EXTIRQ3_BASE+16)
#define EXTINTC3_GPIO96_98_IRQ      (LS2K500_EXTIRQ3_BASE+15)
#define EXTINTC3_GPIO92_94_IRQ      (LS2K500_EXTIRQ3_BASE+14)
#define EXTINTC3_GPIO88_90_IRQ      (LS2K500_EXTIRQ3_BASE+13)
#define EXTINTC3_GPIO84_86_IRQ      (LS2K500_EXTIRQ3_BASE+12)
#define EXTINTC3_GPIO80_82_IRQ      (LS2K500_EXTIRQ3_BASE+11)
#define EXTINTC3_GPIO76_78_IRQ      (LS2K500_EXTIRQ3_BASE+10)
#define EXTINTC3_GPIO72_74_IRQ      (LS2K500_EXTIRQ3_BASE+9)
#define EXTINTC3_GPIO68_70_IRQ      (LS2K500_EXTIRQ3_BASE+8)
#define EXTINTC3_GPIO64_66_IRQ      (LS2K500_EXTIRQ3_BASE+7)
#define EXTINTC3_GPIO60_62_IRQ      (LS2K500_EXTIRQ3_BASE+6)
#define EXTINTC3_GPIO56_58_IRQ      (LS2K500_EXTIRQ3_BASE+5)
#define EXTINTC3_GPIO52_54_IRQ      (LS2K500_EXTIRQ3_BASE+4)
#define EXTINTC3_GPIO48_50_IRQ      (LS2K500_EXTIRQ3_BASE+3)
#define EXTINTC3_GPIO44_46_IRQ      (LS2K500_EXTIRQ3_BASE+2)
#define EXTINTC3_GPIO40_42_IRQ      (LS2K500_EXTIRQ3_BASE+1)
#define EXTINTC3_GPIO36_38_IRQ      (LS2K500_EXTIRQ3_BASE+0)

#define LS2K500_EXTIRQ_COUNT        (LS2K500_EXTIRQ3_BASE+24)      // 扩展中断总数

#endif // #if (!USE_EXTINT)

#endif // _LS2K500_IRQ_H

/*
 * @@ END
 */
 
