diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-07-06 17:04:08 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-07-06 17:04:08 +0000 |
commit | 95adaa0e8878688d854ceeddfdd47bda9333c4f9 (patch) | |
tree | 423cced4ffbbe2caf6fbd781ef5f5417bea5f4ed /nuttx/arch/arm/src/lpc43xx/lpc43_gpioint.h | |
parent | e82fa8182eef943a9a85d1f5d39a6917eda6d13a (diff) | |
download | px4-nuttx-95adaa0e8878688d854ceeddfdd47bda9333c4f9.tar.gz px4-nuttx-95adaa0e8878688d854ceeddfdd47bda9333c4f9.tar.bz2 px4-nuttx-95adaa0e8878688d854ceeddfdd47bda9333c4f9.zip |
Add LPC43 GPIO interrupt configurtion logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4913 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/lpc43xx/lpc43_gpioint.h')
-rw-r--r-- | nuttx/arch/arm/src/lpc43xx/lpc43_gpioint.h | 63 |
1 files changed, 32 insertions, 31 deletions
diff --git a/nuttx/arch/arm/src/lpc43xx/lpc43_gpioint.h b/nuttx/arch/arm/src/lpc43xx/lpc43_gpioint.h index 1d9b2a826..ef83d147f 100644 --- a/nuttx/arch/arm/src/lpc43xx/lpc43_gpioint.h +++ b/nuttx/arch/arm/src/lpc43xx/lpc43_gpioint.h @@ -78,62 +78,63 @@ * Public Functions ************************************************************************************/ -/************************************************************************************ - * Name: lpc43_gpioint_initialize - * - * Description: - * Initialize logic to interrupting GPIO pins GPIO pins - * - ************************************************************************************/ - -EXTERN void lpc43_gpioint_initialize(void); - /**************************************************************************** - * Name: lpc43_gpioint_config + * Name: lpc43_gpioint_grpinitialize * * Description: - * Configure a GPIO pin as an interrupt source (after it has been - * configured as an input). + * Initialize the properties of a GPIO group. The properties of the group + * should be configured before any pins are added to the group by + * lpc32_gpioint_grpconfig(). As side effects, this call also removes + * all pins from the group and disables the group interrupt. On return, + * this is a properly configured, empty GPIO interrupt group. * * Returned Value: - * None + * Zero on success; a negated errno value on failure. + * + * Assumptions: + * Interrupts are disabled so that read-modify-write operations are safe. * ****************************************************************************/ -EXTERN int lpc43_gpioint_config(uint16_t gpiocfg); +EXTERN int lpc43_gpioint_grpinitialize(int group, bool anded, bool level); /**************************************************************************** - * Name: lpc43_gpiointconfig + * Name: lpc43_gpioint_pinconfig * * Description: - * Un-configure a GPIO pin as an interrupt source. + * Configure a GPIO pin as an GPIO pin interrupt source (after it has been + * configured as an input). This function should *not* be called directly + * from user application code; user code should call this function only + * indirectly through lpc32_gpio_config(). * * Returned Value: * Zero on success; a negated errno value on failure. * + * Assumptions: + * Interrupts are disabled so that read-modify-write operations are safe. + * ****************************************************************************/ -EXTERN int lpc43_gpioint_unconfig(uint16_t gpiocfg); +EXTERN int lpc43_gpioint_pinconfig(uint16_t gpiocfg); -/************************************************************************************ - * Name: lpc43_gpioint_enable +/**************************************************************************** + * Name: lpc43_gpioint_grpconfig * * Description: - * Zero on success; a negated errno value on failure. + * Configure a GPIO pin as an GPIO group interrupt member (after it has been + * configured as an input). This function should *not* be called directly + * from user application code; user code should call this function only + * indirectly through lpc32_gpio_config(). * - ************************************************************************************/ - -EXTERN int lpc43_gpioint_enable(int irq); - -/************************************************************************************ - * Name: lpc43_gpioint_disable + * Returned Value: + * Zero on success; a negated errno value on failure. * - * Description: - * Disable the interrupt for specified GPIO IRQ + * Assumptions: + * Interrupts are disabled so that read-modify-write operations are safe. * - ************************************************************************************/ + ****************************************************************************/ -EXTERN void lpc43_gpioint_disable(int irq); +EXTERN int lpc43_gpioint_grpconfig(uint16_t gpiocfg); #endif /* CONFIG_GPIO_IRQ */ #endif /* __ARCH_ARM_SRC_LPC43XX_LPC43_GPIOINT_H */ |