2 * @brief GPIO Interrupt Registers and control functions
\r
5 * Copyright(C) NXP Semiconductors, 2012
\r
6 * All rights reserved.
\r
9 * Software that is described herein is for illustrative purposes only
\r
10 * which provides customers with programming information regarding the
\r
11 * LPC products. This software is supplied "AS IS" without any warranties of
\r
12 * any kind, and NXP Semiconductors and its licensor disclaim any and
\r
13 * all warranties, express or implied, including all implied warranties of
\r
14 * merchantability, fitness for a particular purpose and non-infringement of
\r
15 * intellectual property rights. NXP Semiconductors assumes no responsibility
\r
16 * or liability for the use of the software, conveys no license or rights under any
\r
17 * patent, copyright, mask work right, or any other intellectual property rights in
\r
18 * or to any products. NXP Semiconductors reserves the right to make changes
\r
19 * in the software without notification. NXP Semiconductors also makes no
\r
20 * representation or warranty that such application will be suitable for the
\r
21 * specified use without further testing or modification.
\r
24 * Permission to use, copy, modify, and distribute this software and its
\r
25 * documentation is hereby granted, under NXP Semiconductors' and its
\r
26 * licensor's relevant copyrights in the software, without fee, provided that it
\r
27 * is used in conjunction with NXP Semiconductors microcontrollers. This
\r
28 * copyright, permission, and disclaimer notice must appear in all copies of
\r
32 #ifndef __GPIOINT_001_H_
\r
33 #define __GPIOINT_001_H_
\r
35 #include "sys_config.h"
\r
42 /** @defgroup IP_GPIOINT_001 IP: GPIO Interrupt register block and driver
\r
43 * @ingroup IP_Drivers
\r
48 * @brief GPIO Interrupt register block structure
\r
51 __I uint32_t Status; /*!< GPIO overall Interrupt Status Register */
\r
52 __I uint32_t StatR0; /*!< GPIO Interrupt Status Register 0 for Rising edge */
\r
53 __I uint32_t StatF0; /*!< GPIO Interrupt Status Register 0 for Falling edge */
\r
54 __O uint32_t Clr0; /*!< GPIO Interrupt Clear Register 0 */
\r
55 __IO uint32_t EnR0; /*!< GPIO Interrupt Enable Register 0 for Rising edge */
\r
56 __IO uint32_t EnF0; /*!< GPIO Interrupt Enable Register 0 for Falling edge */
\r
57 uint32_t RESERVED0[3];
\r
58 __I uint32_t StatR2; /*!< GPIO Interrupt Status Register 2 for Rising edge */
\r
59 __I uint32_t StatF2; /*!< GPIO Interrupt Status Register 2 for Falling edge */
\r
60 __O uint32_t Clr2; /*!< GPIO Interrupt Clear Register 2 */
\r
61 __IO uint32_t EnR2; /*!< GPIO Interrupt Enable Register 2 for Rising edge */
\r
62 __IO uint32_t EnF2; /*!< GPIO Interrupt Enable Register 2 for Falling edge */
\r
65 typedef enum IP_GPIOPININT_MODE {
\r
66 GPIOPININT_RISING_EDGE = 0x01,
\r
67 GPIOPININT_FALLING_EDGE = 0x02
\r
68 } IP_GPIOPININT_MODE_T;
\r
71 * @brief Enable GPIO Interrupt
\r
72 * @param pGPIOPININT : Pointer to GPIO interrupt register block
\r
73 * @param PortNum : GPIO port number interrupt, should be: 0 (port 0) or 2 (port 2)
\r
74 * @param BitValue : GPIO Bit value that contains all bits on GPIO to enable, should be 0 to 0xFFFFFFFF
\r
75 * @param IntMode : Interrupt mode, 0 = rising edge, 1 = falling edge
\r
78 void IP_GPIOINT_IntCmd(IP_GPIOINT_001_T *pGPIOPININT, uint8_t PortNum, uint32_t BitValue, IP_GPIOPININT_MODE_T IntMode);
\r
81 * @brief Get GPIO Interrupt Status
\r
82 * @param pGPIOPININT : Pointer to GPIO interrupt register block
\r
83 * @param PortNum : GPIO port number interrupt, should be: 0 (port 0) or 2 (port 2)
\r
84 * @param PinNum : Pin number, should be: 0..30(with port 0) and 0..13 (with port 2)
\r
85 * @param IntMode : Interrupt mode, 0 = rising edge, 1 = falling edge
\r
86 * @return true if interrupt is pending, otherwise false
\r
88 bool IP_GPIOINT_IntGetStatus(IP_GPIOINT_001_T *pGPIOPININT,
\r
91 IP_GPIOPININT_MODE_T IntMode);
\r
94 * @brief Clear GPIO Interrupt (Edge interrupt cases only)
\r
95 * @param pGPIOPININT : Pointer to GPIO interrupt register block
\r
96 * @param PortNum : GPIO port number interrupt, should be: 0 (port 0) or 2 (port 2)
\r
97 * @param BitValue : GPIO Bit value that contains all bits on GPIO to enable, should be 0 to 0xFFFFFFFF
\r
100 void IP_GPIOINT_IntClear(IP_GPIOINT_001_T *pGPIOPININT, uint8_t PortNum, uint32_t BitValue);
\r
110 #endif /* __GPIOINT_001_H_ */
\r