1 /****************************************************************************** 2 * Filename: hw_aux_aiodio_h 3 * Revised: 2015-11-12 13:07:02 +0100 (Thu, 12 Nov 2015) 4 * Revision: 45056 5 * 6 * Copyright (c) 2015, Texas Instruments Incorporated 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * 1) Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * 15 * 2) Redistributions in binary form must reproduce the above copyright notice, 16 * this list of conditions and the following disclaimer in the documentation 17 * and/or other materials provided with the distribution. 18 * 19 * 3) Neither the name of the ORGANIZATION nor the names of its contributors may 20 * be used to endorse or promote products derived from this software without 21 * specific prior written permission. 22 * 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 * POSSIBILITY OF SUCH DAMAGE. 34 * 35 ******************************************************************************/ 36 37 #ifndef __HW_AUX_AIODIO_H__ 38 #define __HW_AUX_AIODIO_H__ 39 40 //***************************************************************************** 41 // 42 // This section defines the register offsets of 43 // AUX_AIODIO component 44 // 45 //***************************************************************************** 46 // General Purpose Input/Output Data Out 47 #define AUX_AIODIO_O_GPIODOUT 0x00000000 48 49 // Input Output Mode 50 #define AUX_AIODIO_O_IOMODE 0x00000004 51 52 // General Purpose Input Output Data In 53 #define AUX_AIODIO_O_GPIODIN 0x00000008 54 55 // General Purpose Input Output Data Out Set 56 #define AUX_AIODIO_O_GPIODOUTSET 0x0000000C 57 58 // General Purpose Input Output Data Out Clear 59 #define AUX_AIODIO_O_GPIODOUTCLR 0x00000010 60 61 // General Purpose Input Output Data Out Toggle 62 #define AUX_AIODIO_O_GPIODOUTTGL 0x00000014 63 64 // General Purpose Input Output Input Enable 65 #define AUX_AIODIO_O_GPIODIE 0x00000018 66 67 //***************************************************************************** 68 // 69 // Register: AUX_AIODIO_O_GPIODOUT 70 // 71 //***************************************************************************** 72 // Field: [7:0] IO7_0 73 // 74 // Output values for AUXIO0 through AUXIO7 (for AIODIO0) or AUXIO8 through 75 // AUXIO15 (for AIODIO1). 76 #define AUX_AIODIO_GPIODOUT_IO7_0_W 8 77 #define AUX_AIODIO_GPIODOUT_IO7_0_M 0x000000FF 78 #define AUX_AIODIO_GPIODOUT_IO7_0_S 0 79 80 //***************************************************************************** 81 // 82 // Register: AUX_AIODIO_O_IOMODE 83 // 84 //***************************************************************************** 85 // Field: [15:14] IO7 86 // 87 // Selects mode for AUXIO7 (for AIODIO0) or AUXIO15 (for AIODIO1). 88 // ENUMs: 89 // OPEN_SOURCE Open-source: The pin is driven high when the 90 // corresponding GPIODOUT bit is 1, and otherwise 91 // tri-stated or pulled depending on the 92 // corresponding IOC configuration. 93 // OPEN_DRAIN Open-drain: The pin is driven low when the 94 // corresponding GPIODOUT bit is 0, and otherwise 95 // tri-stated or pulled depending on the 96 // corresponding IOC configuration. 97 // IN Digital input with GPIODIE bit 7 = 1 98 // Analog input/output with 99 // GPIODIE bit 7 = 0 100 // OUT Output 101 #define AUX_AIODIO_IOMODE_IO7_W 2 102 #define AUX_AIODIO_IOMODE_IO7_M 0x0000C000 103 #define AUX_AIODIO_IOMODE_IO7_S 14 104 #define AUX_AIODIO_IOMODE_IO7_OPEN_SOURCE 0x0000C000 105 #define AUX_AIODIO_IOMODE_IO7_OPEN_DRAIN 0x00008000 106 #define AUX_AIODIO_IOMODE_IO7_IN 0x00004000 107 #define AUX_AIODIO_IOMODE_IO7_OUT 0x00000000 108 109 // Field: [13:12] IO6 110 // 111 // Selects mode for AUXIO6 (for AIODIO0) or AUXIO14 (for AIODIO1). 112 // ENUMs: 113 // OPEN_SOURCE Open-source: The pin is driven high when the 114 // corresponding GPIODOUT bit is 1, and otherwise 115 // tri-stated or pulled depending on the 116 // corresponding IOC configuration. 117 // OPEN_DRAIN Open-drain: The pin is driven low when the 118 // corresponding GPIODOUT bit is 0, and otherwise 119 // tri-stated or pulled depending on the 120 // corresponding IOC configuration. 121 // IN Digital input with GPIODIE bit 6 = 1 122 // Analog input/output with 123 // GPIODIE bit 6 = 0 124 // OUT Output 125 #define AUX_AIODIO_IOMODE_IO6_W 2 126 #define AUX_AIODIO_IOMODE_IO6_M 0x00003000 127 #define AUX_AIODIO_IOMODE_IO6_S 12 128 #define AUX_AIODIO_IOMODE_IO6_OPEN_SOURCE 0x00003000 129 #define AUX_AIODIO_IOMODE_IO6_OPEN_DRAIN 0x00002000 130 #define AUX_AIODIO_IOMODE_IO6_IN 0x00001000 131 #define AUX_AIODIO_IOMODE_IO6_OUT 0x00000000 132 133 // Field: [11:10] IO5 134 // 135 // Selects mode for AUXIO5 (for AIODIO0) or AUXIO13 (for AIODIO1). 136 // ENUMs: 137 // OPEN_SOURCE Open-source: The pin is driven high when the 138 // corresponding GPIODOUT bit is 1, and otherwise 139 // tri-stated or pulled depending on the 140 // corresponding IOC configuration. 141 // OPEN_DRAIN Open-drain: The pin is driven low when the 142 // corresponding GPIODOUT bit is 0, and otherwise 143 // tri-stated or pulled depending on the 144 // corresponding IOC configuration. 145 // IN Digital input with GPIODIE bit 5 = 1 146 // Analog input/output with 147 // GPIODIE bit 5 = 0 148 // OUT Output 149 #define AUX_AIODIO_IOMODE_IO5_W 2 150 #define AUX_AIODIO_IOMODE_IO5_M 0x00000C00 151 #define AUX_AIODIO_IOMODE_IO5_S 10 152 #define AUX_AIODIO_IOMODE_IO5_OPEN_SOURCE 0x00000C00 153 #define AUX_AIODIO_IOMODE_IO5_OPEN_DRAIN 0x00000800 154 #define AUX_AIODIO_IOMODE_IO5_IN 0x00000400 155 #define AUX_AIODIO_IOMODE_IO5_OUT 0x00000000 156 157 // Field: [9:8] IO4 158 // 159 // Selects mode for AUXIO4 (for AIODIO0) or AUXIO12 (for AIODIO1). 160 // ENUMs: 161 // OPEN_SOURCE Open-source: The pin is driven high when the 162 // corresponding GPIODOUT bit is 1, and otherwise 163 // tri-stated or pulled depending on the 164 // corresponding IOC configuration. 165 // OPEN_DRAIN Open-drain: The pin is driven low when the 166 // corresponding GPIODOUT bit is 0, and otherwise 167 // tri-stated or pulled depending on the 168 // corresponding IOC configuration. 169 // IN Digital input with GPIODIE bit 4 = 1 170 // Analog input/output with 171 // GPIODIE bit 4 = 0 172 // OUT Output 173 #define AUX_AIODIO_IOMODE_IO4_W 2 174 #define AUX_AIODIO_IOMODE_IO4_M 0x00000300 175 #define AUX_AIODIO_IOMODE_IO4_S 8 176 #define AUX_AIODIO_IOMODE_IO4_OPEN_SOURCE 0x00000300 177 #define AUX_AIODIO_IOMODE_IO4_OPEN_DRAIN 0x00000200 178 #define AUX_AIODIO_IOMODE_IO4_IN 0x00000100 179 #define AUX_AIODIO_IOMODE_IO4_OUT 0x00000000 180 181 // Field: [7:6] IO3 182 // 183 // Selects mode for AUXIO3 (for AIODIO0) or AUXIO11 (for AIODIO1). 184 // ENUMs: 185 // OPEN_SOURCE Open-source: The pin is driven high when the 186 // corresponding GPIODOUT bit is 1, and otherwise 187 // tri-stated or pulled depending on the 188 // corresponding IOC configuration. 189 // OPEN_DRAIN Open-drain: The pin is driven low when the 190 // corresponding GPIODOUT bit is 0, and otherwise 191 // tri-stated or pulled depending on the 192 // corresponding IOC configuration. 193 // IN Digital input with GPIODIE bit 3 = 1 194 // Analog input/output with 195 // GPIODIE bit 3 = 0 196 // OUT Output 197 #define AUX_AIODIO_IOMODE_IO3_W 2 198 #define AUX_AIODIO_IOMODE_IO3_M 0x000000C0 199 #define AUX_AIODIO_IOMODE_IO3_S 6 200 #define AUX_AIODIO_IOMODE_IO3_OPEN_SOURCE 0x000000C0 201 #define AUX_AIODIO_IOMODE_IO3_OPEN_DRAIN 0x00000080 202 #define AUX_AIODIO_IOMODE_IO3_IN 0x00000040 203 #define AUX_AIODIO_IOMODE_IO3_OUT 0x00000000 204 205 // Field: [5:4] IO2 206 // 207 // Selects mode for AUXIO2 (for AIODIO0) or AUXIO10 (for AIODIO1). 208 // ENUMs: 209 // OPEN_SOURCE Open-source: The pin is driven high when the 210 // corresponding GPIODOUT bit is 1, and otherwise 211 // tri-stated or pulled depending on the 212 // corresponding IOC configuration. 213 // OPEN_DRAIN Open-drain: The pin is driven low when the 214 // corresponding GPIODOUT bit is 0, and otherwise 215 // tri-stated or pulled depending on the 216 // corresponding IOC configuration. 217 // IN Digital input with GPIODIE bit 2 = 1 218 // Analog input/output with 219 // GPIODIE bit 2 = 0 220 // OUT Output 221 #define AUX_AIODIO_IOMODE_IO2_W 2 222 #define AUX_AIODIO_IOMODE_IO2_M 0x00000030 223 #define AUX_AIODIO_IOMODE_IO2_S 4 224 #define AUX_AIODIO_IOMODE_IO2_OPEN_SOURCE 0x00000030 225 #define AUX_AIODIO_IOMODE_IO2_OPEN_DRAIN 0x00000020 226 #define AUX_AIODIO_IOMODE_IO2_IN 0x00000010 227 #define AUX_AIODIO_IOMODE_IO2_OUT 0x00000000 228 229 // Field: [3:2] IO1 230 // 231 // Selects mode for AUXIO1 (for AIODIO0) or AUXIO9 (for AIODIO1). 232 // ENUMs: 233 // OPEN_SOURCE Open-source: The pin is driven high when the 234 // corresponding GPIODOUT bit is 1, and otherwise 235 // tri-stated or pulled depending on the 236 // corresponding IOC configuration. 237 // OPEN_DRAIN Open-drain: The pin is driven low when the 238 // corresponding GPIODOUT bit is 0, and otherwise 239 // tri-stated or pulled depending on the 240 // corresponding IOC configuration. 241 // IN Digital input with GPIODIE bit 1 = 1 242 // Analog input/output with 243 // GPIODIE bit 1 = 0 244 // OUT Output 245 #define AUX_AIODIO_IOMODE_IO1_W 2 246 #define AUX_AIODIO_IOMODE_IO1_M 0x0000000C 247 #define AUX_AIODIO_IOMODE_IO1_S 2 248 #define AUX_AIODIO_IOMODE_IO1_OPEN_SOURCE 0x0000000C 249 #define AUX_AIODIO_IOMODE_IO1_OPEN_DRAIN 0x00000008 250 #define AUX_AIODIO_IOMODE_IO1_IN 0x00000004 251 #define AUX_AIODIO_IOMODE_IO1_OUT 0x00000000 252 253 // Field: [1:0] IO0 254 // 255 // Selects mode for AUXIO0 (for AIODIO0) or AUXIO8 (for AIODIO1). 256 // ENUMs: 257 // OPEN_SOURCE Open-source: The pin is driven high when the 258 // corresponding GPIODOUT bit is 1, and otherwise 259 // tri-stated or pulled depending on the 260 // corresponding IOC configuration. 261 // OPEN_DRAIN Open-drain: The pin is driven low when the 262 // corresponding GPIODOUT bit is 0, and otherwise 263 // tri-stated or pulled depending on the 264 // corresponding IOC configuration. 265 // IN Digital input with GPIODIE bit 0 = 1 266 // Analog input/output with 267 // GPIODIE bit 0 = 0 268 // OUT Output 269 #define AUX_AIODIO_IOMODE_IO0_W 2 270 #define AUX_AIODIO_IOMODE_IO0_M 0x00000003 271 #define AUX_AIODIO_IOMODE_IO0_S 0 272 #define AUX_AIODIO_IOMODE_IO0_OPEN_SOURCE 0x00000003 273 #define AUX_AIODIO_IOMODE_IO0_OPEN_DRAIN 0x00000002 274 #define AUX_AIODIO_IOMODE_IO0_IN 0x00000001 275 #define AUX_AIODIO_IOMODE_IO0_OUT 0x00000000 276 277 //***************************************************************************** 278 // 279 // Register: AUX_AIODIO_O_GPIODIN 280 // 281 //***************************************************************************** 282 // Field: [7:0] IO7_0 283 // 284 // Input values for AUXIO0 through AUXIO7 (for AIODIO0) or AUXIO8 through 285 // AUXIO15 (for AIODIO1). 286 #define AUX_AIODIO_GPIODIN_IO7_0_W 8 287 #define AUX_AIODIO_GPIODIN_IO7_0_M 0x000000FF 288 #define AUX_AIODIO_GPIODIN_IO7_0_S 0 289 290 //***************************************************************************** 291 // 292 // Register: AUX_AIODIO_O_GPIODOUTSET 293 // 294 //***************************************************************************** 295 // Field: [7:0] IO7_0 296 // 297 // Writing 1(s) to one or more bit positions sets the corresponding bit(s) in 298 // GPIODOUT. 299 // 300 // Read value is 0x00. 301 #define AUX_AIODIO_GPIODOUTSET_IO7_0_W 8 302 #define AUX_AIODIO_GPIODOUTSET_IO7_0_M 0x000000FF 303 #define AUX_AIODIO_GPIODOUTSET_IO7_0_S 0 304 305 //***************************************************************************** 306 // 307 // Register: AUX_AIODIO_O_GPIODOUTCLR 308 // 309 //***************************************************************************** 310 // Field: [7:0] IO7_0 311 // 312 // Writing 1(s) to one or more bit positions clears the corresponding bit(s) in 313 // GPIODOUT. 314 // 315 // Read value is 0x00. 316 #define AUX_AIODIO_GPIODOUTCLR_IO7_0_W 8 317 #define AUX_AIODIO_GPIODOUTCLR_IO7_0_M 0x000000FF 318 #define AUX_AIODIO_GPIODOUTCLR_IO7_0_S 0 319 320 //***************************************************************************** 321 // 322 // Register: AUX_AIODIO_O_GPIODOUTTGL 323 // 324 //***************************************************************************** 325 // Field: [7:0] IO7_0 326 // 327 // Writing 1(s) to one or more bit positions toggles the corresponding bit(s) 328 // in GPIODOUT. 329 // 330 // Read value is 0x00. 331 #define AUX_AIODIO_GPIODOUTTGL_IO7_0_W 8 332 #define AUX_AIODIO_GPIODOUTTGL_IO7_0_M 0x000000FF 333 #define AUX_AIODIO_GPIODOUTTGL_IO7_0_S 0 334 335 //***************************************************************************** 336 // 337 // Register: AUX_AIODIO_O_GPIODIE 338 // 339 //***************************************************************************** 340 // Field: [7:0] IO7_0 341 // 342 // Enables (1) or disables (0) digital input buffers for each AUX I/O pin. 343 // 344 // Input buffers must be enabled to allow reading pin values through GPIODIN. 345 // 346 // Input buffers must be disabled for analog input or floating pins to avoid 347 // current leakage. 348 #define AUX_AIODIO_GPIODIE_IO7_0_W 8 349 #define AUX_AIODIO_GPIODIE_IO7_0_M 0x000000FF 350 #define AUX_AIODIO_GPIODIE_IO7_0_S 0 351 352 353 #endif // __AUX_AIODIO__ 354