mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
Rename LP17xx version of CONFIG_GPIO_IRQ to CONFIG_LPC17_GPIOIRQ
This commit is contained in:
@@ -147,7 +147,7 @@
|
||||
* 42
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
#ifdef CONFIG_LPC17_GPIOIRQ
|
||||
# define LPC17_VALID_GPIOINT0 (0x7fff8ffful) /* GPIO port 0 interrupt set */
|
||||
# define LPC17_VALID_GPIOINT2 (0x00003ffful) /* GPIO port 2 interrupt set */
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
* 42
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
#ifdef CONFIG_LPC17_GPIOIRQ
|
||||
# define LPC17_VALID_GPIOINT0 (0xfffffffful) /* GPIO port 0 interrupt set */
|
||||
# define LPC17_VALID_GPIOINT2 (0xfffffffful) /* GPIO port 2 interrupt set */
|
||||
|
||||
|
||||
@@ -604,7 +604,7 @@ config LPC17_CAN_REGDEBUG
|
||||
|
||||
endmenu
|
||||
|
||||
config GPIO_IRQ
|
||||
config LPC17_GPIOIRQ
|
||||
bool "GPIO interrupt support"
|
||||
default n
|
||||
---help---
|
||||
|
||||
@@ -133,7 +133,7 @@ ifeq ($(CONFIG_LPC17_EMC),y)
|
||||
CHIP_CSRCS += lpc17_emc.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_GPIO_IRQ),y)
|
||||
ifeq ($(CONFIG_LPC17_GPIOIRQ),y)
|
||||
CHIP_CSRCS += lpc17_gpioint.c
|
||||
endif
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
* actually set up to interrupt until the interrupt is enabled.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
#ifdef CONFIG_LPC17_GPIOIRQ
|
||||
uint64_t g_intedge0;
|
||||
uint64_t g_intedge2;
|
||||
#endif
|
||||
@@ -300,7 +300,7 @@ static int lpc17_pullup(lpc17_pinset_t cfgset, unsigned int port,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
#ifdef CONFIG_LPC17_GPIOIRQ
|
||||
static void lpc17_setintedge(unsigned int port, unsigned int pin,
|
||||
unsigned int value)
|
||||
{
|
||||
@@ -328,7 +328,7 @@ static void lpc17_setintedge(unsigned int port, unsigned int pin,
|
||||
*intedge &= ~((uint64_t)3 << shift);
|
||||
*intedge |= ((uint64_t)value << shift);
|
||||
}
|
||||
#endif /* CONFIG_GPIO_IRQ */
|
||||
#endif /* CONFIG_LPC17_GPIOIRQ */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc17_setopendrain
|
||||
@@ -412,7 +412,7 @@ static inline int lpc17_configinput(lpc17_pinset_t cfgset, unsigned int port, un
|
||||
|
||||
/* Forget about any falling/rising edge interrupt enabled */
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
#ifdef CONFIG_LPC17_GPIOIRQ
|
||||
lpc17_setintedge(port, pin, 0);
|
||||
#endif
|
||||
}
|
||||
@@ -453,7 +453,7 @@ static inline int lpc17_configinterrupt(lpc17_pinset_t cfgset, unsigned int port
|
||||
/* Then just remember the rising/falling edge interrupt enabled */
|
||||
|
||||
DEBUGASSERT(port == 0 || port == 2);
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
#ifdef CONFIG_LPC17_GPIOIRQ
|
||||
lpc17_setintedge(port, pin, (cfgset & GPIO_EDGE_MASK) >> GPIO_EDGE_SHIFT);
|
||||
#endif
|
||||
return OK;
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
* actually set up to interrupt until the interrupt is enabled.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
#ifdef CONFIG_LPC17_GPIOIRQ
|
||||
uint64_t g_intedge0;
|
||||
uint64_t g_intedge2;
|
||||
#endif
|
||||
@@ -526,7 +526,7 @@ static void lpc17_setpullup(lpc17_pinset_t cfgset, unsigned int port,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
#ifdef CONFIG_LPC17_GPIOIRQ
|
||||
static void lpc17_setintedge(unsigned int port, unsigned int pin,
|
||||
unsigned int value)
|
||||
{
|
||||
@@ -554,7 +554,7 @@ static void lpc17_setintedge(unsigned int port, unsigned int pin,
|
||||
*intedge &= ~((uint64_t)3 << shift);
|
||||
*intedge |= ((uint64_t)value << shift);
|
||||
}
|
||||
#endif /* CONFIG_GPIO_IRQ */
|
||||
#endif /* CONFIG_LPC17_GPIOIRQ */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc17_configinput
|
||||
@@ -601,7 +601,7 @@ static inline int lpc17_configinput(lpc17_pinset_t cfgset, unsigned int port,
|
||||
|
||||
/* Forget about any falling/rising edge interrupt enabled */
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
#ifdef CONFIG_LPC17_GPIOIRQ
|
||||
lpc17_setintedge(port, pin, 0);
|
||||
#endif
|
||||
}
|
||||
@@ -656,7 +656,7 @@ static inline int lpc17_configinterrupt(lpc17_pinset_t cfgset, unsigned int port
|
||||
/* Then just remember the rising/falling edge interrupt enabled */
|
||||
|
||||
DEBUGASSERT(port == 0 || port == 2);
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
#ifdef CONFIG_LPC17_GPIOIRQ
|
||||
lpc17_setintedge(port, pin, (cfgset & GPIO_EDGE_MASK) >> GPIO_EDGE_SHIFT);
|
||||
#endif
|
||||
return OK;
|
||||
|
||||
@@ -89,7 +89,7 @@ extern "C"
|
||||
* lpc17_gpioint.c, and lpc17_gpiodbg.c
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
#ifdef CONFIG_LPC17_GPIOIRQ
|
||||
EXTERN uint64_t g_intedge0;
|
||||
EXTERN uint64_t g_intedge2;
|
||||
#endif
|
||||
@@ -109,7 +109,7 @@ EXTERN const uint32_t g_intbase[GPIO_NPORTS];
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
#ifdef CONFIG_LPC17_GPIOIRQ
|
||||
void lpc17_gpioirqinitialize(void);
|
||||
#else
|
||||
# define lpc17_gpioirqinitialize()
|
||||
@@ -153,7 +153,7 @@ bool lpc17_gpioread(lpc17_pinset_t pinset);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
#ifdef CONFIG_LPC17_GPIOIRQ
|
||||
void lpc17_gpioirqenable(int irq);
|
||||
#else
|
||||
# define lpc17_gpioirqenable(irq)
|
||||
@@ -167,7 +167,7 @@ void lpc17_gpioirqenable(int irq);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
#ifdef CONFIG_LPC17_GPIOIRQ
|
||||
void lpc17_gpioirqdisable(int irq);
|
||||
#else
|
||||
# define lpc17_gpioirqdisable(irq)
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#include "chip.h"
|
||||
#include "lpc17_gpio.h"
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
#ifdef CONFIG_LPC17_GPIOIRQ
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@@ -543,4 +543,4 @@ void lpc17_gpioirqdisable(int irq)
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CONFIG_GPIO_IRQ */
|
||||
#endif /* CONFIG_LPC17_GPIOIRQ */
|
||||
|
||||
@@ -412,7 +412,7 @@ void up_irqinitialize(void)
|
||||
* GPIO pins.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
#ifdef CONFIG_LPC17_GPIOIRQ
|
||||
lpc17_gpioirqinitialize();
|
||||
#endif
|
||||
|
||||
@@ -456,7 +456,7 @@ void up_disable_irq(int irq)
|
||||
putreg32(regval, regaddr);
|
||||
}
|
||||
}
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
#ifdef CONFIG_LPC17_GPIOIRQ
|
||||
else if (irq >= LPC17_VALID_FIRST0L)
|
||||
{
|
||||
/* Maybe it is a (derived) GPIO IRQ */
|
||||
@@ -501,7 +501,7 @@ void up_enable_irq(int irq)
|
||||
putreg32(regval, regaddr);
|
||||
}
|
||||
}
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
#ifdef CONFIG_LPC17_GPIOIRQ
|
||||
else if (irq >= LPC17_VALID_FIRST0L)
|
||||
{
|
||||
/* Maybe it is a (derived) GPIO IRQ */
|
||||
|
||||
Reference in New Issue
Block a user