LPCOpen Platform for LPC18XX/43XX microcontrollers  18XX43XX
LPCOpen Platform for the NXP LPC18XX/43XX family of Microcontrollers
pinint_18xx_43xx.h
Go to the documentation of this file.
1 /*
2  * @brief LPC18xx/43xx Pin Interrupt and Pattern Match Registers and driver
3  *
4  * @note
5  * Copyright(C) NXP Semiconductors, 2013
6  * All rights reserved.
7  *
8  * @par
9  * Software that is described herein is for illustrative purposes only
10  * which provides customers with programming information regarding the
11  * LPC products. This software is supplied "AS IS" without any warranties of
12  * any kind, and NXP Semiconductors and its licensor disclaim any and
13  * all warranties, express or implied, including all implied warranties of
14  * merchantability, fitness for a particular purpose and non-infringement of
15  * intellectual property rights. NXP Semiconductors assumes no responsibility
16  * or liability for the use of the software, conveys no license or rights under any
17  * patent, copyright, mask work right, or any other intellectual property rights in
18  * or to any products. NXP Semiconductors reserves the right to make changes
19  * in the software without notification. NXP Semiconductors also makes no
20  * representation or warranty that such application will be suitable for the
21  * specified use without further testing or modification.
22  *
23  * @par
24  * Permission to use, copy, modify, and distribute this software and its
25  * documentation is hereby granted, under NXP Semiconductors' and its
26  * licensor's relevant copyrights in the software, without fee, provided that it
27  * is used in conjunction with NXP Semiconductors microcontrollers. This
28  * copyright, permission, and disclaimer notice must appear in all copies of
29  * this code.
30  */
31 
32 #ifndef __PININT_18XX_43XX_H_
33 #define __PININT_18XX_43XX_H_
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
47 typedef struct {
48  __IO uint32_t ISEL;
49  __IO uint32_t IENR;
50  __IO uint32_t SIENR;
51  __IO uint32_t CIENR;
52  __IO uint32_t IENF;
53  __IO uint32_t SIENF;
54  __IO uint32_t CIENF;
55  __IO uint32_t RISE;
56  __IO uint32_t FALL;
57  __IO uint32_t IST;
59 
60 
64 #define PININTCH0 (1 << 0)
65 #define PININTCH1 (1 << 1)
66 #define PININTCH2 (1 << 2)
67 #define PININTCH3 (1 << 3)
68 #define PININTCH4 (1 << 4)
69 #define PININTCH5 (1 << 5)
70 #define PININTCH6 (1 << 6)
71 #define PININTCH7 (1 << 7)
72 #define PININTCH(ch) (1 << (ch))
73 
81 
88 
96 {
97  pPININT->ISEL &= ~pins;
98 }
99 
107 {
108  pPININT->ISEL |= pins;
109 }
110 
120 {
121  return pPININT->IENR;
122 }
123 
131 {
132  pPININT->SIENR = pins;
133 }
134 
142 {
143  pPININT->CIENR = pins;
144 }
145 
155 {
156  return pPININT->IENF;
157 }
158 
166 {
167  pPININT->SIENF = pins;
168 }
169 
177 {
178  pPININT->CIENF = pins;
179 }
180 
187 {
188  return pPININT->RISE;
189 }
190 
198 {
199  pPININT->RISE = pins;
200 }
201 
208 {
209  return pPININT->FALL;
210 }
211 
219 {
220  pPININT->FALL = pins;
221 }
222 
229 {
230  return pPININT->IST;
231 }
232 
240 {
241  pPININT->IST = pins;
242 }
243 
248 #ifdef __cplusplus
249 }
250 #endif
251 
252 #endif /* __PININT_18XX_43XX_H_ */