From 358612c8a2fc7c178a8e3086128e6943b77e1979 Mon Sep 17 00:00:00 2001 From: 勤为本 <1207280597@qq.com> Date: Thu, 20 Jul 2017 17:35:03 +0800 Subject: 支æŒ�GPIO中断(外部中断) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libcpu/mips/loongson_1c/ls1c.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libcpu') diff --git a/libcpu/mips/loongson_1c/ls1c.h b/libcpu/mips/loongson_1c/ls1c.h index c47b9a42bb..a203810c37 100644 --- a/libcpu/mips/loongson_1c/ls1c.h +++ b/libcpu/mips/loongson_1c/ls1c.h @@ -77,6 +77,11 @@ #define LS1C_NR_IRQS (32*5) +// GPIO±àºÅºÍÖжϺÅÖ®¼äµÄ»¥Ïàת»» +#define LS1C_GPIO_TO_IRQ(GPIOn) (LS1C_GPIO_FIRST_IRQ + (GPIOn)) +#define LS1C_IRQ_TO_GPIO(IRQn) ((IRQn) - LS1C_GPIO_FIRST_IRQ) + + struct ls1c_intc_regs { volatile unsigned int int_isr; -- cgit v1.3.1