]> git.donarmstrong.com Git - qmk_firmware.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_MCU_K64F/device/device/MK64F12/MK64F12_port.h
Merge commit '1fe4406f374291ab2e86e95a97341fd9c475fcb8'
[qmk_firmware.git] / tmk_core / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_Freescale / TARGET_KPSDK_MCUS / TARGET_MCU_K64F / device / device / MK64F12 / MK64F12_port.h
1 /*
2 ** ###################################################################
3 **     Compilers:           Keil ARM C/C++ Compiler
4 **                          Freescale C/C++ for Embedded ARM
5 **                          GNU C Compiler
6 **                          IAR ANSI C/C++ Compiler for ARM
7 **
8 **     Reference manual:    K64P144M120SF5RM, Rev.2, January 2014
9 **     Version:             rev. 2.5, 2014-02-10
10 **     Build:               b140604
11 **
12 **     Abstract:
13 **         Extension to the CMSIS register access layer header.
14 **
15 **     Copyright (c) 2014 Freescale Semiconductor, Inc.
16 **     All rights reserved.
17 **
18 **     Redistribution and use in source and binary forms, with or without modification,
19 **     are permitted provided that the following conditions are met:
20 **
21 **     o Redistributions of source code must retain the above copyright notice, this list
22 **       of conditions and the following disclaimer.
23 **
24 **     o Redistributions in binary form must reproduce the above copyright notice, this
25 **       list of conditions and the following disclaimer in the documentation and/or
26 **       other materials provided with the distribution.
27 **
28 **     o Neither the name of Freescale Semiconductor, Inc. nor the names of its
29 **       contributors may be used to endorse or promote products derived from this
30 **       software without specific prior written permission.
31 **
32 **     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
33 **     ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
34 **     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
35 **     DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
36 **     ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
37 **     (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
38 **     LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
39 **     ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
40 **     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
41 **     SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 **
43 **     http:                 www.freescale.com
44 **     mail:                 support@freescale.com
45 **
46 **     Revisions:
47 **     - rev. 1.0 (2013-08-12)
48 **         Initial version.
49 **     - rev. 2.0 (2013-10-29)
50 **         Register accessor macros added to the memory map.
51 **         Symbols for Processor Expert memory map compatibility added to the memory map.
52 **         Startup file for gcc has been updated according to CMSIS 3.2.
53 **         System initialization updated.
54 **         MCG - registers updated.
55 **         PORTA, PORTB, PORTC, PORTE - registers for digital filter removed.
56 **     - rev. 2.1 (2013-10-30)
57 **         Definition of BITBAND macros updated to support peripherals with 32-bit acces disabled.
58 **     - rev. 2.2 (2013-12-09)
59 **         DMA - EARS register removed.
60 **         AIPS0, AIPS1 - MPRA register updated.
61 **     - rev. 2.3 (2014-01-24)
62 **         Update according to reference manual rev. 2
63 **         ENET, MCG, MCM, SIM, USB - registers updated
64 **     - rev. 2.4 (2014-02-10)
65 **         The declaration of clock configurations has been moved to separate header file system_MK64F12.h
66 **         Update of SystemInit() and SystemCoreClockUpdate() functions.
67 **     - rev. 2.5 (2014-02-10)
68 **         The declaration of clock configurations has been moved to separate header file system_MK64F12.h
69 **         Update of SystemInit() and SystemCoreClockUpdate() functions.
70 **         Module access macro module_BASES replaced by module_BASE_PTRS.
71 **
72 ** ###################################################################
73 */
74
75 /*
76  * WARNING! DO NOT EDIT THIS FILE DIRECTLY!
77  *
78  * This file was generated automatically and any changes may be lost.
79  */
80 #ifndef __HW_PORT_REGISTERS_H__
81 #define __HW_PORT_REGISTERS_H__
82
83 #include "MK64F12.h"
84 #include "fsl_bitaccess.h"
85
86 /*
87  * MK64F12 PORT
88  *
89  * Pin Control and Interrupts
90  *
91  * Registers defined in this header file:
92  * - HW_PORT_PCRn - Pin Control Register n
93  * - HW_PORT_GPCLR - Global Pin Control Low Register
94  * - HW_PORT_GPCHR - Global Pin Control High Register
95  * - HW_PORT_ISFR - Interrupt Status Flag Register
96  * - HW_PORT_DFER - Digital Filter Enable Register
97  * - HW_PORT_DFCR - Digital Filter Clock Register
98  * - HW_PORT_DFWR - Digital Filter Width Register
99  *
100  * - hw_port_t - Struct containing all module registers.
101  */
102
103 #define HW_PORT_INSTANCE_COUNT (5U) /*!< Number of instances of the PORT module. */
104 #define HW_PORTA (0U) /*!< Instance number for PORTA. */
105 #define HW_PORTB (1U) /*!< Instance number for PORTB. */
106 #define HW_PORTC (2U) /*!< Instance number for PORTC. */
107 #define HW_PORTD (3U) /*!< Instance number for PORTD. */
108 #define HW_PORTE (4U) /*!< Instance number for PORTE. */
109
110 /*******************************************************************************
111  * HW_PORT_PCRn - Pin Control Register n
112  ******************************************************************************/
113
114 /*!
115  * @brief HW_PORT_PCRn - Pin Control Register n (RW)
116  *
117  * Reset value: 0x00000742U
118  *
119  * See the Signal Multiplexing and Pin Assignment chapter for the reset value of
120  * this device. See the GPIO Configuration section for details on the available
121  * functions for each pin. Do not modify pin configuration registers associated
122  * with pins not available in your selected package. All unbonded pins not
123  * available in your package will default to DISABLE state for lowest power consumption.
124  */
125 typedef union _hw_port_pcrn
126 {
127     uint32_t U;
128     struct _hw_port_pcrn_bitfields
129     {
130         uint32_t PS : 1;               /*!< [0] Pull Select */
131         uint32_t PE : 1;               /*!< [1] Pull Enable */
132         uint32_t SRE : 1;              /*!< [2] Slew Rate Enable */
133         uint32_t RESERVED0 : 1;        /*!< [3]  */
134         uint32_t PFE : 1;              /*!< [4] Passive Filter Enable */
135         uint32_t ODE : 1;              /*!< [5] Open Drain Enable */
136         uint32_t DSE : 1;              /*!< [6] Drive Strength Enable */
137         uint32_t RESERVED1 : 1;        /*!< [7]  */
138         uint32_t MUX : 3;              /*!< [10:8] Pin Mux Control */
139         uint32_t RESERVED2 : 4;        /*!< [14:11]  */
140         uint32_t LK : 1;               /*!< [15] Lock Register */
141         uint32_t IRQC : 4;             /*!< [19:16] Interrupt Configuration */
142         uint32_t RESERVED3 : 4;        /*!< [23:20]  */
143         uint32_t ISF : 1;              /*!< [24] Interrupt Status Flag */
144         uint32_t RESERVED4 : 7;        /*!< [31:25]  */
145     } B;
146 } hw_port_pcrn_t;
147
148 /*!
149  * @name Constants and macros for entire PORT_PCRn register
150  */
151 /*@{*/
152 #define HW_PORT_PCRn_COUNT (32U)
153
154 #define HW_PORT_PCRn_ADDR(x, n)  ((x) + 0x0U + (0x4U * (n)))
155
156 #define HW_PORT_PCRn(x, n)       (*(__IO hw_port_pcrn_t *) HW_PORT_PCRn_ADDR(x, n))
157 #define HW_PORT_PCRn_RD(x, n)    (HW_PORT_PCRn(x, n).U)
158 #define HW_PORT_PCRn_WR(x, n, v) (HW_PORT_PCRn(x, n).U = (v))
159 #define HW_PORT_PCRn_SET(x, n, v) (HW_PORT_PCRn_WR(x, n, HW_PORT_PCRn_RD(x, n) |  (v)))
160 #define HW_PORT_PCRn_CLR(x, n, v) (HW_PORT_PCRn_WR(x, n, HW_PORT_PCRn_RD(x, n) & ~(v)))
161 #define HW_PORT_PCRn_TOG(x, n, v) (HW_PORT_PCRn_WR(x, n, HW_PORT_PCRn_RD(x, n) ^  (v)))
162 /*@}*/
163
164 /*
165  * Constants & macros for individual PORT_PCRn bitfields
166  */
167
168 /*!
169  * @name Register PORT_PCRn, field PS[0] (RW)
170  *
171  * Pull configuration is valid in all digital pin muxing modes.
172  *
173  * Values:
174  * - 0 - Internal pulldown resistor is enabled on the corresponding pin, if the
175  *     corresponding PE field is set.
176  * - 1 - Internal pullup resistor is enabled on the corresponding pin, if the
177  *     corresponding PE field is set.
178  */
179 /*@{*/
180 #define BP_PORT_PCRn_PS      (0U)          /*!< Bit position for PORT_PCRn_PS. */
181 #define BM_PORT_PCRn_PS      (0x00000001U) /*!< Bit mask for PORT_PCRn_PS. */
182 #define BS_PORT_PCRn_PS      (1U)          /*!< Bit field size in bits for PORT_PCRn_PS. */
183
184 /*! @brief Read current value of the PORT_PCRn_PS field. */
185 #define BR_PORT_PCRn_PS(x, n) (BITBAND_ACCESS32(HW_PORT_PCRn_ADDR(x, n), BP_PORT_PCRn_PS))
186
187 /*! @brief Format value for bitfield PORT_PCRn_PS. */
188 #define BF_PORT_PCRn_PS(v)   ((uint32_t)((uint32_t)(v) << BP_PORT_PCRn_PS) & BM_PORT_PCRn_PS)
189
190 /*! @brief Set the PS field to a new value. */
191 #define BW_PORT_PCRn_PS(x, n, v) (BITBAND_ACCESS32(HW_PORT_PCRn_ADDR(x, n), BP_PORT_PCRn_PS) = (v))
192 /*@}*/
193
194 /*!
195  * @name Register PORT_PCRn, field PE[1] (RW)
196  *
197  * Pull configuration is valid in all digital pin muxing modes.
198  *
199  * Values:
200  * - 0 - Internal pullup or pulldown resistor is not enabled on the
201  *     corresponding pin.
202  * - 1 - Internal pullup or pulldown resistor is enabled on the corresponding
203  *     pin, if the pin is configured as a digital input.
204  */
205 /*@{*/
206 #define BP_PORT_PCRn_PE      (1U)          /*!< Bit position for PORT_PCRn_PE. */
207 #define BM_PORT_PCRn_PE      (0x00000002U) /*!< Bit mask for PORT_PCRn_PE. */
208 #define BS_PORT_PCRn_PE      (1U)          /*!< Bit field size in bits for PORT_PCRn_PE. */
209
210 /*! @brief Read current value of the PORT_PCRn_PE field. */
211 #define BR_PORT_PCRn_PE(x, n) (BITBAND_ACCESS32(HW_PORT_PCRn_ADDR(x, n), BP_PORT_PCRn_PE))
212
213 /*! @brief Format value for bitfield PORT_PCRn_PE. */
214 #define BF_PORT_PCRn_PE(v)   ((uint32_t)((uint32_t)(v) << BP_PORT_PCRn_PE) & BM_PORT_PCRn_PE)
215
216 /*! @brief Set the PE field to a new value. */
217 #define BW_PORT_PCRn_PE(x, n, v) (BITBAND_ACCESS32(HW_PORT_PCRn_ADDR(x, n), BP_PORT_PCRn_PE) = (v))
218 /*@}*/
219
220 /*!
221  * @name Register PORT_PCRn, field SRE[2] (RW)
222  *
223  * Slew rate configuration is valid in all digital pin muxing modes.
224  *
225  * Values:
226  * - 0 - Fast slew rate is configured on the corresponding pin, if the pin is
227  *     configured as a digital output.
228  * - 1 - Slow slew rate is configured on the corresponding pin, if the pin is
229  *     configured as a digital output.
230  */
231 /*@{*/
232 #define BP_PORT_PCRn_SRE     (2U)          /*!< Bit position for PORT_PCRn_SRE. */
233 #define BM_PORT_PCRn_SRE     (0x00000004U) /*!< Bit mask for PORT_PCRn_SRE. */
234 #define BS_PORT_PCRn_SRE     (1U)          /*!< Bit field size in bits for PORT_PCRn_SRE. */
235
236 /*! @brief Read current value of the PORT_PCRn_SRE field. */
237 #define BR_PORT_PCRn_SRE(x, n) (BITBAND_ACCESS32(HW_PORT_PCRn_ADDR(x, n), BP_PORT_PCRn_SRE))
238
239 /*! @brief Format value for bitfield PORT_PCRn_SRE. */
240 #define BF_PORT_PCRn_SRE(v)  ((uint32_t)((uint32_t)(v) << BP_PORT_PCRn_SRE) & BM_PORT_PCRn_SRE)
241
242 /*! @brief Set the SRE field to a new value. */
243 #define BW_PORT_PCRn_SRE(x, n, v) (BITBAND_ACCESS32(HW_PORT_PCRn_ADDR(x, n), BP_PORT_PCRn_SRE) = (v))
244 /*@}*/
245
246 /*!
247  * @name Register PORT_PCRn, field PFE[4] (RW)
248  *
249  * Passive filter configuration is valid in all digital pin muxing modes.
250  *
251  * Values:
252  * - 0 - Passive input filter is disabled on the corresponding pin.
253  * - 1 - Passive input filter is enabled on the corresponding pin, if the pin is
254  *     configured as a digital input. Refer to the device data sheet for filter
255  *     characteristics.
256  */
257 /*@{*/
258 #define BP_PORT_PCRn_PFE     (4U)          /*!< Bit position for PORT_PCRn_PFE. */
259 #define BM_PORT_PCRn_PFE     (0x00000010U) /*!< Bit mask for PORT_PCRn_PFE. */
260 #define BS_PORT_PCRn_PFE     (1U)          /*!< Bit field size in bits for PORT_PCRn_PFE. */
261
262 /*! @brief Read current value of the PORT_PCRn_PFE field. */
263 #define BR_PORT_PCRn_PFE(x, n) (BITBAND_ACCESS32(HW_PORT_PCRn_ADDR(x, n), BP_PORT_PCRn_PFE))
264
265 /*! @brief Format value for bitfield PORT_PCRn_PFE. */
266 #define BF_PORT_PCRn_PFE(v)  ((uint32_t)((uint32_t)(v) << BP_PORT_PCRn_PFE) & BM_PORT_PCRn_PFE)
267
268 /*! @brief Set the PFE field to a new value. */
269 #define BW_PORT_PCRn_PFE(x, n, v) (BITBAND_ACCESS32(HW_PORT_PCRn_ADDR(x, n), BP_PORT_PCRn_PFE) = (v))
270 /*@}*/
271
272 /*!
273  * @name Register PORT_PCRn, field ODE[5] (RW)
274  *
275  * Open drain configuration is valid in all digital pin muxing modes.
276  *
277  * Values:
278  * - 0 - Open drain output is disabled on the corresponding pin.
279  * - 1 - Open drain output is enabled on the corresponding pin, if the pin is
280  *     configured as a digital output.
281  */
282 /*@{*/
283 #define BP_PORT_PCRn_ODE     (5U)          /*!< Bit position for PORT_PCRn_ODE. */
284 #define BM_PORT_PCRn_ODE     (0x00000020U) /*!< Bit mask for PORT_PCRn_ODE. */
285 #define BS_PORT_PCRn_ODE     (1U)          /*!< Bit field size in bits for PORT_PCRn_ODE. */
286
287 /*! @brief Read current value of the PORT_PCRn_ODE field. */
288 #define BR_PORT_PCRn_ODE(x, n) (BITBAND_ACCESS32(HW_PORT_PCRn_ADDR(x, n), BP_PORT_PCRn_ODE))
289
290 /*! @brief Format value for bitfield PORT_PCRn_ODE. */
291 #define BF_PORT_PCRn_ODE(v)  ((uint32_t)((uint32_t)(v) << BP_PORT_PCRn_ODE) & BM_PORT_PCRn_ODE)
292
293 /*! @brief Set the ODE field to a new value. */
294 #define BW_PORT_PCRn_ODE(x, n, v) (BITBAND_ACCESS32(HW_PORT_PCRn_ADDR(x, n), BP_PORT_PCRn_ODE) = (v))
295 /*@}*/
296
297 /*!
298  * @name Register PORT_PCRn, field DSE[6] (RW)
299  *
300  * Drive strength configuration is valid in all digital pin muxing modes.
301  *
302  * Values:
303  * - 0 - Low drive strength is configured on the corresponding pin, if pin is
304  *     configured as a digital output.
305  * - 1 - High drive strength is configured on the corresponding pin, if pin is
306  *     configured as a digital output.
307  */
308 /*@{*/
309 #define BP_PORT_PCRn_DSE     (6U)          /*!< Bit position for PORT_PCRn_DSE. */
310 #define BM_PORT_PCRn_DSE     (0x00000040U) /*!< Bit mask for PORT_PCRn_DSE. */
311 #define BS_PORT_PCRn_DSE     (1U)          /*!< Bit field size in bits for PORT_PCRn_DSE. */
312
313 /*! @brief Read current value of the PORT_PCRn_DSE field. */
314 #define BR_PORT_PCRn_DSE(x, n) (BITBAND_ACCESS32(HW_PORT_PCRn_ADDR(x, n), BP_PORT_PCRn_DSE))
315
316 /*! @brief Format value for bitfield PORT_PCRn_DSE. */
317 #define BF_PORT_PCRn_DSE(v)  ((uint32_t)((uint32_t)(v) << BP_PORT_PCRn_DSE) & BM_PORT_PCRn_DSE)
318
319 /*! @brief Set the DSE field to a new value. */
320 #define BW_PORT_PCRn_DSE(x, n, v) (BITBAND_ACCESS32(HW_PORT_PCRn_ADDR(x, n), BP_PORT_PCRn_DSE) = (v))
321 /*@}*/
322
323 /*!
324  * @name Register PORT_PCRn, field MUX[10:8] (RW)
325  *
326  * Not all pins support all pin muxing slots. Unimplemented pin muxing slots are
327  * reserved and may result in configuring the pin for a different pin muxing
328  * slot. The corresponding pin is configured in the following pin muxing slot as
329  * follows:
330  *
331  * Values:
332  * - 000 - Pin disabled (analog).
333  * - 001 - Alternative 1 (GPIO).
334  * - 010 - Alternative 2 (chip-specific).
335  * - 011 - Alternative 3 (chip-specific).
336  * - 100 - Alternative 4 (chip-specific).
337  * - 101 - Alternative 5 (chip-specific).
338  * - 110 - Alternative 6 (chip-specific).
339  * - 111 - Alternative 7 (chip-specific).
340  */
341 /*@{*/
342 #define BP_PORT_PCRn_MUX     (8U)          /*!< Bit position for PORT_PCRn_MUX. */
343 #define BM_PORT_PCRn_MUX     (0x00000700U) /*!< Bit mask for PORT_PCRn_MUX. */
344 #define BS_PORT_PCRn_MUX     (3U)          /*!< Bit field size in bits for PORT_PCRn_MUX. */
345
346 /*! @brief Read current value of the PORT_PCRn_MUX field. */
347 #define BR_PORT_PCRn_MUX(x, n) (HW_PORT_PCRn(x, n).B.MUX)
348
349 /*! @brief Format value for bitfield PORT_PCRn_MUX. */
350 #define BF_PORT_PCRn_MUX(v)  ((uint32_t)((uint32_t)(v) << BP_PORT_PCRn_MUX) & BM_PORT_PCRn_MUX)
351
352 /*! @brief Set the MUX field to a new value. */
353 #define BW_PORT_PCRn_MUX(x, n, v) (HW_PORT_PCRn_WR(x, n, (HW_PORT_PCRn_RD(x, n) & ~BM_PORT_PCRn_MUX) | BF_PORT_PCRn_MUX(v)))
354 /*@}*/
355
356 /*!
357  * @name Register PORT_PCRn, field LK[15] (RW)
358  *
359  * Values:
360  * - 0 - Pin Control Register fields [15:0] are not locked.
361  * - 1 - Pin Control Register fields [15:0] are locked and cannot be updated
362  *     until the next system reset.
363  */
364 /*@{*/
365 #define BP_PORT_PCRn_LK      (15U)         /*!< Bit position for PORT_PCRn_LK. */
366 #define BM_PORT_PCRn_LK      (0x00008000U) /*!< Bit mask for PORT_PCRn_LK. */
367 #define BS_PORT_PCRn_LK      (1U)          /*!< Bit field size in bits for PORT_PCRn_LK. */
368
369 /*! @brief Read current value of the PORT_PCRn_LK field. */
370 #define BR_PORT_PCRn_LK(x, n) (BITBAND_ACCESS32(HW_PORT_PCRn_ADDR(x, n), BP_PORT_PCRn_LK))
371
372 /*! @brief Format value for bitfield PORT_PCRn_LK. */
373 #define BF_PORT_PCRn_LK(v)   ((uint32_t)((uint32_t)(v) << BP_PORT_PCRn_LK) & BM_PORT_PCRn_LK)
374
375 /*! @brief Set the LK field to a new value. */
376 #define BW_PORT_PCRn_LK(x, n, v) (BITBAND_ACCESS32(HW_PORT_PCRn_ADDR(x, n), BP_PORT_PCRn_LK) = (v))
377 /*@}*/
378
379 /*!
380  * @name Register PORT_PCRn, field IRQC[19:16] (RW)
381  *
382  * The pin interrupt configuration is valid in all digital pin muxing modes. The
383  * corresponding pin is configured to generate interrupt/DMA request as follows:
384  *
385  * Values:
386  * - 0000 - Interrupt/DMA request disabled.
387  * - 0001 - DMA request on rising edge.
388  * - 0010 - DMA request on falling edge.
389  * - 0011 - DMA request on either edge.
390  * - 1000 - Interrupt when logic 0.
391  * - 1001 - Interrupt on rising-edge.
392  * - 1010 - Interrupt on falling-edge.
393  * - 1011 - Interrupt on either edge.
394  * - 1100 - Interrupt when logic 1.
395  */
396 /*@{*/
397 #define BP_PORT_PCRn_IRQC    (16U)         /*!< Bit position for PORT_PCRn_IRQC. */
398 #define BM_PORT_PCRn_IRQC    (0x000F0000U) /*!< Bit mask for PORT_PCRn_IRQC. */
399 #define BS_PORT_PCRn_IRQC    (4U)          /*!< Bit field size in bits for PORT_PCRn_IRQC. */
400
401 /*! @brief Read current value of the PORT_PCRn_IRQC field. */
402 #define BR_PORT_PCRn_IRQC(x, n) (HW_PORT_PCRn(x, n).B.IRQC)
403
404 /*! @brief Format value for bitfield PORT_PCRn_IRQC. */
405 #define BF_PORT_PCRn_IRQC(v) ((uint32_t)((uint32_t)(v) << BP_PORT_PCRn_IRQC) & BM_PORT_PCRn_IRQC)
406
407 /*! @brief Set the IRQC field to a new value. */
408 #define BW_PORT_PCRn_IRQC(x, n, v) (HW_PORT_PCRn_WR(x, n, (HW_PORT_PCRn_RD(x, n) & ~BM_PORT_PCRn_IRQC) | BF_PORT_PCRn_IRQC(v)))
409 /*@}*/
410
411 /*!
412  * @name Register PORT_PCRn, field ISF[24] (W1C)
413  *
414  * The pin interrupt configuration is valid in all digital pin muxing modes.
415  *
416  * Values:
417  * - 0 - Configured interrupt is not detected.
418  * - 1 - Configured interrupt is detected. If the pin is configured to generate
419  *     a DMA request, then the corresponding flag will be cleared automatically
420  *     at the completion of the requested DMA transfer. Otherwise, the flag
421  *     remains set until a logic 1 is written to the flag. If the pin is configured for
422  *     a level sensitive interrupt and the pin remains asserted, then the flag
423  *     is set again immediately after it is cleared.
424  */
425 /*@{*/
426 #define BP_PORT_PCRn_ISF     (24U)         /*!< Bit position for PORT_PCRn_ISF. */
427 #define BM_PORT_PCRn_ISF     (0x01000000U) /*!< Bit mask for PORT_PCRn_ISF. */
428 #define BS_PORT_PCRn_ISF     (1U)          /*!< Bit field size in bits for PORT_PCRn_ISF. */
429
430 /*! @brief Read current value of the PORT_PCRn_ISF field. */
431 #define BR_PORT_PCRn_ISF(x, n) (BITBAND_ACCESS32(HW_PORT_PCRn_ADDR(x, n), BP_PORT_PCRn_ISF))
432
433 /*! @brief Format value for bitfield PORT_PCRn_ISF. */
434 #define BF_PORT_PCRn_ISF(v)  ((uint32_t)((uint32_t)(v) << BP_PORT_PCRn_ISF) & BM_PORT_PCRn_ISF)
435
436 /*! @brief Set the ISF field to a new value. */
437 #define BW_PORT_PCRn_ISF(x, n, v) (BITBAND_ACCESS32(HW_PORT_PCRn_ADDR(x, n), BP_PORT_PCRn_ISF) = (v))
438 /*@}*/
439
440 /*******************************************************************************
441  * HW_PORT_GPCLR - Global Pin Control Low Register
442  ******************************************************************************/
443
444 /*!
445  * @brief HW_PORT_GPCLR - Global Pin Control Low Register (WORZ)
446  *
447  * Reset value: 0x00000000U
448  *
449  * Only 32-bit writes are supported to this register.
450  */
451 typedef union _hw_port_gpclr
452 {
453     uint32_t U;
454     struct _hw_port_gpclr_bitfields
455     {
456         uint32_t GPWD : 16;            /*!< [15:0] Global Pin Write Data */
457         uint32_t GPWE : 16;            /*!< [31:16] Global Pin Write Enable */
458     } B;
459 } hw_port_gpclr_t;
460
461 /*!
462  * @name Constants and macros for entire PORT_GPCLR register
463  */
464 /*@{*/
465 #define HW_PORT_GPCLR_ADDR(x)    ((x) + 0x80U)
466
467 #define HW_PORT_GPCLR(x)         (*(__O hw_port_gpclr_t *) HW_PORT_GPCLR_ADDR(x))
468 #define HW_PORT_GPCLR_RD(x)      (HW_PORT_GPCLR(x).U)
469 #define HW_PORT_GPCLR_WR(x, v)   (HW_PORT_GPCLR(x).U = (v))
470 /*@}*/
471
472 /*
473  * Constants & macros for individual PORT_GPCLR bitfields
474  */
475
476 /*!
477  * @name Register PORT_GPCLR, field GPWD[15:0] (WORZ)
478  *
479  * Write value that is written to all Pin Control Registers bits [15:0] that are
480  * selected by GPWE.
481  */
482 /*@{*/
483 #define BP_PORT_GPCLR_GPWD   (0U)          /*!< Bit position for PORT_GPCLR_GPWD. */
484 #define BM_PORT_GPCLR_GPWD   (0x0000FFFFU) /*!< Bit mask for PORT_GPCLR_GPWD. */
485 #define BS_PORT_GPCLR_GPWD   (16U)         /*!< Bit field size in bits for PORT_GPCLR_GPWD. */
486
487 /*! @brief Format value for bitfield PORT_GPCLR_GPWD. */
488 #define BF_PORT_GPCLR_GPWD(v) ((uint32_t)((uint32_t)(v) << BP_PORT_GPCLR_GPWD) & BM_PORT_GPCLR_GPWD)
489
490 /*! @brief Set the GPWD field to a new value. */
491 #define BW_PORT_GPCLR_GPWD(x, v) (HW_PORT_GPCLR_WR(x, (HW_PORT_GPCLR_RD(x) & ~BM_PORT_GPCLR_GPWD) | BF_PORT_GPCLR_GPWD(v)))
492 /*@}*/
493
494 /*!
495  * @name Register PORT_GPCLR, field GPWE[31:16] (WORZ)
496  *
497  * Selects which Pin Control Registers (15 through 0) bits [15:0] update with
498  * the value in GPWD. If a selected Pin Control Register is locked then the write
499  * to that register is ignored.
500  *
501  * Values:
502  * - 0 - Corresponding Pin Control Register is not updated with the value in
503  *     GPWD.
504  * - 1 - Corresponding Pin Control Register is updated with the value in GPWD.
505  */
506 /*@{*/
507 #define BP_PORT_GPCLR_GPWE   (16U)         /*!< Bit position for PORT_GPCLR_GPWE. */
508 #define BM_PORT_GPCLR_GPWE   (0xFFFF0000U) /*!< Bit mask for PORT_GPCLR_GPWE. */
509 #define BS_PORT_GPCLR_GPWE   (16U)         /*!< Bit field size in bits for PORT_GPCLR_GPWE. */
510
511 /*! @brief Format value for bitfield PORT_GPCLR_GPWE. */
512 #define BF_PORT_GPCLR_GPWE(v) ((uint32_t)((uint32_t)(v) << BP_PORT_GPCLR_GPWE) & BM_PORT_GPCLR_GPWE)
513
514 /*! @brief Set the GPWE field to a new value. */
515 #define BW_PORT_GPCLR_GPWE(x, v) (HW_PORT_GPCLR_WR(x, (HW_PORT_GPCLR_RD(x) & ~BM_PORT_GPCLR_GPWE) | BF_PORT_GPCLR_GPWE(v)))
516 /*@}*/
517
518 /*******************************************************************************
519  * HW_PORT_GPCHR - Global Pin Control High Register
520  ******************************************************************************/
521
522 /*!
523  * @brief HW_PORT_GPCHR - Global Pin Control High Register (WORZ)
524  *
525  * Reset value: 0x00000000U
526  *
527  * Only 32-bit writes are supported to this register.
528  */
529 typedef union _hw_port_gpchr
530 {
531     uint32_t U;
532     struct _hw_port_gpchr_bitfields
533     {
534         uint32_t GPWD : 16;            /*!< [15:0] Global Pin Write Data */
535         uint32_t GPWE : 16;            /*!< [31:16] Global Pin Write Enable */
536     } B;
537 } hw_port_gpchr_t;
538
539 /*!
540  * @name Constants and macros for entire PORT_GPCHR register
541  */
542 /*@{*/
543 #define HW_PORT_GPCHR_ADDR(x)    ((x) + 0x84U)
544
545 #define HW_PORT_GPCHR(x)         (*(__O hw_port_gpchr_t *) HW_PORT_GPCHR_ADDR(x))
546 #define HW_PORT_GPCHR_RD(x)      (HW_PORT_GPCHR(x).U)
547 #define HW_PORT_GPCHR_WR(x, v)   (HW_PORT_GPCHR(x).U = (v))
548 /*@}*/
549
550 /*
551  * Constants & macros for individual PORT_GPCHR bitfields
552  */
553
554 /*!
555  * @name Register PORT_GPCHR, field GPWD[15:0] (WORZ)
556  *
557  * Write value that is written to all Pin Control Registers bits [15:0] that are
558  * selected by GPWE.
559  */
560 /*@{*/
561 #define BP_PORT_GPCHR_GPWD   (0U)          /*!< Bit position for PORT_GPCHR_GPWD. */
562 #define BM_PORT_GPCHR_GPWD   (0x0000FFFFU) /*!< Bit mask for PORT_GPCHR_GPWD. */
563 #define BS_PORT_GPCHR_GPWD   (16U)         /*!< Bit field size in bits for PORT_GPCHR_GPWD. */
564
565 /*! @brief Format value for bitfield PORT_GPCHR_GPWD. */
566 #define BF_PORT_GPCHR_GPWD(v) ((uint32_t)((uint32_t)(v) << BP_PORT_GPCHR_GPWD) & BM_PORT_GPCHR_GPWD)
567
568 /*! @brief Set the GPWD field to a new value. */
569 #define BW_PORT_GPCHR_GPWD(x, v) (HW_PORT_GPCHR_WR(x, (HW_PORT_GPCHR_RD(x) & ~BM_PORT_GPCHR_GPWD) | BF_PORT_GPCHR_GPWD(v)))
570 /*@}*/
571
572 /*!
573  * @name Register PORT_GPCHR, field GPWE[31:16] (WORZ)
574  *
575  * Selects which Pin Control Registers (31 through 16) bits [15:0] update with
576  * the value in GPWD. If a selected Pin Control Register is locked then the write
577  * to that register is ignored.
578  *
579  * Values:
580  * - 0 - Corresponding Pin Control Register is not updated with the value in
581  *     GPWD.
582  * - 1 - Corresponding Pin Control Register is updated with the value in GPWD.
583  */
584 /*@{*/
585 #define BP_PORT_GPCHR_GPWE   (16U)         /*!< Bit position for PORT_GPCHR_GPWE. */
586 #define BM_PORT_GPCHR_GPWE   (0xFFFF0000U) /*!< Bit mask for PORT_GPCHR_GPWE. */
587 #define BS_PORT_GPCHR_GPWE   (16U)         /*!< Bit field size in bits for PORT_GPCHR_GPWE. */
588
589 /*! @brief Format value for bitfield PORT_GPCHR_GPWE. */
590 #define BF_PORT_GPCHR_GPWE(v) ((uint32_t)((uint32_t)(v) << BP_PORT_GPCHR_GPWE) & BM_PORT_GPCHR_GPWE)
591
592 /*! @brief Set the GPWE field to a new value. */
593 #define BW_PORT_GPCHR_GPWE(x, v) (HW_PORT_GPCHR_WR(x, (HW_PORT_GPCHR_RD(x) & ~BM_PORT_GPCHR_GPWE) | BF_PORT_GPCHR_GPWE(v)))
594 /*@}*/
595
596 /*******************************************************************************
597  * HW_PORT_ISFR - Interrupt Status Flag Register
598  ******************************************************************************/
599
600 /*!
601  * @brief HW_PORT_ISFR - Interrupt Status Flag Register (W1C)
602  *
603  * Reset value: 0x00000000U
604  *
605  * The pin interrupt configuration is valid in all digital pin muxing modes. The
606  * Interrupt Status Flag for each pin is also visible in the corresponding Pin
607  * Control Register, and each flag can be cleared in either location.
608  */
609 typedef union _hw_port_isfr
610 {
611     uint32_t U;
612     struct _hw_port_isfr_bitfields
613     {
614         uint32_t ISF : 32;             /*!< [31:0] Interrupt Status Flag */
615     } B;
616 } hw_port_isfr_t;
617
618 /*!
619  * @name Constants and macros for entire PORT_ISFR register
620  */
621 /*@{*/
622 #define HW_PORT_ISFR_ADDR(x)     ((x) + 0xA0U)
623
624 #define HW_PORT_ISFR(x)          (*(__IO hw_port_isfr_t *) HW_PORT_ISFR_ADDR(x))
625 #define HW_PORT_ISFR_RD(x)       (HW_PORT_ISFR(x).U)
626 #define HW_PORT_ISFR_WR(x, v)    (HW_PORT_ISFR(x).U = (v))
627 #define HW_PORT_ISFR_SET(x, v)   (HW_PORT_ISFR_WR(x, HW_PORT_ISFR_RD(x) |  (v)))
628 #define HW_PORT_ISFR_CLR(x, v)   (HW_PORT_ISFR_WR(x, HW_PORT_ISFR_RD(x) & ~(v)))
629 #define HW_PORT_ISFR_TOG(x, v)   (HW_PORT_ISFR_WR(x, HW_PORT_ISFR_RD(x) ^  (v)))
630 /*@}*/
631
632 /*
633  * Constants & macros for individual PORT_ISFR bitfields
634  */
635
636 /*!
637  * @name Register PORT_ISFR, field ISF[31:0] (W1C)
638  *
639  * Each bit in the field indicates the detection of the configured interrupt of
640  * the same number as the field.
641  *
642  * Values:
643  * - 0 - Configured interrupt is not detected.
644  * - 1 - Configured interrupt is detected. If the pin is configured to generate
645  *     a DMA request, then the corresponding flag will be cleared automatically
646  *     at the completion of the requested DMA transfer. Otherwise, the flag
647  *     remains set until a logic 1 is written to the flag. If the pin is configured for
648  *     a level sensitive interrupt and the pin remains asserted, then the flag
649  *     is set again immediately after it is cleared.
650  */
651 /*@{*/
652 #define BP_PORT_ISFR_ISF     (0U)          /*!< Bit position for PORT_ISFR_ISF. */
653 #define BM_PORT_ISFR_ISF     (0xFFFFFFFFU) /*!< Bit mask for PORT_ISFR_ISF. */
654 #define BS_PORT_ISFR_ISF     (32U)         /*!< Bit field size in bits for PORT_ISFR_ISF. */
655
656 /*! @brief Read current value of the PORT_ISFR_ISF field. */
657 #define BR_PORT_ISFR_ISF(x)  (HW_PORT_ISFR(x).U)
658
659 /*! @brief Format value for bitfield PORT_ISFR_ISF. */
660 #define BF_PORT_ISFR_ISF(v)  ((uint32_t)((uint32_t)(v) << BP_PORT_ISFR_ISF) & BM_PORT_ISFR_ISF)
661
662 /*! @brief Set the ISF field to a new value. */
663 #define BW_PORT_ISFR_ISF(x, v) (HW_PORT_ISFR_WR(x, v))
664 /*@}*/
665
666 /*******************************************************************************
667  * HW_PORT_DFER - Digital Filter Enable Register
668  ******************************************************************************/
669
670 /*!
671  * @brief HW_PORT_DFER - Digital Filter Enable Register (RW)
672  *
673  * Reset value: 0x00000000U
674  *
675  * The corresponding bit is read only for pins that do not support a digital
676  * filter. Refer to the Chapter of Signal Multiplexing and Signal Descriptions for
677  * the pins that support digital filter. The digital filter configuration is valid
678  * in all digital pin muxing modes.
679  */
680 typedef union _hw_port_dfer
681 {
682     uint32_t U;
683     struct _hw_port_dfer_bitfields
684     {
685         uint32_t DFE : 32;             /*!< [31:0] Digital Filter Enable */
686     } B;
687 } hw_port_dfer_t;
688
689 /*!
690  * @name Constants and macros for entire PORT_DFER register
691  */
692 /*@{*/
693 #define HW_PORT_DFER_ADDR(x)     ((x) + 0xC0U)
694
695 #define HW_PORT_DFER(x)          (*(__IO hw_port_dfer_t *) HW_PORT_DFER_ADDR(x))
696 #define HW_PORT_DFER_RD(x)       (HW_PORT_DFER(x).U)
697 #define HW_PORT_DFER_WR(x, v)    (HW_PORT_DFER(x).U = (v))
698 #define HW_PORT_DFER_SET(x, v)   (HW_PORT_DFER_WR(x, HW_PORT_DFER_RD(x) |  (v)))
699 #define HW_PORT_DFER_CLR(x, v)   (HW_PORT_DFER_WR(x, HW_PORT_DFER_RD(x) & ~(v)))
700 #define HW_PORT_DFER_TOG(x, v)   (HW_PORT_DFER_WR(x, HW_PORT_DFER_RD(x) ^  (v)))
701 /*@}*/
702
703 /*
704  * Constants & macros for individual PORT_DFER bitfields
705  */
706
707 /*!
708  * @name Register PORT_DFER, field DFE[31:0] (RW)
709  *
710  * The digital filter configuration is valid in all digital pin muxing modes.
711  * The output of each digital filter is reset to zero at system reset and whenever
712  * the digital filter is disabled. Each bit in the field enables the digital
713  * filter of the same number as the field.
714  *
715  * Values:
716  * - 0 - Digital filter is disabled on the corresponding pin and output of the
717  *     digital filter is reset to zero.
718  * - 1 - Digital filter is enabled on the corresponding pin, if the pin is
719  *     configured as a digital input.
720  */
721 /*@{*/
722 #define BP_PORT_DFER_DFE     (0U)          /*!< Bit position for PORT_DFER_DFE. */
723 #define BM_PORT_DFER_DFE     (0xFFFFFFFFU) /*!< Bit mask for PORT_DFER_DFE. */
724 #define BS_PORT_DFER_DFE     (32U)         /*!< Bit field size in bits for PORT_DFER_DFE. */
725
726 /*! @brief Read current value of the PORT_DFER_DFE field. */
727 #define BR_PORT_DFER_DFE(x)  (HW_PORT_DFER(x).U)
728
729 /*! @brief Format value for bitfield PORT_DFER_DFE. */
730 #define BF_PORT_DFER_DFE(v)  ((uint32_t)((uint32_t)(v) << BP_PORT_DFER_DFE) & BM_PORT_DFER_DFE)
731
732 /*! @brief Set the DFE field to a new value. */
733 #define BW_PORT_DFER_DFE(x, v) (HW_PORT_DFER_WR(x, v))
734 /*@}*/
735
736 /*******************************************************************************
737  * HW_PORT_DFCR - Digital Filter Clock Register
738  ******************************************************************************/
739
740 /*!
741  * @brief HW_PORT_DFCR - Digital Filter Clock Register (RW)
742  *
743  * Reset value: 0x00000000U
744  *
745  * This register is read only for ports that do not support a digital filter.
746  * The digital filter configuration is valid in all digital pin muxing modes.
747  */
748 typedef union _hw_port_dfcr
749 {
750     uint32_t U;
751     struct _hw_port_dfcr_bitfields
752     {
753         uint32_t CS : 1;               /*!< [0] Clock Source */
754         uint32_t RESERVED0 : 31;       /*!< [31:1]  */
755     } B;
756 } hw_port_dfcr_t;
757
758 /*!
759  * @name Constants and macros for entire PORT_DFCR register
760  */
761 /*@{*/
762 #define HW_PORT_DFCR_ADDR(x)     ((x) + 0xC4U)
763
764 #define HW_PORT_DFCR(x)          (*(__IO hw_port_dfcr_t *) HW_PORT_DFCR_ADDR(x))
765 #define HW_PORT_DFCR_RD(x)       (HW_PORT_DFCR(x).U)
766 #define HW_PORT_DFCR_WR(x, v)    (HW_PORT_DFCR(x).U = (v))
767 #define HW_PORT_DFCR_SET(x, v)   (HW_PORT_DFCR_WR(x, HW_PORT_DFCR_RD(x) |  (v)))
768 #define HW_PORT_DFCR_CLR(x, v)   (HW_PORT_DFCR_WR(x, HW_PORT_DFCR_RD(x) & ~(v)))
769 #define HW_PORT_DFCR_TOG(x, v)   (HW_PORT_DFCR_WR(x, HW_PORT_DFCR_RD(x) ^  (v)))
770 /*@}*/
771
772 /*
773  * Constants & macros for individual PORT_DFCR bitfields
774  */
775
776 /*!
777  * @name Register PORT_DFCR, field CS[0] (RW)
778  *
779  * The digital filter configuration is valid in all digital pin muxing modes.
780  * Configures the clock source for the digital input filters. Changing the filter
781  * clock source must be done only when all digital filters are disabled.
782  *
783  * Values:
784  * - 0 - Digital filters are clocked by the bus clock.
785  * - 1 - Digital filters are clocked by the 1 kHz LPO clock.
786  */
787 /*@{*/
788 #define BP_PORT_DFCR_CS      (0U)          /*!< Bit position for PORT_DFCR_CS. */
789 #define BM_PORT_DFCR_CS      (0x00000001U) /*!< Bit mask for PORT_DFCR_CS. */
790 #define BS_PORT_DFCR_CS      (1U)          /*!< Bit field size in bits for PORT_DFCR_CS. */
791
792 /*! @brief Read current value of the PORT_DFCR_CS field. */
793 #define BR_PORT_DFCR_CS(x)   (BITBAND_ACCESS32(HW_PORT_DFCR_ADDR(x), BP_PORT_DFCR_CS))
794
795 /*! @brief Format value for bitfield PORT_DFCR_CS. */
796 #define BF_PORT_DFCR_CS(v)   ((uint32_t)((uint32_t)(v) << BP_PORT_DFCR_CS) & BM_PORT_DFCR_CS)
797
798 /*! @brief Set the CS field to a new value. */
799 #define BW_PORT_DFCR_CS(x, v) (BITBAND_ACCESS32(HW_PORT_DFCR_ADDR(x), BP_PORT_DFCR_CS) = (v))
800 /*@}*/
801
802 /*******************************************************************************
803  * HW_PORT_DFWR - Digital Filter Width Register
804  ******************************************************************************/
805
806 /*!
807  * @brief HW_PORT_DFWR - Digital Filter Width Register (RW)
808  *
809  * Reset value: 0x00000000U
810  *
811  * This register is read only for ports that do not support a digital filter.
812  * The digital filter configuration is valid in all digital pin muxing modes.
813  */
814 typedef union _hw_port_dfwr
815 {
816     uint32_t U;
817     struct _hw_port_dfwr_bitfields
818     {
819         uint32_t FILT : 5;             /*!< [4:0] Filter Length */
820         uint32_t RESERVED0 : 27;       /*!< [31:5]  */
821     } B;
822 } hw_port_dfwr_t;
823
824 /*!
825  * @name Constants and macros for entire PORT_DFWR register
826  */
827 /*@{*/
828 #define HW_PORT_DFWR_ADDR(x)     ((x) + 0xC8U)
829
830 #define HW_PORT_DFWR(x)          (*(__IO hw_port_dfwr_t *) HW_PORT_DFWR_ADDR(x))
831 #define HW_PORT_DFWR_RD(x)       (HW_PORT_DFWR(x).U)
832 #define HW_PORT_DFWR_WR(x, v)    (HW_PORT_DFWR(x).U = (v))
833 #define HW_PORT_DFWR_SET(x, v)   (HW_PORT_DFWR_WR(x, HW_PORT_DFWR_RD(x) |  (v)))
834 #define HW_PORT_DFWR_CLR(x, v)   (HW_PORT_DFWR_WR(x, HW_PORT_DFWR_RD(x) & ~(v)))
835 #define HW_PORT_DFWR_TOG(x, v)   (HW_PORT_DFWR_WR(x, HW_PORT_DFWR_RD(x) ^  (v)))
836 /*@}*/
837
838 /*
839  * Constants & macros for individual PORT_DFWR bitfields
840  */
841
842 /*!
843  * @name Register PORT_DFWR, field FILT[4:0] (RW)
844  *
845  * The digital filter configuration is valid in all digital pin muxing modes.
846  * Configures the maximum size of the glitches, in clock cycles, that the digital
847  * filter absorbs for the enabled digital filters. Glitches that are longer than
848  * this register setting will pass through the digital filter, and glitches that
849  * are equal to or less than this register setting are filtered. Changing the
850  * filter length must be done only after all filters are disabled.
851  */
852 /*@{*/
853 #define BP_PORT_DFWR_FILT    (0U)          /*!< Bit position for PORT_DFWR_FILT. */
854 #define BM_PORT_DFWR_FILT    (0x0000001FU) /*!< Bit mask for PORT_DFWR_FILT. */
855 #define BS_PORT_DFWR_FILT    (5U)          /*!< Bit field size in bits for PORT_DFWR_FILT. */
856
857 /*! @brief Read current value of the PORT_DFWR_FILT field. */
858 #define BR_PORT_DFWR_FILT(x) (HW_PORT_DFWR(x).B.FILT)
859
860 /*! @brief Format value for bitfield PORT_DFWR_FILT. */
861 #define BF_PORT_DFWR_FILT(v) ((uint32_t)((uint32_t)(v) << BP_PORT_DFWR_FILT) & BM_PORT_DFWR_FILT)
862
863 /*! @brief Set the FILT field to a new value. */
864 #define BW_PORT_DFWR_FILT(x, v) (HW_PORT_DFWR_WR(x, (HW_PORT_DFWR_RD(x) & ~BM_PORT_DFWR_FILT) | BF_PORT_DFWR_FILT(v)))
865 /*@}*/
866
867 /*******************************************************************************
868  * hw_port_t - module struct
869  ******************************************************************************/
870 /*!
871  * @brief All PORT module registers.
872  */
873 #pragma pack(1)
874 typedef struct _hw_port
875 {
876     __IO hw_port_pcrn_t PCRn[32];          /*!< [0x0] Pin Control Register n */
877     __O hw_port_gpclr_t GPCLR;             /*!< [0x80] Global Pin Control Low Register */
878     __O hw_port_gpchr_t GPCHR;             /*!< [0x84] Global Pin Control High Register */
879     uint8_t _reserved0[24];
880     __IO hw_port_isfr_t ISFR;              /*!< [0xA0] Interrupt Status Flag Register */
881     uint8_t _reserved1[28];
882     __IO hw_port_dfer_t DFER;              /*!< [0xC0] Digital Filter Enable Register */
883     __IO hw_port_dfcr_t DFCR;              /*!< [0xC4] Digital Filter Clock Register */
884     __IO hw_port_dfwr_t DFWR;              /*!< [0xC8] Digital Filter Width Register */
885 } hw_port_t;
886 #pragma pack()
887
888 /*! @brief Macro to access all PORT registers. */
889 /*! @param x PORT module instance base address. */
890 /*! @return Reference (not a pointer) to the registers struct. To get a pointer to the struct,
891  *     use the '&' operator, like <code>&HW_PORT(PORTA_BASE)</code>. */
892 #define HW_PORT(x)     (*(hw_port_t *)(x))
893
894 #endif /* __HW_PORT_REGISTERS_H__ */
895 /* EOF */