|
@@ -271,7 +271,7 @@ static void rt_hw_gpio_isr(int irqno, void *param)
|
|
|
rt_uint32_t pending, mask;
|
|
|
|
|
|
mask = 0;
|
|
|
- port = (irqno == SYS_GPIO_IRQ_BASE ? 4 : (irqno - GPIO_IRQ_BASE));
|
|
|
+ port = (irqno == BSP_SYS_GPIO_IRQ_BASE ? 4 : (irqno - BSP_GPIO_IRQ_BASE));
|
|
|
|
|
|
base_addr = (port == 4 ? dwapb_gpio_base_e : (dwapb_gpio_base + DWAPB_GPIO_SIZE * port));
|
|
|
pending = dwapb_read32(base_addr + GPIO_INTSTATUS);
|
|
@@ -306,16 +306,16 @@ int rt_hw_gpio_init(void)
|
|
|
rt_device_pin_register("gpio", &_dwapb_ops, RT_NULL);
|
|
|
|
|
|
#define INT_INSTALL_GPIO_DEVICE(no) \
|
|
|
- rt_hw_interrupt_install(GPIO_IRQ_BASE + (no), rt_hw_gpio_isr, RT_NULL, "gpio"); \
|
|
|
- rt_hw_interrupt_umask(GPIO_IRQ_BASE + (no));
|
|
|
+ rt_hw_interrupt_install(BSP_GPIO_IRQ_BASE + (no), rt_hw_gpio_isr, RT_NULL, "gpio"); \
|
|
|
+ rt_hw_interrupt_umask(BSP_GPIO_IRQ_BASE + (no));
|
|
|
|
|
|
INT_INSTALL_GPIO_DEVICE(0);
|
|
|
INT_INSTALL_GPIO_DEVICE(1);
|
|
|
INT_INSTALL_GPIO_DEVICE(2);
|
|
|
INT_INSTALL_GPIO_DEVICE(3);
|
|
|
|
|
|
- rt_hw_interrupt_install(SYS_GPIO_IRQ_BASE, rt_hw_gpio_isr, RT_NULL, "gpio");
|
|
|
- rt_hw_interrupt_umask(SYS_GPIO_IRQ_BASE);
|
|
|
+ rt_hw_interrupt_install(BSP_SYS_GPIO_IRQ_BASE, rt_hw_gpio_isr, RT_NULL, "gpio");
|
|
|
+ rt_hw_interrupt_umask(BSP_SYS_GPIO_IRQ_BASE);
|
|
|
return 0;
|
|
|
}
|
|
|
INIT_DEVICE_EXPORT(rt_hw_gpio_init);
|