Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
gpio_regs.h
00001 /******************************************************************************* 00002 * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved. 00003 * 00004 * Permission is hereby granted, free of charge, to any person obtaining a 00005 * copy of this software and associated documentation files (the "Software"), 00006 * to deal in the Software without restriction, including without limitation 00007 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00008 * and/or sell copies of the Software, and to permit persons to whom the 00009 * Software is furnished to do so, subject to the following conditions: 00010 * 00011 * The above copyright notice and this permission notice shall be included 00012 * in all copies or substantial portions of the Software. 00013 * 00014 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00015 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00016 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00017 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES 00018 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 00019 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00020 * OTHER DEALINGS IN THE SOFTWARE. 00021 * 00022 * Except as contained in this notice, the name of Maxim Integrated 00023 * Products, Inc. shall not be used except as stated in the Maxim Integrated 00024 * Products, Inc. Branding Policy. 00025 * 00026 * The mere transfer of this software does not imply any licenses 00027 * of trade secrets, proprietary technology, copyrights, patents, 00028 * trademarks, maskwork rights, or any other form of intellectual 00029 * property whatsoever. Maxim Integrated Products, Inc. retains all 00030 * ownership rights. 00031 * 00032 ******************************************************************************/ 00033 00034 #ifndef _MXC_GPIO_REGS_H_ 00035 #define _MXC_GPIO_REGS_H_ 00036 00037 #ifdef __cplusplus 00038 extern "C" { 00039 #endif 00040 00041 #include <stdint.h> 00042 00043 /* 00044 If types are not defined elsewhere (CMSIS) define them here 00045 */ 00046 #ifndef __IO 00047 #define __IO volatile 00048 #endif 00049 #ifndef __I 00050 #define __I volatile const 00051 #endif 00052 #ifndef __O 00053 #define __O volatile 00054 #endif 00055 #ifndef __R 00056 #define __R volatile const 00057 #endif 00058 00059 00060 /* 00061 Typedefed structure(s) for module registers (per instance or section) with direct 32-bit 00062 access to each register in module. 00063 */ 00064 00065 /* Offset Register Description 00066 ============= ============================================================================ */ 00067 typedef struct { 00068 __IO uint32_t rst_mode[16]; /* 0x0000-0x003C Port P[0..15] Default (Power-On Reset) Output Drive Mode */ 00069 __IO uint32_t free[16]; /* 0x0040-0x007C Port P[0..15] Free for GPIO Operation Flags */ 00070 __IO uint32_t out_mode[16]; /* 0x0080-0x00BC Port P[0..15] Output Drive Mode */ 00071 __IO uint32_t out_val[16]; /* 0x00C0-0x00FC Port P[0..15] GPIO Output Value */ 00072 __IO uint32_t func_sel[16]; /* 0x0100-0x013C Port P[0..15] GPIO Function Select */ 00073 __IO uint32_t in_mode[16]; /* 0x0140-0x017C Port P[0..15] GPIO Input Monitoring Mode */ 00074 __IO uint32_t in_val[16]; /* 0x0180-0x01BC Port P[0..15] GPIO Input Value */ 00075 __IO uint32_t int_mode[16]; /* 0x01C0-0x01FC Port P[0..15] Interrupt Detection Mode */ 00076 __IO uint32_t intfl[16]; /* 0x0200-0x023C Port P[0..15] Interrupt Flags */ 00077 __IO uint32_t inten[16]; /* 0x0240-0x027C Port P[0..15] Interrupt Enables */ 00078 } mxc_gpio_regs_t; 00079 00080 00081 /* 00082 Register offsets for module GPIO. 00083 */ 00084 00085 #define MXC_R_GPIO_OFFS_RST_MODE_P0 ((uint32_t)0x00000000UL) 00086 #define MXC_R_GPIO_OFFS_RST_MODE_P1 ((uint32_t)0x00000004UL) 00087 #define MXC_R_GPIO_OFFS_RST_MODE_P2 ((uint32_t)0x00000008UL) 00088 #define MXC_R_GPIO_OFFS_RST_MODE_P3 ((uint32_t)0x0000000CUL) 00089 #define MXC_R_GPIO_OFFS_RST_MODE_P4 ((uint32_t)0x00000010UL) 00090 #define MXC_R_GPIO_OFFS_RST_MODE_P5 ((uint32_t)0x00000014UL) 00091 #define MXC_R_GPIO_OFFS_RST_MODE_P6 ((uint32_t)0x00000018UL) 00092 #define MXC_R_GPIO_OFFS_RST_MODE_P7 ((uint32_t)0x0000001CUL) 00093 #define MXC_R_GPIO_OFFS_RST_MODE_P8 ((uint32_t)0x00000020UL) 00094 #define MXC_R_GPIO_OFFS_RST_MODE_P9 ((uint32_t)0x00000024UL) 00095 #define MXC_R_GPIO_OFFS_RST_MODE_P10 ((uint32_t)0x00000028UL) 00096 #define MXC_R_GPIO_OFFS_RST_MODE_P11 ((uint32_t)0x0000002CUL) 00097 #define MXC_R_GPIO_OFFS_RST_MODE_P12 ((uint32_t)0x00000030UL) 00098 #define MXC_R_GPIO_OFFS_RST_MODE_P13 ((uint32_t)0x00000034UL) 00099 #define MXC_R_GPIO_OFFS_RST_MODE_P14 ((uint32_t)0x00000038UL) 00100 #define MXC_R_GPIO_OFFS_RST_MODE_P15 ((uint32_t)0x0000003CUL) 00101 #define MXC_R_GPIO_OFFS_FREE_P0 ((uint32_t)0x00000040UL) 00102 #define MXC_R_GPIO_OFFS_FREE_P1 ((uint32_t)0x00000044UL) 00103 #define MXC_R_GPIO_OFFS_FREE_P2 ((uint32_t)0x00000048UL) 00104 #define MXC_R_GPIO_OFFS_FREE_P3 ((uint32_t)0x0000004CUL) 00105 #define MXC_R_GPIO_OFFS_FREE_P4 ((uint32_t)0x00000050UL) 00106 #define MXC_R_GPIO_OFFS_FREE_P5 ((uint32_t)0x00000054UL) 00107 #define MXC_R_GPIO_OFFS_FREE_P6 ((uint32_t)0x00000058UL) 00108 #define MXC_R_GPIO_OFFS_FREE_P7 ((uint32_t)0x0000005CUL) 00109 #define MXC_R_GPIO_OFFS_FREE_P8 ((uint32_t)0x00000060UL) 00110 #define MXC_R_GPIO_OFFS_FREE_P9 ((uint32_t)0x00000064UL) 00111 #define MXC_R_GPIO_OFFS_FREE_P10 ((uint32_t)0x00000068UL) 00112 #define MXC_R_GPIO_OFFS_FREE_P11 ((uint32_t)0x0000006CUL) 00113 #define MXC_R_GPIO_OFFS_FREE_P12 ((uint32_t)0x00000070UL) 00114 #define MXC_R_GPIO_OFFS_FREE_P13 ((uint32_t)0x00000074UL) 00115 #define MXC_R_GPIO_OFFS_FREE_P14 ((uint32_t)0x00000078UL) 00116 #define MXC_R_GPIO_OFFS_FREE_P15 ((uint32_t)0x0000007CUL) 00117 #define MXC_R_GPIO_OFFS_OUT_MODE_P0 ((uint32_t)0x00000080UL) 00118 #define MXC_R_GPIO_OFFS_OUT_MODE_P1 ((uint32_t)0x00000084UL) 00119 #define MXC_R_GPIO_OFFS_OUT_MODE_P2 ((uint32_t)0x00000088UL) 00120 #define MXC_R_GPIO_OFFS_OUT_MODE_P3 ((uint32_t)0x0000008CUL) 00121 #define MXC_R_GPIO_OFFS_OUT_MODE_P4 ((uint32_t)0x00000090UL) 00122 #define MXC_R_GPIO_OFFS_OUT_MODE_P5 ((uint32_t)0x00000094UL) 00123 #define MXC_R_GPIO_OFFS_OUT_MODE_P6 ((uint32_t)0x00000098UL) 00124 #define MXC_R_GPIO_OFFS_OUT_MODE_P7 ((uint32_t)0x0000009CUL) 00125 #define MXC_R_GPIO_OFFS_OUT_MODE_P8 ((uint32_t)0x000000A0UL) 00126 #define MXC_R_GPIO_OFFS_OUT_MODE_P9 ((uint32_t)0x000000A4UL) 00127 #define MXC_R_GPIO_OFFS_OUT_MODE_P10 ((uint32_t)0x000000A8UL) 00128 #define MXC_R_GPIO_OFFS_OUT_MODE_P11 ((uint32_t)0x000000ACUL) 00129 #define MXC_R_GPIO_OFFS_OUT_MODE_P12 ((uint32_t)0x000000B0UL) 00130 #define MXC_R_GPIO_OFFS_OUT_MODE_P13 ((uint32_t)0x000000B4UL) 00131 #define MXC_R_GPIO_OFFS_OUT_MODE_P14 ((uint32_t)0x000000B8UL) 00132 #define MXC_R_GPIO_OFFS_OUT_MODE_P15 ((uint32_t)0x000000BCUL) 00133 #define MXC_R_GPIO_OFFS_OUT_VAL_P0 ((uint32_t)0x000000C0UL) 00134 #define MXC_R_GPIO_OFFS_OUT_VAL_P1 ((uint32_t)0x000000C4UL) 00135 #define MXC_R_GPIO_OFFS_OUT_VAL_P2 ((uint32_t)0x000000C8UL) 00136 #define MXC_R_GPIO_OFFS_OUT_VAL_P3 ((uint32_t)0x000000CCUL) 00137 #define MXC_R_GPIO_OFFS_OUT_VAL_P4 ((uint32_t)0x000000D0UL) 00138 #define MXC_R_GPIO_OFFS_OUT_VAL_P5 ((uint32_t)0x000000D4UL) 00139 #define MXC_R_GPIO_OFFS_OUT_VAL_P6 ((uint32_t)0x000000D8UL) 00140 #define MXC_R_GPIO_OFFS_OUT_VAL_P7 ((uint32_t)0x000000DCUL) 00141 #define MXC_R_GPIO_OFFS_OUT_VAL_P8 ((uint32_t)0x000000E0UL) 00142 #define MXC_R_GPIO_OFFS_OUT_VAL_P9 ((uint32_t)0x000000E4UL) 00143 #define MXC_R_GPIO_OFFS_OUT_VAL_P10 ((uint32_t)0x000000E8UL) 00144 #define MXC_R_GPIO_OFFS_OUT_VAL_P11 ((uint32_t)0x000000ECUL) 00145 #define MXC_R_GPIO_OFFS_OUT_VAL_P12 ((uint32_t)0x000000F0UL) 00146 #define MXC_R_GPIO_OFFS_OUT_VAL_P13 ((uint32_t)0x000000F4UL) 00147 #define MXC_R_GPIO_OFFS_OUT_VAL_P14 ((uint32_t)0x000000F8UL) 00148 #define MXC_R_GPIO_OFFS_OUT_VAL_P15 ((uint32_t)0x000000FCUL) 00149 #define MXC_R_GPIO_OFFS_FUNC_SEL_P0 ((uint32_t)0x00000100UL) 00150 #define MXC_R_GPIO_OFFS_FUNC_SEL_P1 ((uint32_t)0x00000104UL) 00151 #define MXC_R_GPIO_OFFS_FUNC_SEL_P2 ((uint32_t)0x00000108UL) 00152 #define MXC_R_GPIO_OFFS_FUNC_SEL_P3 ((uint32_t)0x0000010CUL) 00153 #define MXC_R_GPIO_OFFS_FUNC_SEL_P4 ((uint32_t)0x00000110UL) 00154 #define MXC_R_GPIO_OFFS_FUNC_SEL_P5 ((uint32_t)0x00000114UL) 00155 #define MXC_R_GPIO_OFFS_FUNC_SEL_P6 ((uint32_t)0x00000118UL) 00156 #define MXC_R_GPIO_OFFS_FUNC_SEL_P7 ((uint32_t)0x0000011CUL) 00157 #define MXC_R_GPIO_OFFS_FUNC_SEL_P8 ((uint32_t)0x00000120UL) 00158 #define MXC_R_GPIO_OFFS_FUNC_SEL_P9 ((uint32_t)0x00000124UL) 00159 #define MXC_R_GPIO_OFFS_FUNC_SEL_P10 ((uint32_t)0x00000128UL) 00160 #define MXC_R_GPIO_OFFS_FUNC_SEL_P11 ((uint32_t)0x0000012CUL) 00161 #define MXC_R_GPIO_OFFS_FUNC_SEL_P12 ((uint32_t)0x00000130UL) 00162 #define MXC_R_GPIO_OFFS_FUNC_SEL_P13 ((uint32_t)0x00000134UL) 00163 #define MXC_R_GPIO_OFFS_FUNC_SEL_P14 ((uint32_t)0x00000138UL) 00164 #define MXC_R_GPIO_OFFS_FUNC_SEL_P15 ((uint32_t)0x0000013CUL) 00165 #define MXC_R_GPIO_OFFS_IN_MODE_P0 ((uint32_t)0x00000140UL) 00166 #define MXC_R_GPIO_OFFS_IN_MODE_P1 ((uint32_t)0x00000144UL) 00167 #define MXC_R_GPIO_OFFS_IN_MODE_P2 ((uint32_t)0x00000148UL) 00168 #define MXC_R_GPIO_OFFS_IN_MODE_P3 ((uint32_t)0x0000014CUL) 00169 #define MXC_R_GPIO_OFFS_IN_MODE_P4 ((uint32_t)0x00000150UL) 00170 #define MXC_R_GPIO_OFFS_IN_MODE_P5 ((uint32_t)0x00000154UL) 00171 #define MXC_R_GPIO_OFFS_IN_MODE_P6 ((uint32_t)0x00000158UL) 00172 #define MXC_R_GPIO_OFFS_IN_MODE_P7 ((uint32_t)0x0000015CUL) 00173 #define MXC_R_GPIO_OFFS_IN_MODE_P8 ((uint32_t)0x00000160UL) 00174 #define MXC_R_GPIO_OFFS_IN_MODE_P9 ((uint32_t)0x00000164UL) 00175 #define MXC_R_GPIO_OFFS_IN_MODE_P10 ((uint32_t)0x00000168UL) 00176 #define MXC_R_GPIO_OFFS_IN_MODE_P11 ((uint32_t)0x0000016CUL) 00177 #define MXC_R_GPIO_OFFS_IN_MODE_P12 ((uint32_t)0x00000170UL) 00178 #define MXC_R_GPIO_OFFS_IN_MODE_P13 ((uint32_t)0x00000174UL) 00179 #define MXC_R_GPIO_OFFS_IN_MODE_P14 ((uint32_t)0x00000178UL) 00180 #define MXC_R_GPIO_OFFS_IN_MODE_P15 ((uint32_t)0x0000017CUL) 00181 #define MXC_R_GPIO_OFFS_IN_VAL_P0 ((uint32_t)0x00000180UL) 00182 #define MXC_R_GPIO_OFFS_IN_VAL_P1 ((uint32_t)0x00000184UL) 00183 #define MXC_R_GPIO_OFFS_IN_VAL_P2 ((uint32_t)0x00000188UL) 00184 #define MXC_R_GPIO_OFFS_IN_VAL_P3 ((uint32_t)0x0000018CUL) 00185 #define MXC_R_GPIO_OFFS_IN_VAL_P4 ((uint32_t)0x00000190UL) 00186 #define MXC_R_GPIO_OFFS_IN_VAL_P5 ((uint32_t)0x00000194UL) 00187 #define MXC_R_GPIO_OFFS_IN_VAL_P6 ((uint32_t)0x00000198UL) 00188 #define MXC_R_GPIO_OFFS_IN_VAL_P7 ((uint32_t)0x0000019CUL) 00189 #define MXC_R_GPIO_OFFS_IN_VAL_P8 ((uint32_t)0x000001A0UL) 00190 #define MXC_R_GPIO_OFFS_IN_VAL_P9 ((uint32_t)0x000001A4UL) 00191 #define MXC_R_GPIO_OFFS_IN_VAL_P10 ((uint32_t)0x000001A8UL) 00192 #define MXC_R_GPIO_OFFS_IN_VAL_P11 ((uint32_t)0x000001ACUL) 00193 #define MXC_R_GPIO_OFFS_IN_VAL_P12 ((uint32_t)0x000001B0UL) 00194 #define MXC_R_GPIO_OFFS_IN_VAL_P13 ((uint32_t)0x000001B4UL) 00195 #define MXC_R_GPIO_OFFS_IN_VAL_P14 ((uint32_t)0x000001B8UL) 00196 #define MXC_R_GPIO_OFFS_IN_VAL_P15 ((uint32_t)0x000001BCUL) 00197 #define MXC_R_GPIO_OFFS_INT_MODE_P0 ((uint32_t)0x000001C0UL) 00198 #define MXC_R_GPIO_OFFS_INT_MODE_P1 ((uint32_t)0x000001C4UL) 00199 #define MXC_R_GPIO_OFFS_INT_MODE_P2 ((uint32_t)0x000001C8UL) 00200 #define MXC_R_GPIO_OFFS_INT_MODE_P3 ((uint32_t)0x000001CCUL) 00201 #define MXC_R_GPIO_OFFS_INT_MODE_P4 ((uint32_t)0x000001D0UL) 00202 #define MXC_R_GPIO_OFFS_INT_MODE_P5 ((uint32_t)0x000001D4UL) 00203 #define MXC_R_GPIO_OFFS_INT_MODE_P6 ((uint32_t)0x000001D8UL) 00204 #define MXC_R_GPIO_OFFS_INT_MODE_P7 ((uint32_t)0x000001DCUL) 00205 #define MXC_R_GPIO_OFFS_INT_MODE_P8 ((uint32_t)0x000001E0UL) 00206 #define MXC_R_GPIO_OFFS_INT_MODE_P9 ((uint32_t)0x000001E4UL) 00207 #define MXC_R_GPIO_OFFS_INT_MODE_P10 ((uint32_t)0x000001E8UL) 00208 #define MXC_R_GPIO_OFFS_INT_MODE_P11 ((uint32_t)0x000001ECUL) 00209 #define MXC_R_GPIO_OFFS_INT_MODE_P12 ((uint32_t)0x000001F0UL) 00210 #define MXC_R_GPIO_OFFS_INT_MODE_P13 ((uint32_t)0x000001F4UL) 00211 #define MXC_R_GPIO_OFFS_INT_MODE_P14 ((uint32_t)0x000001F8UL) 00212 #define MXC_R_GPIO_OFFS_INT_MODE_P15 ((uint32_t)0x000001FCUL) 00213 #define MXC_R_GPIO_OFFS_INTFL_P0 ((uint32_t)0x00000200UL) 00214 #define MXC_R_GPIO_OFFS_INTFL_P1 ((uint32_t)0x00000204UL) 00215 #define MXC_R_GPIO_OFFS_INTFL_P2 ((uint32_t)0x00000208UL) 00216 #define MXC_R_GPIO_OFFS_INTFL_P3 ((uint32_t)0x0000020CUL) 00217 #define MXC_R_GPIO_OFFS_INTFL_P4 ((uint32_t)0x00000210UL) 00218 #define MXC_R_GPIO_OFFS_INTFL_P5 ((uint32_t)0x00000214UL) 00219 #define MXC_R_GPIO_OFFS_INTFL_P6 ((uint32_t)0x00000218UL) 00220 #define MXC_R_GPIO_OFFS_INTFL_P7 ((uint32_t)0x0000021CUL) 00221 #define MXC_R_GPIO_OFFS_INTFL_P8 ((uint32_t)0x00000220UL) 00222 #define MXC_R_GPIO_OFFS_INTFL_P9 ((uint32_t)0x00000224UL) 00223 #define MXC_R_GPIO_OFFS_INTFL_P10 ((uint32_t)0x00000228UL) 00224 #define MXC_R_GPIO_OFFS_INTFL_P11 ((uint32_t)0x0000022CUL) 00225 #define MXC_R_GPIO_OFFS_INTFL_P12 ((uint32_t)0x00000230UL) 00226 #define MXC_R_GPIO_OFFS_INTFL_P13 ((uint32_t)0x00000234UL) 00227 #define MXC_R_GPIO_OFFS_INTFL_P14 ((uint32_t)0x00000238UL) 00228 #define MXC_R_GPIO_OFFS_INTFL_P15 ((uint32_t)0x0000023CUL) 00229 #define MXC_R_GPIO_OFFS_INTEN_P0 ((uint32_t)0x00000240UL) 00230 #define MXC_R_GPIO_OFFS_INTEN_P1 ((uint32_t)0x00000244UL) 00231 #define MXC_R_GPIO_OFFS_INTEN_P2 ((uint32_t)0x00000248UL) 00232 #define MXC_R_GPIO_OFFS_INTEN_P3 ((uint32_t)0x0000024CUL) 00233 #define MXC_R_GPIO_OFFS_INTEN_P4 ((uint32_t)0x00000250UL) 00234 #define MXC_R_GPIO_OFFS_INTEN_P5 ((uint32_t)0x00000254UL) 00235 #define MXC_R_GPIO_OFFS_INTEN_P6 ((uint32_t)0x00000258UL) 00236 #define MXC_R_GPIO_OFFS_INTEN_P7 ((uint32_t)0x0000025CUL) 00237 #define MXC_R_GPIO_OFFS_INTEN_P8 ((uint32_t)0x00000260UL) 00238 #define MXC_R_GPIO_OFFS_INTEN_P9 ((uint32_t)0x00000264UL) 00239 #define MXC_R_GPIO_OFFS_INTEN_P10 ((uint32_t)0x00000268UL) 00240 #define MXC_R_GPIO_OFFS_INTEN_P11 ((uint32_t)0x0000026CUL) 00241 #define MXC_R_GPIO_OFFS_INTEN_P12 ((uint32_t)0x00000270UL) 00242 #define MXC_R_GPIO_OFFS_INTEN_P13 ((uint32_t)0x00000274UL) 00243 #define MXC_R_GPIO_OFFS_INTEN_P14 ((uint32_t)0x00000278UL) 00244 #define MXC_R_GPIO_OFFS_INTEN_P15 ((uint32_t)0x0000027CUL) 00245 00246 00247 /* 00248 Field positions and masks for module GPIO. 00249 */ 00250 00251 #define MXC_F_GPIO_RST_MODE_PIN0_POS 0 00252 #define MXC_F_GPIO_RST_MODE_PIN0 ((uint32_t)(0x00000007UL << MXC_F_GPIO_RST_MODE_PIN0_POS)) 00253 #define MXC_F_GPIO_RST_MODE_PIN1_POS 4 00254 #define MXC_F_GPIO_RST_MODE_PIN1 ((uint32_t)(0x00000007UL << MXC_F_GPIO_RST_MODE_PIN1_POS)) 00255 #define MXC_F_GPIO_RST_MODE_PIN2_POS 8 00256 #define MXC_F_GPIO_RST_MODE_PIN2 ((uint32_t)(0x00000007UL << MXC_F_GPIO_RST_MODE_PIN2_POS)) 00257 #define MXC_F_GPIO_RST_MODE_PIN3_POS 12 00258 #define MXC_F_GPIO_RST_MODE_PIN3 ((uint32_t)(0x00000007UL << MXC_F_GPIO_RST_MODE_PIN3_POS)) 00259 #define MXC_F_GPIO_RST_MODE_PIN4_POS 16 00260 #define MXC_F_GPIO_RST_MODE_PIN4 ((uint32_t)(0x00000007UL << MXC_F_GPIO_RST_MODE_PIN4_POS)) 00261 #define MXC_F_GPIO_RST_MODE_PIN5_POS 20 00262 #define MXC_F_GPIO_RST_MODE_PIN5 ((uint32_t)(0x00000007UL << MXC_F_GPIO_RST_MODE_PIN5_POS)) 00263 #define MXC_F_GPIO_RST_MODE_PIN6_POS 24 00264 #define MXC_F_GPIO_RST_MODE_PIN6 ((uint32_t)(0x00000007UL << MXC_F_GPIO_RST_MODE_PIN6_POS)) 00265 #define MXC_F_GPIO_RST_MODE_PIN7_POS 28 00266 #define MXC_F_GPIO_RST_MODE_PIN7 ((uint32_t)(0x00000007UL << MXC_F_GPIO_RST_MODE_PIN7_POS)) 00267 00268 #define MXC_F_GPIO_FREE_PIN0_POS 0 00269 #define MXC_F_GPIO_FREE_PIN0 ((uint32_t)(0x00000001UL << MXC_F_GPIO_FREE_PIN0_POS)) 00270 #define MXC_F_GPIO_FREE_PIN1_POS 1 00271 #define MXC_F_GPIO_FREE_PIN1 ((uint32_t)(0x00000001UL << MXC_F_GPIO_FREE_PIN1_POS)) 00272 #define MXC_F_GPIO_FREE_PIN2_POS 2 00273 #define MXC_F_GPIO_FREE_PIN2 ((uint32_t)(0x00000001UL << MXC_F_GPIO_FREE_PIN2_POS)) 00274 #define MXC_F_GPIO_FREE_PIN3_POS 3 00275 #define MXC_F_GPIO_FREE_PIN3 ((uint32_t)(0x00000001UL << MXC_F_GPIO_FREE_PIN3_POS)) 00276 #define MXC_F_GPIO_FREE_PIN4_POS 4 00277 #define MXC_F_GPIO_FREE_PIN4 ((uint32_t)(0x00000001UL << MXC_F_GPIO_FREE_PIN4_POS)) 00278 #define MXC_F_GPIO_FREE_PIN5_POS 5 00279 #define MXC_F_GPIO_FREE_PIN5 ((uint32_t)(0x00000001UL << MXC_F_GPIO_FREE_PIN5_POS)) 00280 #define MXC_F_GPIO_FREE_PIN6_POS 6 00281 #define MXC_F_GPIO_FREE_PIN6 ((uint32_t)(0x00000001UL << MXC_F_GPIO_FREE_PIN6_POS)) 00282 #define MXC_F_GPIO_FREE_PIN7_POS 7 00283 #define MXC_F_GPIO_FREE_PIN7 ((uint32_t)(0x00000001UL << MXC_F_GPIO_FREE_PIN7_POS)) 00284 00285 #define MXC_F_GPIO_OUT_MODE_PIN0_POS 0 00286 #define MXC_F_GPIO_OUT_MODE_PIN0 ((uint32_t)(0x0000000FUL << MXC_F_GPIO_OUT_MODE_PIN0_POS)) 00287 #define MXC_F_GPIO_OUT_MODE_PIN1_POS 4 00288 #define MXC_F_GPIO_OUT_MODE_PIN1 ((uint32_t)(0x0000000FUL << MXC_F_GPIO_OUT_MODE_PIN1_POS)) 00289 #define MXC_F_GPIO_OUT_MODE_PIN2_POS 8 00290 #define MXC_F_GPIO_OUT_MODE_PIN2 ((uint32_t)(0x0000000FUL << MXC_F_GPIO_OUT_MODE_PIN2_POS)) 00291 #define MXC_F_GPIO_OUT_MODE_PIN3_POS 12 00292 #define MXC_F_GPIO_OUT_MODE_PIN3 ((uint32_t)(0x0000000FUL << MXC_F_GPIO_OUT_MODE_PIN3_POS)) 00293 #define MXC_F_GPIO_OUT_MODE_PIN4_POS 16 00294 #define MXC_F_GPIO_OUT_MODE_PIN4 ((uint32_t)(0x0000000FUL << MXC_F_GPIO_OUT_MODE_PIN4_POS)) 00295 #define MXC_F_GPIO_OUT_MODE_PIN5_POS 20 00296 #define MXC_F_GPIO_OUT_MODE_PIN5 ((uint32_t)(0x0000000FUL << MXC_F_GPIO_OUT_MODE_PIN5_POS)) 00297 #define MXC_F_GPIO_OUT_MODE_PIN6_POS 24 00298 #define MXC_F_GPIO_OUT_MODE_PIN6 ((uint32_t)(0x0000000FUL << MXC_F_GPIO_OUT_MODE_PIN6_POS)) 00299 #define MXC_F_GPIO_OUT_MODE_PIN7_POS 28 00300 #define MXC_F_GPIO_OUT_MODE_PIN7 ((uint32_t)(0x0000000FUL << MXC_F_GPIO_OUT_MODE_PIN7_POS)) 00301 00302 #define MXC_F_GPIO_OUT_VAL_PIN0_POS 0 00303 #define MXC_F_GPIO_OUT_VAL_PIN0 ((uint32_t)(0x00000001UL << MXC_F_GPIO_OUT_VAL_PIN0_POS)) 00304 #define MXC_F_GPIO_OUT_VAL_PIN1_POS 1 00305 #define MXC_F_GPIO_OUT_VAL_PIN1 ((uint32_t)(0x00000001UL << MXC_F_GPIO_OUT_VAL_PIN1_POS)) 00306 #define MXC_F_GPIO_OUT_VAL_PIN2_POS 2 00307 #define MXC_F_GPIO_OUT_VAL_PIN2 ((uint32_t)(0x00000001UL << MXC_F_GPIO_OUT_VAL_PIN2_POS)) 00308 #define MXC_F_GPIO_OUT_VAL_PIN3_POS 3 00309 #define MXC_F_GPIO_OUT_VAL_PIN3 ((uint32_t)(0x00000001UL << MXC_F_GPIO_OUT_VAL_PIN3_POS)) 00310 #define MXC_F_GPIO_OUT_VAL_PIN4_POS 4 00311 #define MXC_F_GPIO_OUT_VAL_PIN4 ((uint32_t)(0x00000001UL << MXC_F_GPIO_OUT_VAL_PIN4_POS)) 00312 #define MXC_F_GPIO_OUT_VAL_PIN5_POS 5 00313 #define MXC_F_GPIO_OUT_VAL_PIN5 ((uint32_t)(0x00000001UL << MXC_F_GPIO_OUT_VAL_PIN5_POS)) 00314 #define MXC_F_GPIO_OUT_VAL_PIN6_POS 6 00315 #define MXC_F_GPIO_OUT_VAL_PIN6 ((uint32_t)(0x00000001UL << MXC_F_GPIO_OUT_VAL_PIN6_POS)) 00316 #define MXC_F_GPIO_OUT_VAL_PIN7_POS 7 00317 #define MXC_F_GPIO_OUT_VAL_PIN7 ((uint32_t)(0x00000001UL << MXC_F_GPIO_OUT_VAL_PIN7_POS)) 00318 00319 #define MXC_F_GPIO_FUNC_SEL_PIN0_POS 0 00320 #define MXC_F_GPIO_FUNC_SEL_PIN0 ((uint32_t)(0x0000000FUL << MXC_F_GPIO_FUNC_SEL_PIN0_POS)) 00321 #define MXC_F_GPIO_FUNC_SEL_PIN1_POS 4 00322 #define MXC_F_GPIO_FUNC_SEL_PIN1 ((uint32_t)(0x0000000FUL << MXC_F_GPIO_FUNC_SEL_PIN1_POS)) 00323 #define MXC_F_GPIO_FUNC_SEL_PIN2_POS 8 00324 #define MXC_F_GPIO_FUNC_SEL_PIN2 ((uint32_t)(0x0000000FUL << MXC_F_GPIO_FUNC_SEL_PIN2_POS)) 00325 #define MXC_F_GPIO_FUNC_SEL_PIN3_POS 12 00326 #define MXC_F_GPIO_FUNC_SEL_PIN3 ((uint32_t)(0x0000000FUL << MXC_F_GPIO_FUNC_SEL_PIN3_POS)) 00327 #define MXC_F_GPIO_FUNC_SEL_PIN4_POS 16 00328 #define MXC_F_GPIO_FUNC_SEL_PIN4 ((uint32_t)(0x0000000FUL << MXC_F_GPIO_FUNC_SEL_PIN4_POS)) 00329 #define MXC_F_GPIO_FUNC_SEL_PIN5_POS 20 00330 #define MXC_F_GPIO_FUNC_SEL_PIN5 ((uint32_t)(0x0000000FUL << MXC_F_GPIO_FUNC_SEL_PIN5_POS)) 00331 #define MXC_F_GPIO_FUNC_SEL_PIN6_POS 24 00332 #define MXC_F_GPIO_FUNC_SEL_PIN6 ((uint32_t)(0x0000000FUL << MXC_F_GPIO_FUNC_SEL_PIN6_POS)) 00333 #define MXC_F_GPIO_FUNC_SEL_PIN7_POS 28 00334 #define MXC_F_GPIO_FUNC_SEL_PIN7 ((uint32_t)(0x0000000FUL << MXC_F_GPIO_FUNC_SEL_PIN7_POS)) 00335 00336 #define MXC_F_GPIO_IN_MODE_PIN0_POS 0 00337 #define MXC_F_GPIO_IN_MODE_PIN0 ((uint32_t)(0x00000003UL << MXC_F_GPIO_IN_MODE_PIN0_POS)) 00338 #define MXC_F_GPIO_IN_MODE_PIN1_POS 4 00339 #define MXC_F_GPIO_IN_MODE_PIN1 ((uint32_t)(0x00000003UL << MXC_F_GPIO_IN_MODE_PIN1_POS)) 00340 #define MXC_F_GPIO_IN_MODE_PIN2_POS 8 00341 #define MXC_F_GPIO_IN_MODE_PIN2 ((uint32_t)(0x00000003UL << MXC_F_GPIO_IN_MODE_PIN2_POS)) 00342 #define MXC_F_GPIO_IN_MODE_PIN3_POS 12 00343 #define MXC_F_GPIO_IN_MODE_PIN3 ((uint32_t)(0x00000003UL << MXC_F_GPIO_IN_MODE_PIN3_POS)) 00344 #define MXC_F_GPIO_IN_MODE_PIN4_POS 16 00345 #define MXC_F_GPIO_IN_MODE_PIN4 ((uint32_t)(0x00000003UL << MXC_F_GPIO_IN_MODE_PIN4_POS)) 00346 #define MXC_F_GPIO_IN_MODE_PIN5_POS 20 00347 #define MXC_F_GPIO_IN_MODE_PIN5 ((uint32_t)(0x00000003UL << MXC_F_GPIO_IN_MODE_PIN5_POS)) 00348 #define MXC_F_GPIO_IN_MODE_PIN6_POS 24 00349 #define MXC_F_GPIO_IN_MODE_PIN6 ((uint32_t)(0x00000003UL << MXC_F_GPIO_IN_MODE_PIN6_POS)) 00350 #define MXC_F_GPIO_IN_MODE_PIN7_POS 28 00351 #define MXC_F_GPIO_IN_MODE_PIN7 ((uint32_t)(0x00000003UL << MXC_F_GPIO_IN_MODE_PIN7_POS)) 00352 00353 #define MXC_F_GPIO_IN_VAL_PIN0_POS 0 00354 #define MXC_F_GPIO_IN_VAL_PIN0 ((uint32_t)(0x00000001UL << MXC_F_GPIO_IN_VAL_PIN0_POS)) 00355 #define MXC_F_GPIO_IN_VAL_PIN1_POS 1 00356 #define MXC_F_GPIO_IN_VAL_PIN1 ((uint32_t)(0x00000001UL << MXC_F_GPIO_IN_VAL_PIN1_POS)) 00357 #define MXC_F_GPIO_IN_VAL_PIN2_POS 2 00358 #define MXC_F_GPIO_IN_VAL_PIN2 ((uint32_t)(0x00000001UL << MXC_F_GPIO_IN_VAL_PIN2_POS)) 00359 #define MXC_F_GPIO_IN_VAL_PIN3_POS 3 00360 #define MXC_F_GPIO_IN_VAL_PIN3 ((uint32_t)(0x00000001UL << MXC_F_GPIO_IN_VAL_PIN3_POS)) 00361 #define MXC_F_GPIO_IN_VAL_PIN4_POS 4 00362 #define MXC_F_GPIO_IN_VAL_PIN4 ((uint32_t)(0x00000001UL << MXC_F_GPIO_IN_VAL_PIN4_POS)) 00363 #define MXC_F_GPIO_IN_VAL_PIN5_POS 5 00364 #define MXC_F_GPIO_IN_VAL_PIN5 ((uint32_t)(0x00000001UL << MXC_F_GPIO_IN_VAL_PIN5_POS)) 00365 #define MXC_F_GPIO_IN_VAL_PIN6_POS 6 00366 #define MXC_F_GPIO_IN_VAL_PIN6 ((uint32_t)(0x00000001UL << MXC_F_GPIO_IN_VAL_PIN6_POS)) 00367 #define MXC_F_GPIO_IN_VAL_PIN7_POS 7 00368 #define MXC_F_GPIO_IN_VAL_PIN7 ((uint32_t)(0x00000001UL << MXC_F_GPIO_IN_VAL_PIN7_POS)) 00369 00370 #define MXC_F_GPIO_INT_MODE_PIN0_POS 0 00371 #define MXC_F_GPIO_INT_MODE_PIN0 ((uint32_t)(0x00000007UL << MXC_F_GPIO_INT_MODE_PIN0_POS)) 00372 #define MXC_F_GPIO_INT_MODE_PIN1_POS 4 00373 #define MXC_F_GPIO_INT_MODE_PIN1 ((uint32_t)(0x00000007UL << MXC_F_GPIO_INT_MODE_PIN1_POS)) 00374 #define MXC_F_GPIO_INT_MODE_PIN2_POS 8 00375 #define MXC_F_GPIO_INT_MODE_PIN2 ((uint32_t)(0x00000007UL << MXC_F_GPIO_INT_MODE_PIN2_POS)) 00376 #define MXC_F_GPIO_INT_MODE_PIN3_POS 12 00377 #define MXC_F_GPIO_INT_MODE_PIN3 ((uint32_t)(0x00000007UL << MXC_F_GPIO_INT_MODE_PIN3_POS)) 00378 #define MXC_F_GPIO_INT_MODE_PIN4_POS 16 00379 #define MXC_F_GPIO_INT_MODE_PIN4 ((uint32_t)(0x00000007UL << MXC_F_GPIO_INT_MODE_PIN4_POS)) 00380 #define MXC_F_GPIO_INT_MODE_PIN5_POS 20 00381 #define MXC_F_GPIO_INT_MODE_PIN5 ((uint32_t)(0x00000007UL << MXC_F_GPIO_INT_MODE_PIN5_POS)) 00382 #define MXC_F_GPIO_INT_MODE_PIN6_POS 24 00383 #define MXC_F_GPIO_INT_MODE_PIN6 ((uint32_t)(0x00000007UL << MXC_F_GPIO_INT_MODE_PIN6_POS)) 00384 #define MXC_F_GPIO_INT_MODE_PIN7_POS 28 00385 #define MXC_F_GPIO_INT_MODE_PIN7 ((uint32_t)(0x00000007UL << MXC_F_GPIO_INT_MODE_PIN7_POS)) 00386 00387 #define MXC_F_GPIO_INTFL_PIN0_POS 0 00388 #define MXC_F_GPIO_INTFL_PIN0 ((uint32_t)(0x00000001UL << MXC_F_GPIO_INTFL_PIN0_POS)) 00389 #define MXC_F_GPIO_INTFL_PIN1_POS 1 00390 #define MXC_F_GPIO_INTFL_PIN1 ((uint32_t)(0x00000001UL << MXC_F_GPIO_INTFL_PIN1_POS)) 00391 #define MXC_F_GPIO_INTFL_PIN2_POS 2 00392 #define MXC_F_GPIO_INTFL_PIN2 ((uint32_t)(0x00000001UL << MXC_F_GPIO_INTFL_PIN2_POS)) 00393 #define MXC_F_GPIO_INTFL_PIN3_POS 3 00394 #define MXC_F_GPIO_INTFL_PIN3 ((uint32_t)(0x00000001UL << MXC_F_GPIO_INTFL_PIN3_POS)) 00395 #define MXC_F_GPIO_INTFL_PIN4_POS 4 00396 #define MXC_F_GPIO_INTFL_PIN4 ((uint32_t)(0x00000001UL << MXC_F_GPIO_INTFL_PIN4_POS)) 00397 #define MXC_F_GPIO_INTFL_PIN5_POS 5 00398 #define MXC_F_GPIO_INTFL_PIN5 ((uint32_t)(0x00000001UL << MXC_F_GPIO_INTFL_PIN5_POS)) 00399 #define MXC_F_GPIO_INTFL_PIN6_POS 6 00400 #define MXC_F_GPIO_INTFL_PIN6 ((uint32_t)(0x00000001UL << MXC_F_GPIO_INTFL_PIN6_POS)) 00401 #define MXC_F_GPIO_INTFL_PIN7_POS 7 00402 #define MXC_F_GPIO_INTFL_PIN7 ((uint32_t)(0x00000001UL << MXC_F_GPIO_INTFL_PIN7_POS)) 00403 00404 #define MXC_F_GPIO_INTEN_PIN0_POS 0 00405 #define MXC_F_GPIO_INTEN_PIN0 ((uint32_t)(0x00000001UL << MXC_F_GPIO_INTEN_PIN0_POS)) 00406 #define MXC_F_GPIO_INTEN_PIN1_POS 1 00407 #define MXC_F_GPIO_INTEN_PIN1 ((uint32_t)(0x00000001UL << MXC_F_GPIO_INTEN_PIN1_POS)) 00408 #define MXC_F_GPIO_INTEN_PIN2_POS 2 00409 #define MXC_F_GPIO_INTEN_PIN2 ((uint32_t)(0x00000001UL << MXC_F_GPIO_INTEN_PIN2_POS)) 00410 #define MXC_F_GPIO_INTEN_PIN3_POS 3 00411 #define MXC_F_GPIO_INTEN_PIN3 ((uint32_t)(0x00000001UL << MXC_F_GPIO_INTEN_PIN3_POS)) 00412 #define MXC_F_GPIO_INTEN_PIN4_POS 4 00413 #define MXC_F_GPIO_INTEN_PIN4 ((uint32_t)(0x00000001UL << MXC_F_GPIO_INTEN_PIN4_POS)) 00414 #define MXC_F_GPIO_INTEN_PIN5_POS 5 00415 #define MXC_F_GPIO_INTEN_PIN5 ((uint32_t)(0x00000001UL << MXC_F_GPIO_INTEN_PIN5_POS)) 00416 #define MXC_F_GPIO_INTEN_PIN6_POS 6 00417 #define MXC_F_GPIO_INTEN_PIN6 ((uint32_t)(0x00000001UL << MXC_F_GPIO_INTEN_PIN6_POS)) 00418 #define MXC_F_GPIO_INTEN_PIN7_POS 7 00419 #define MXC_F_GPIO_INTEN_PIN7 ((uint32_t)(0x00000001UL << MXC_F_GPIO_INTEN_PIN7_POS)) 00420 00421 00422 00423 /* 00424 Field values and shifted values for module GPIO. 00425 */ 00426 00427 #define MXC_V_GPIO_RST_MODE_DRIVE_0 ((uint32_t)(0x00000000UL)) 00428 #define MXC_V_GPIO_RST_MODE_WEAK_PULLDOWN ((uint32_t)(0x00000001UL)) 00429 #define MXC_V_GPIO_RST_MODE_WEAK_PULLUP ((uint32_t)(0x00000002UL)) 00430 #define MXC_V_GPIO_RST_MODE_DRIVE_1 ((uint32_t)(0x00000003UL)) 00431 #define MXC_V_GPIO_RST_MODE_HIGH_Z ((uint32_t)(0x00000004UL)) 00432 00433 #define MXC_V_GPIO_FREE_NOT_AVAILABLE ((uint32_t)(0x00000000UL)) 00434 #define MXC_V_GPIO_FREE_AVAILABLE ((uint32_t)(0x00000001UL)) 00435 00436 #define MXC_V_GPIO_OUT_MODE_HIGH_Z_WEAK_PULLUP ((uint32_t)(0x00000000UL)) 00437 #define MXC_V_GPIO_OUT_MODE_OPEN_DRAIN ((uint32_t)(0x00000001UL)) 00438 #define MXC_V_GPIO_OUT_MODE_OPEN_DRAIN_WEAK_PULLUP ((uint32_t)(0x00000002UL)) 00439 #define MXC_V_GPIO_OUT_MODE_NORMAL_HIGH_Z ((uint32_t)(0x00000004UL)) 00440 #define MXC_V_GPIO_OUT_MODE_NORMAL ((uint32_t)(0x00000005UL)) 00441 #define MXC_V_GPIO_OUT_MODE_SLOW_HIGH_Z ((uint32_t)(0x00000006UL)) 00442 #define MXC_V_GPIO_OUT_MODE_SLOW_DRIVE ((uint32_t)(0x00000007UL)) 00443 #define MXC_V_GPIO_OUT_MODE_FAST_HIGH_Z ((uint32_t)(0x00000008UL)) 00444 #define MXC_V_GPIO_OUT_MODE_FAST_DRIVE ((uint32_t)(0x00000009UL)) 00445 #define MXC_V_GPIO_OUT_MODE_HIGH_Z_WEAK_PULLDOWN ((uint32_t)(0x0000000AUL)) 00446 #define MXC_V_GPIO_OUT_MODE_OPEN_SOURCE ((uint32_t)(0x0000000BUL)) 00447 #define MXC_V_GPIO_OUT_MODE_OPEN_SOURCE_WEAK_PULLDOWN ((uint32_t)(0x0000000CUL)) 00448 #define MXC_V_GPIO_OUT_MODE_HIGH_Z_INPUT_DISABLED ((uint32_t)(0x0000000FUL)) 00449 00450 #define MXC_V_GPIO_FUNC_SEL_MODE_GPIO ((uint32_t)(0x00000000UL)) 00451 #define MXC_V_GPIO_FUNC_SEL_MODE_PT ((uint32_t)(0x00000001UL)) 00452 #define MXC_V_GPIO_FUNC_SEL_MODE_TMR ((uint32_t)(0x00000002UL)) 00453 00454 #define MXC_V_GPIO_IN_MODE_NORMAL ((uint32_t)(0x00000000UL)) 00455 #define MXC_V_GPIO_IN_MODE_INVERTED ((uint32_t)(0x00000001UL)) 00456 #define MXC_V_GPIO_IN_MODE_ALWAYS_ZERO ((uint32_t)(0x00000002UL)) 00457 #define MXC_V_GPIO_IN_MODE_ALWAYS_ONE ((uint32_t)(0x00000003UL)) 00458 00459 #define MXC_V_GPIO_INT_MODE_DISABLE ((uint32_t)(0x00000000UL)) 00460 #define MXC_V_GPIO_INT_MODE_FALLING_EDGE ((uint32_t)(0x00000001UL)) 00461 #define MXC_V_GPIO_INT_MODE_RISING_EDGE ((uint32_t)(0x00000002UL)) 00462 #define MXC_V_GPIO_INT_MODE_ANY_EDGE ((uint32_t)(0x00000003UL)) 00463 #define MXC_V_GPIO_INT_MODE_LOW_LVL ((uint32_t)(0x00000004UL)) 00464 #define MXC_V_GPIO_INT_MODE_HIGH_LVL ((uint32_t)(0x00000005UL)) 00465 00466 00467 00468 #ifdef __cplusplus 00469 } 00470 #endif 00471 00472 #endif /* _MXC_GPIO_REGS_H_ */
Generated on Tue Jul 12 2022 15:37:18 by
