1    /* --COPYRIGHT--,EPL
     2     *  Copyright (c) 2008 Texas Instruments and others.
     3     *  All rights reserved. This program and the accompanying materials
     4     *  are made available under the terms of the Eclipse Public License v1.0
     5     *  which accompanies this distribution, and is available at
     6     *  http://www.eclipse.org/legal/epl-v10.html
     7     * 
     8     *  Contributors:
     9     *      Texas Instruments - initial implementation
    10     * 
    11     * --/COPYRIGHT--*/
    12    import ti.catalog.msp430.peripherals.adc.ADC10 as ADC10;
    13    import ti.catalog.msp430.peripherals.clock.BCSplus as BCSplus;
    14    
    15    /*!
    16     *  ======== GPIO for MSP430F22x4 ========
    17     *  MSP430 General Purpose Input Output Ports
    18     */
    19    metaonly module GPIO_MSP430F22x4 inherits IGPIO {
    20        /*!
    21         *  ======== create ========
    22         *  Create an instance of this peripheral. Use a customized
    23         *  init function so that we can get access to the ADC10
    24         *  and BCS+ instances.
    25         */
    26            create(ADC10.Instance adc10, BCSplus.Instance clock);
    27            
    28    instance:
    29        /*! @_nodoc */
    30        config ADC10.Instance adc10;
    31    
    32        /*! @_nodoc */
    33        config BCSplus.Instance clock;
    34    
    35        /*! Define an array to describe all device pins. The 1st dimension
    36         *  denotes the port, the second the pin on that port. On an
    37         *  MSP430F22xx device, there are 4 x 8 = 32 pins total.
    38         */
    39            
    40            /* TODO: This here should really be a module-wide feature, rather than an instance feature,
    41             * however due to limitations in XDCtools 3.21.0.0 the data is located here */
    42        readonly config DevicePin_t devicePins[4][8] =
    43        [
    44            [
    45                {
    46                    pinName : "P1.0",
    47                    pinFunction : {
    48                        functionName : [
    49                            "GPIO Input",
    50                            "GPIO Output",
    51                            "Timer_A3.TACLK",
    52                            "ADC10CLK"
    53                        ],
    54                        functionConfig : [
    55                            [
    56                                { register : "P1DIR", bitSetMask : 0x00, bitClearMask : 0x01 },
    57                                { register : "P1SEL", bitSetMask : 0x00, bitClearMask : 0x01 }
    58                            ],
    59                            [
    60                                { register : "P1DIR", bitSetMask : 0x01, bitClearMask : 0x00 },
    61                                { register : "P1SEL", bitSetMask : 0x00, bitClearMask : 0x01 }
    62                            ],
    63                            [
    64                                { register : "P1DIR", bitSetMask : 0x00, bitClearMask : 0x01 },
    65                                { register : "P1SEL", bitSetMask : 0x01, bitClearMask : 0x00 }
    66                            ],
    67                            [
    68                                { register : "P1DIR", bitSetMask : 0x01, bitClearMask : 0x00 },
    69                                { register : "P1SEL", bitSetMask : 0x01, bitClearMask : 0x00 }
    70                            ]
    71                        ]
    72                    }
    73                },
    74                {
    75                    pinName : "P1.1",
    76                    pinFunction : {
    77                        functionName : [
    78                            "GPIO Input",
    79                            "GPIO Output",
    80                            "Timer_A3.CCI0A",
    81                            "Timer_A3.TA0"
    82                        ],
    83                        functionConfig : [
    84                            [
    85                                { register : "P1DIR", bitSetMask : 0x00, bitClearMask : 0x02 },
    86                                { register : "P1SEL", bitSetMask : 0x00, bitClearMask : 0x02 }
    87                            ],
    88                            [
    89                                { register : "P1DIR", bitSetMask : 0x02, bitClearMask : 0x00 },
    90                                { register : "P1SEL", bitSetMask : 0x00, bitClearMask : 0x02 }
    91                            ],
    92                            [
    93                                { register : "P1DIR", bitSetMask : 0x00, bitClearMask : 0x02 },
    94                                { register : "P1SEL", bitSetMask : 0x02, bitClearMask : 0x00 }
    95                            ],
    96                            [
    97                                { register : "P1DIR", bitSetMask : 0x02, bitClearMask : 0x00 },
    98                                { register : "P1SEL", bitSetMask : 0x02, bitClearMask : 0x00 }
    99                            ]
   100                        ]
   101                    }
   102                },
   103                {
   104                    pinName : "P1.2",
   105                    pinFunction : {
   106                        functionName : [
   107                            "GPIO Input",
   108                            "GPIO Output",
   109                            "Timer_A3.CCI1A",
   110                            "Timer_A3.TA1"
   111                        ],
   112                        functionConfig : [
   113                            [
   114                                { register : "P1DIR", bitSetMask : 0x00, bitClearMask : 0x04 },
   115                                { register : "P1SEL", bitSetMask : 0x00, bitClearMask : 0x04 }
   116                            ],
   117                            [
   118                                { register : "P1DIR", bitSetMask : 0x04, bitClearMask : 0x00 },
   119                                { register : "P1SEL", bitSetMask : 0x00, bitClearMask : 0x04 }
   120                            ],
   121                            [
   122                                { register : "P1DIR", bitSetMask : 0x00, bitClearMask : 0x04 },
   123                                { register : "P1SEL", bitSetMask : 0x04, bitClearMask : 0x00 }
   124                            ],
   125                            [
   126                                { register : "P1DIR", bitSetMask : 0x04, bitClearMask : 0x00 },
   127                                { register : "P1SEL", bitSetMask : 0x04, bitClearMask : 0x00 }
   128                            ]
   129                        ]
   130                    }
   131                },
   132                {
   133                    pinName : "P1.3",
   134                    pinFunction : {
   135                        functionName : [
   136                            "GPIO Input",
   137                            "GPIO Output",
   138                            "Timer_A3.CCI2A",
   139                            "Timer_A3.TA2"
   140                        ],
   141                        functionConfig : [
   142                            [
   143                                { register : "P1DIR", bitSetMask : 0x00, bitClearMask : 0x08 },
   144                                { register : "P1SEL", bitSetMask : 0x00, bitClearMask : 0x08 }
   145                            ],
   146                            [
   147                                { register : "P1DIR", bitSetMask : 0x08, bitClearMask : 0x00 },
   148                                { register : "P1SEL", bitSetMask : 0x00, bitClearMask : 0x08 }
   149                            ],
   150                            [
   151                                { register : "P1DIR", bitSetMask : 0x00, bitClearMask : 0x08 },
   152                                { register : "P1SEL", bitSetMask : 0x08, bitClearMask : 0x00 }
   153                            ],
   154                            [
   155                                { register : "P1DIR", bitSetMask : 0x08, bitClearMask : 0x00 },
   156                                { register : "P1SEL", bitSetMask : 0x08, bitClearMask : 0x00 }
   157                            ]
   158                        ]
   159                    }
   160                },
   161                {
   162                    pinName : "P1.4",
   163                    pinFunction : {
   164                        functionName : [
   165                            "GPIO Input",
   166                            "GPIO Output",
   167                            "SMCLK"
   168                        ],
   169                        functionConfig : [
   170                            [
   171                                { register : "P1DIR", bitSetMask : 0x00, bitClearMask : 0x10 },
   172                                { register : "P1SEL", bitSetMask : 0x00, bitClearMask : 0x10 }
   173                            ],
   174                            [
   175                                { register : "P1DIR", bitSetMask : 0x10, bitClearMask : 0x00 },
   176                                { register : "P1SEL", bitSetMask : 0x00, bitClearMask : 0x10 }
   177                            ],
   178                            [
   179                                { register : "P1DIR", bitSetMask : 0x10, bitClearMask : 0x00 },
   180                                { register : "P1SEL", bitSetMask : 0x10, bitClearMask : 0x00 }
   181                            ]
   182                        ]
   183                    }
   184                },
   185                {
   186                    pinName : "P1.5",
   187                    pinFunction : {
   188                        functionName : [
   189                            "GPIO Input",
   190                            "GPIO Output",
   191                            "Timer_A3.TA0"
   192                        ],
   193                        functionConfig : [
   194                            [
   195                                { register : "P1DIR", bitSetMask : 0x00, bitClearMask : 0x20 },
   196                                { register : "P1SEL", bitSetMask : 0x00, bitClearMask : 0x20 }
   197                            ],
   198                            [
   199                                { register : "P1DIR", bitSetMask : 0x20, bitClearMask : 0x00 },
   200                                { register : "P1SEL", bitSetMask : 0x00, bitClearMask : 0x20 }
   201                            ],
   202                            [
   203                                { register : "P1DIR", bitSetMask : 0x20, bitClearMask : 0x00 },
   204                                { register : "P1SEL", bitSetMask : 0x20, bitClearMask : 0x00 }
   205                            ]
   206                        ]
   207                    }
   208                },
   209                {
   210                    pinName : "P1.6",
   211                    pinFunction : {
   212                        functionName : [
   213                            "GPIO Input",
   214                            "GPIO Output",
   215                            "Timer_A3.TA1"
   216                        ],
   217                        functionConfig : [
   218                            [
   219                                { register : "P1DIR", bitSetMask : 0x00, bitClearMask : 0x40 },
   220                                { register : "P1SEL", bitSetMask : 0x00, bitClearMask : 0x40 }
   221                            ],
   222                            [
   223                                { register : "P1DIR", bitSetMask : 0x40, bitClearMask : 0x00 },
   224                                { register : "P1SEL", bitSetMask : 0x00, bitClearMask : 0x40 }
   225                            ],
   226                            [
   227                                { register : "P1DIR", bitSetMask : 0x40, bitClearMask : 0x00 },
   228                                { register : "P1SEL", bitSetMask : 0x40, bitClearMask : 0x00 }
   229                            ]
   230                        ]
   231                    }
   232                },
   233                {
   234                    pinName : "P1.7",
   235                    pinFunction : {
   236                        functionName : [
   237                            "GPIO Input",
   238                            "GPIO Output",
   239                            "Timer_A3.TA2"
   240                        ],
   241                        functionConfig : [
   242                            [
   243                                { register : "P1DIR", bitSetMask : 0x00, bitClearMask : 0x80 },
   244                                { register : "P1SEL", bitSetMask : 0x00, bitClearMask : 0x80 }
   245                            ],
   246                            [
   247                                { register : "P1DIR", bitSetMask : 0x80, bitClearMask : 0x00 },
   248                                { register : "P1SEL", bitSetMask : 0x00, bitClearMask : 0x80 }
   249                            ],
   250                            [
   251                                { register : "P1DIR", bitSetMask : 0x80, bitClearMask : 0x00 },
   252                                { register : "P1SEL", bitSetMask : 0x80, bitClearMask : 0x00 }
   253                            ]
   254                        ]
   255                    }
   256                }
   257            ],
   258            [
   259                {
   260                    pinName : "P2.0",
   261                    pinFunction : {
   262                        functionName : [
   263                            "GPIO Input",
   264                            "GPIO Output",
   265                            "ACLK",
   266                            "A0/OA0I0"
   267                        ],
   268                        functionConfig : [
   269                            [
   270                                { register : "P2DIR", bitSetMask : 0x00, bitClearMask : 0x01 },
   271                                { register : "P2SEL", bitSetMask : 0x00, bitClearMask : 0x01 },
   272                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x01 }
   273                            ],
   274                            [
   275                                { register : "P2DIR", bitSetMask : 0x01, bitClearMask : 0x00 },
   276                                { register : "P2SEL", bitSetMask : 0x00, bitClearMask : 0x01 },
   277                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x01 }
   278                            ],
   279                            [
   280                                { register : "P2DIR", bitSetMask : 0x01, bitClearMask : 0x00 },
   281                                { register : "P2SEL", bitSetMask : 0x01, bitClearMask : 0x00 },
   282                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x01 }
   283                            ],
   284                            [
   285                                { register : "ADC10AE0", bitSetMask : 0x01, bitClearMask : 0x00 }
   286                            ]
   287                        ]
   288                    }
   289                },
   290                {
   291                    pinName : "P2.1",
   292                    pinFunction : {
   293                        functionName : [
   294                            "GPIO Input",
   295                            "GPIO Output",
   296                            "Timer_A3.INCLK",
   297                            "SMCLK",
   298                            "A1/OA0O"
   299                        ],
   300                        functionConfig : [
   301                            [
   302                                { register : "P2DIR", bitSetMask : 0x00, bitClearMask : 0x02 },
   303                                { register : "P2SEL", bitSetMask : 0x00, bitClearMask : 0x02 },
   304                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x02 }
   305                            ],
   306                            [
   307                                { register : "P2DIR", bitSetMask : 0x02, bitClearMask : 0x00 },
   308                                { register : "P2SEL", bitSetMask : 0x00, bitClearMask : 0x02 },
   309                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x02 }
   310                            ],
   311                            [
   312                                { register : "P2DIR", bitSetMask : 0x00, bitClearMask : 0x02 },
   313                                { register : "P2SEL", bitSetMask : 0x02, bitClearMask : 0x00 },
   314                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x02 }
   315                            ],
   316                            [
   317                                { register : "P2DIR", bitSetMask : 0x02, bitClearMask : 0x00 },
   318                                { register : "P2SEL", bitSetMask : 0x02, bitClearMask : 0x00 },
   319                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x02 }
   320                            ],
   321                            [
   322                                { register : "ADC10AE0", bitSetMask : 0x02, bitClearMask : 0x00 }
   323                            ]
   324                        ]
   325                    }
   326                },
   327                {
   328                    pinName : "P2.2",
   329                    pinFunction : {
   330                        functionName : [
   331                            "GPIO Input",
   332                            "GPIO Output",
   333                            "Timer_A3.CCI0B",
   334                            "Timer_A3.TA0",
   335                            "A2/OA0I1"
   336                        ],
   337                        functionConfig : [
   338                            [
   339                                { register : "P2DIR", bitSetMask : 0x00, bitClearMask : 0x04 },
   340                                { register : "P2SEL", bitSetMask : 0x00, bitClearMask : 0x04 },
   341                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x04 }
   342                            ],
   343                            [
   344                                { register : "P2DIR", bitSetMask : 0x04, bitClearMask : 0x00 },
   345                                { register : "P2SEL", bitSetMask : 0x00, bitClearMask : 0x04 },
   346                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x04 }
   347                            ],
   348                            [
   349                                { register : "P2DIR", bitSetMask : 0x00, bitClearMask : 0x04 },
   350                                { register : "P2SEL", bitSetMask : 0x04, bitClearMask : 0x00 },
   351                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x04 }
   352                            ],
   353                            [
   354                                { register : "P2DIR", bitSetMask : 0x04, bitClearMask : 0x00 },
   355                                { register : "P2SEL", bitSetMask : 0x04, bitClearMask : 0x00 },
   356                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x04 }
   357                            ],
   358                            [
   359                                { register : "ADC10AE0", bitSetMask : 0x04, bitClearMask : 0x00 }
   360                            ]
   361                        ]
   362                    }
   363                },
   364                {
   365                    pinName : "P2.3",
   366                    pinFunction : {
   367                        functionName : [
   368                            "GPIO Input",
   369                            "GPIO Output",
   370                            "Timer_A3.CCI1B",
   371                            "Timer_A3.TA1",
   372                            "A3/VREF--/VeREF--/OA1I1/OA1O"
   373                        ],
   374                        functionConfig : [
   375                            [
   376                                { register : "P2DIR", bitSetMask : 0x00, bitClearMask : 0x08 },
   377                                { register : "P2SEL", bitSetMask : 0x00, bitClearMask : 0x08 },
   378                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x08 }
   379                            ],
   380                            [
   381                                { register : "P2DIR", bitSetMask : 0x08, bitClearMask : 0x00 },
   382                                { register : "P2SEL", bitSetMask : 0x00, bitClearMask : 0x08 },
   383                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x08 }
   384                            ],
   385                            [
   386                                { register : "P2DIR", bitSetMask : 0x00, bitClearMask : 0x08 },
   387                                { register : "P2SEL", bitSetMask : 0x08, bitClearMask : 0x00 },
   388                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x08 }
   389                            ],
   390                            [
   391                                { register : "P2DIR", bitSetMask : 0x08, bitClearMask : 0x00 },
   392                                { register : "P2SEL", bitSetMask : 0x08, bitClearMask : 0x00 },
   393                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x08 }
   394                            ],
   395                            [
   396                                { register : "ADC10AE0", bitSetMask : 0x08, bitClearMask : 0x00 }
   397                            ]
   398                        ]
   399                    }
   400                },
   401                {
   402                    pinName : "P2.4",
   403                    pinFunction : {
   404                        functionName : [
   405                            "GPIO Input",
   406                            "GPIO Output",
   407                            "Timer_A3.TA2",
   408                            "A4/VREF+/VeREF+/OA1I0"
   409                        ],
   410                        functionConfig : [
   411                            [
   412                                { register : "P2DIR", bitSetMask : 0x00, bitClearMask : 0x10 },
   413                                { register : "P2SEL", bitSetMask : 0x00, bitClearMask : 0x10 },
   414                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x10 }
   415                            ],
   416                            [
   417                                { register : "P2DIR", bitSetMask : 0x10, bitClearMask : 0x00 },
   418                                { register : "P2SEL", bitSetMask : 0x00, bitClearMask : 0x10 },
   419                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x10 }
   420                            ],
   421                            [
   422                                { register : "P2DIR", bitSetMask : 0x10, bitClearMask : 0x00 },
   423                                { register : "P2SEL", bitSetMask : 0x10, bitClearMask : 0x00 },
   424                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x10 }
   425                            ],
   426                            [
   427                                { register : "ADC10AE0", bitSetMask : 0x10, bitClearMask : 0x00 }
   428                            ]
   429                        ]
   430                    }
   431                },
   432                {
   433                    pinName : "P2.5",
   434                    pinFunction : {
   435                        functionName : [
   436                            "GPIO Input",
   437                            "GPIO Output",
   438                            "DVSS",
   439                            "Rosc"
   440                        ],
   441                        functionConfig : [
   442                            [
   443                                { register : "P2DIR", bitSetMask : 0x00, bitClearMask : 0x20 },
   444                                { register : "P2SEL", bitSetMask : 0x00, bitClearMask : 0x20 },
   445                                { register : "BCSCTL2", bitSetMask : 0x00, bitClearMask : 0x01 }
   446                            ],
   447                            [
   448                                { register : "P2DIR", bitSetMask : 0x20, bitClearMask : 0x00 },
   449                                { register : "P2SEL", bitSetMask : 0x00, bitClearMask : 0x20 },
   450                                { register : "BCSCTL2", bitSetMask : 0x00, bitClearMask : 0x01 }
   451                            ],
   452                            [
   453                                { register : "P2DIR", bitSetMask : 0x20, bitClearMask : 0x00 },
   454                                { register : "P2SEL", bitSetMask : 0x20, bitClearMask : 0x00 },
   455                                { register : "BCSCTL2", bitSetMask : 0x00, bitClearMask : 0x01 }
   456                            ],
   457                            [
   458                                { register : "BCSCTL2", bitSetMask : 0x01, bitClearMask : 0x00 }
   459                            ]
   460                        ]
   461                    }
   462                },
   463                {
   464                    pinName : "P2.6",
   465                    pinFunction : {
   466                        functionName : [
   467                            "GPIO Input",
   468                            "GPIO Output",
   469                            "XIN"
   470                        ],
   471                        functionConfig : [
   472                            [
   473                                { register : "P2DIR", bitSetMask : 0x00, bitClearMask : 0x40 },
   474                                { register : "P2SEL", bitSetMask : 0x00, bitClearMask : 0x40 }
   475                            ],
   476                            [
   477                                { register : "P2DIR", bitSetMask : 0x40, bitClearMask : 0x00 },
   478                                { register : "P2SEL", bitSetMask : 0x00, bitClearMask : 0x40 }
   479                            ],
   480                            [
   481                                { register : "P2SEL", bitSetMask : 0x40, bitClearMask : 0x00 }
   482                            ]
   483                        ]
   484                    }
   485                },
   486                {
   487                    pinName : "P2.7",
   488                    pinFunction : {
   489                        functionName : [
   490                            "GPIO Input",
   491                            "GPIO Output",
   492                            "XOUT"
   493                        ],
   494                        functionConfig : [
   495                            [
   496                                { register : "P2DIR", bitSetMask : 0x00, bitClearMask : 0x80 },
   497                                { register : "P2SEL", bitSetMask : 0x00, bitClearMask : 0x80 }
   498                            ],
   499                            [
   500                                { register : "P2DIR", bitSetMask : 0x80, bitClearMask : 0x00 },
   501                                { register : "P2SEL", bitSetMask : 0x00, bitClearMask : 0x80 }
   502                            ],
   503                            [
   504                                { register : "P2SEL", bitSetMask : 0x80, bitClearMask : 0x00 }
   505                            ]
   506                        ]
   507                    }
   508                }
   509            ],
   510            [
   511                {
   512                    pinName : "P3.0",
   513                    pinFunction : {
   514                        functionName : [
   515                            "GPIO Input",
   516                            "GPIO Output",
   517                            "UCB0STE/UCA0CLK",
   518                            "A5"
   519                        ],
   520                        functionConfig : [
   521                            [
   522                                { register : "P3DIR", bitSetMask : 0x00, bitClearMask : 0x01 },
   523                                { register : "P3SEL", bitSetMask : 0x00, bitClearMask : 0x01 },
   524                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x20 }
   525                            ],
   526                            [
   527                                { register : "P3DIR", bitSetMask : 0x01, bitClearMask : 0x00 },
   528                                { register : "P3SEL", bitSetMask : 0x00, bitClearMask : 0x01 },
   529                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x20 }
   530                            ],
   531                            [
   532                                { register : "P3SEL", bitSetMask : 0x01, bitClearMask : 0x00 },
   533                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x20 }
   534                            ],
   535                            [
   536                                { register : "ADC10AE0", bitSetMask : 0x20, bitClearMask : 0x00 }
   537                            ]
   538                        ]
   539                    }
   540                },
   541                {
   542                    pinName : "P3.1",
   543                    pinFunction : {
   544                        functionName : [
   545                            "GPIO Input",
   546                            "GPIO Output",
   547                            "UCB0SIMO/UCB0SDA"
   548                        ],
   549                        functionConfig : [
   550                            [
   551                                { register : "P3DIR", bitSetMask : 0x00, bitClearMask : 0x02 },
   552                                { register : "P3SEL", bitSetMask : 0x00, bitClearMask : 0x02 }
   553                            ],
   554                            [
   555                                { register : "P3DIR", bitSetMask : 0x02, bitClearMask : 0x00 },
   556                                { register : "P3SEL", bitSetMask : 0x00, bitClearMask : 0x02 }
   557                            ],
   558                            [
   559                                { register : "P3SEL", bitSetMask : 0x02, bitClearMask : 0x00 }
   560                            ]
   561                        ]
   562                    }
   563                },
   564                {
   565                    pinName : "P3.2",
   566                    pinFunction : {
   567                        functionName : [
   568                            "GPIO Input",
   569                            "GPIO Output",
   570                            "UCB0SOMI/UCB0SCL"
   571                        ],
   572                        functionConfig : [
   573                            [
   574                                { register : "P3DIR", bitSetMask : 0x00, bitClearMask : 0x04 },
   575                                { register : "P3SEL", bitSetMask : 0x00, bitClearMask : 0x04 }
   576                            ],
   577                            [
   578                                { register : "P3DIR", bitSetMask : 0x04, bitClearMask : 0x00 },
   579                                { register : "P3SEL", bitSetMask : 0x00, bitClearMask : 0x04 }
   580                            ],
   581                            [
   582                                { register : "P3SEL", bitSetMask : 0x04, bitClearMask : 0x00 }
   583                            ]
   584                        ]
   585                    }
   586                },
   587                {
   588                    pinName : "P3.3",
   589                    pinFunction : {
   590                        functionName : [
   591                            "GPIO Input",
   592                            "GPIO Output",
   593                            "UCB0CLK/UCA0STE"
   594                        ],
   595                        functionConfig : [
   596                            [
   597                                { register : "P3DIR", bitSetMask : 0x00, bitClearMask : 0x08 },
   598                                { register : "P3SEL", bitSetMask : 0x00, bitClearMask : 0x08 }
   599                            ],
   600                            [
   601                                { register : "P3DIR", bitSetMask : 0x08, bitClearMask : 0x00 },
   602                                { register : "P3SEL", bitSetMask : 0x00, bitClearMask : 0x08 }
   603                            ],
   604                            [
   605                                { register : "P3SEL", bitSetMask : 0x08, bitClearMask : 0x00 }
   606                            ]
   607                        ]
   608                    }
   609                },
   610                {
   611                    pinName : "P3.4",
   612                    pinFunction : {
   613                        functionName : [
   614                            "GPIO Input",
   615                            "GPIO Output",
   616                            "UCA0TXD/UCA0SIMO"
   617                        ],
   618                        functionConfig : [
   619                            [
   620                                { register : "P3DIR", bitSetMask : 0x00, bitClearMask : 0x10 },
   621                                { register : "P3SEL", bitSetMask : 0x00, bitClearMask : 0x10 }
   622                            ],
   623                            [
   624                                { register : "P3DIR", bitSetMask : 0x10, bitClearMask : 0x00 },
   625                                { register : "P3SEL", bitSetMask : 0x00, bitClearMask : 0x10 }
   626                            ],
   627                            [
   628                                { register : "P3SEL", bitSetMask : 0x10, bitClearMask : 0x00 }
   629                            ]
   630                        ]
   631                    }
   632                },
   633                {
   634                    pinName : "P3.5",
   635                    pinFunction : {
   636                        functionName : [
   637                            "GPIO Input",
   638                            "GPIO Output",
   639                            "UCA0RXD/UCA0SOMI"
   640                        ],
   641                        functionConfig : [
   642                            [
   643                                { register : "P3DIR", bitSetMask : 0x00, bitClearMask : 0x20 },
   644                                { register : "P3SEL", bitSetMask : 0x00, bitClearMask : 0x20 }
   645                            ],
   646                            [
   647                                { register : "P3DIR", bitSetMask : 0x20, bitClearMask : 0x00 },
   648                                { register : "P3SEL", bitSetMask : 0x00, bitClearMask : 0x20 }
   649                            ],
   650                            [
   651                                { register : "P3SEL", bitSetMask : 0x20, bitClearMask : 0x00 }
   652                            ]
   653                        ]
   654                    }
   655                },
   656                {
   657                    pinName : "P3.6",
   658                    pinFunction : {
   659                        functionName : [
   660                            "GPIO Input",
   661                            "GPIO Output",
   662                            "A6/OA0I2"
   663                        ],
   664                        functionConfig : [
   665                            [
   666                                { register : "P3DIR", bitSetMask : 0x00, bitClearMask : 0x40 },
   667                                { register : "P3SEL", bitSetMask : 0x00, bitClearMask : 0x40 },
   668                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x40 }
   669                            ],
   670                            [
   671                                { register : "P3DIR", bitSetMask : 0x40, bitClearMask : 0x00 },
   672                                { register : "P3SEL", bitSetMask : 0x00, bitClearMask : 0x40 },
   673                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x40 }
   674                            ],
   675                            [
   676                                { register : "ADC10AE0", bitSetMask : 0x40, bitClearMask : 0x00 }
   677                            ]
   678                        ]
   679                    }
   680                },
   681                {
   682                    pinName : "P3.7",
   683                    pinFunction : {
   684                        functionName : [
   685                            "GPIO Input",
   686                            "GPIO Output",
   687                            "A7/OA1I2"
   688                        ],
   689                        functionConfig : [
   690                            [
   691                                { register : "P3DIR", bitSetMask : 0x00, bitClearMask : 0x80 },
   692                                { register : "P3SEL", bitSetMask : 0x00, bitClearMask : 0x80 },
   693                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x80 }
   694                            ],
   695                            [
   696                                { register : "P3DIR", bitSetMask : 0x80, bitClearMask : 0x00 },
   697                                { register : "P3SEL", bitSetMask : 0x00, bitClearMask : 0x80 },
   698                                { register : "ADC10AE0", bitSetMask : 0x00, bitClearMask : 0x80 }
   699                            ],
   700                            [
   701                                { register : "ADC10AE0", bitSetMask : 0x80, bitClearMask : 0x00 }
   702                            ]
   703                        ]
   704                    }
   705                }
   706            ],
   707            [
   708                {
   709                    pinName : "P4.0",
   710                    pinFunction : {
   711                        functionName : [
   712                            "GPIO Input",
   713                            "GPIO Output",
   714                            "Timer_B3.CCI0A",
   715                            "Timer_B3.TB0"
   716                        ],
   717                        functionConfig : [
   718                            [
   719                                { register : "P4DIR", bitSetMask : 0x00, bitClearMask : 0x01 },
   720                                { register : "P4SEL", bitSetMask : 0x00, bitClearMask : 0x01 }
   721                            ],
   722                            [
   723                                { register : "P4DIR", bitSetMask : 0x01, bitClearMask : 0x00 },
   724                                { register : "P4SEL", bitSetMask : 0x00, bitClearMask : 0x01 }
   725                            ],
   726                            [
   727                                { register : "P4DIR", bitSetMask : 0x00, bitClearMask : 0x01 },
   728                                { register : "P4SEL", bitSetMask : 0x01, bitClearMask : 0x00 }
   729                            ],
   730                            [
   731                                { register : "P4DIR", bitSetMask : 0x01, bitClearMask : 0x00 },
   732                                { register : "P4SEL", bitSetMask : 0x01, bitClearMask : 0x00 }
   733                            ]
   734                        ]
   735                    }
   736                },
   737                {
   738                    pinName : "P4.1",
   739                    pinFunction : {
   740                        functionName : [
   741                            "GPIO Input",
   742                            "GPIO Output",
   743                            "Timer_B3.CCI1A",
   744                            "Timer_B3.TB1"
   745                        ],
   746                        functionConfig : [
   747                            [
   748                                { register : "P4DIR", bitSetMask : 0x00, bitClearMask : 0x02 },
   749                                { register : "P4SEL", bitSetMask : 0x00, bitClearMask : 0x02 }
   750                            ],
   751                            [
   752                                { register : "P4DIR", bitSetMask : 0x02, bitClearMask : 0x00 },
   753                                { register : "P4SEL", bitSetMask : 0x00, bitClearMask : 0x02 }
   754                            ],
   755                            [
   756                                { register : "P4DIR", bitSetMask : 0x00, bitClearMask : 0x02 },
   757                                { register : "P4SEL", bitSetMask : 0x02, bitClearMask : 0x00 }
   758                            ],
   759                            [
   760                                { register : "P4DIR", bitSetMask : 0x02, bitClearMask : 0x00 },
   761                                { register : "P4SEL", bitSetMask : 0x02, bitClearMask : 0x00 }
   762                            ]
   763                        ]
   764                    }
   765                },
   766                {
   767                    pinName : "P4.2",
   768                    pinFunction : {
   769                        functionName : [
   770                            "GPIO Input",
   771                            "GPIO Output",
   772                            "Timer_B3.CCI2A",
   773                            "Timer_B3.TB2"
   774                        ],
   775                        functionConfig : [
   776                            [
   777                                { register : "P4DIR", bitSetMask : 0x00, bitClearMask : 0x04 },
   778                                { register : "P4SEL", bitSetMask : 0x00, bitClearMask : 0x04 }
   779                            ],
   780                            [
   781                                { register : "P4DIR", bitSetMask : 0x04, bitClearMask : 0x00 },
   782                                { register : "P4SEL", bitSetMask : 0x00, bitClearMask : 0x04 }
   783                            ],
   784                            [
   785                                { register : "P4DIR", bitSetMask : 0x00, bitClearMask : 0x04 },
   786                                { register : "P4SEL", bitSetMask : 0x04, bitClearMask : 0x00 }
   787                            ],
   788                            [
   789                                { register : "P4DIR", bitSetMask : 0x04, bitClearMask : 0x00 },
   790                                { register : "P4SEL", bitSetMask : 0x04, bitClearMask : 0x00 }
   791                            ]
   792                        ]
   793                    }
   794                },
   795                {
   796                    pinName : "P4.3",
   797                    pinFunction : {
   798                        functionName : [
   799                            "GPIO Input",
   800                            "GPIO Output",
   801                            "Timer_B3.CCI0B",
   802                            "Timer_B3.TB0",
   803                            "A12/OA0O"
   804                        ],
   805                        functionConfig : [
   806                            [
   807                                { register : "P4DIR", bitSetMask : 0x00, bitClearMask : 0x08 },
   808                                { register : "P4SEL", bitSetMask : 0x00, bitClearMask : 0x08 },
   809                                { register : "ADC10AE1", bitSetMask : 0x00, bitClearMask : 0x10 }
   810                            ],
   811                            [
   812                                { register : "P4DIR", bitSetMask : 0x08, bitClearMask : 0x00 },
   813                                { register : "P4SEL", bitSetMask : 0x00, bitClearMask : 0x08 },
   814                                { register : "ADC10AE1", bitSetMask : 0x00, bitClearMask : 0x10 }
   815                            ],
   816                            [
   817                                { register : "P4DIR", bitSetMask : 0x00, bitClearMask : 0x08 },
   818                                { register : "P4SEL", bitSetMask : 0x08, bitClearMask : 0x00 },
   819                                { register : "ADC10AE1", bitSetMask : 0x00, bitClearMask : 0x10 }
   820                            ],
   821                            [
   822                                { register : "P4DIR", bitSetMask : 0x08, bitClearMask : 0x00 },
   823                                { register : "P4SEL", bitSetMask : 0x08, bitClearMask : 0x00 },
   824                                { register : "ADC10AE1", bitSetMask : 0x00, bitClearMask : 0x10 }
   825                            ],
   826                            [
   827                                { register : "ADC10AE1", bitSetMask : 0x10, bitClearMask : 0x00 }
   828                            ]
   829                        ]
   830                    }
   831                },
   832                {
   833                    pinName : "P4.4",
   834                    pinFunction : {
   835                        functionName : [
   836                            "GPIO Input",
   837                            "GPIO Output",
   838                            "Timer_B3.CCI1B",
   839                            "Timer_B3.TB1",
   840                            "A13/OA1O"
   841                        ],
   842                        functionConfig : [
   843                            [
   844                                { register : "P4DIR", bitSetMask : 0x00, bitClearMask : 0x10 },
   845                                { register : "P4SEL", bitSetMask : 0x00, bitClearMask : 0x10 },
   846                                { register : "ADC10AE1", bitSetMask : 0x00, bitClearMask : 0x20 }
   847                            ],
   848                            [
   849                                { register : "P4DIR", bitSetMask : 0x10, bitClearMask : 0x00 },
   850                                { register : "P4SEL", bitSetMask : 0x00, bitClearMask : 0x10 },
   851                                { register : "ADC10AE1", bitSetMask : 0x00, bitClearMask : 0x20 }
   852                            ],
   853                            [
   854                                { register : "P4DIR", bitSetMask : 0x00, bitClearMask : 0x10 },
   855                                { register : "P4SEL", bitSetMask : 0x10, bitClearMask : 0x00 },
   856                                { register : "ADC10AE1", bitSetMask : 0x00, bitClearMask : 0x20 }
   857                            ],
   858                            [
   859                                { register : "P4DIR", bitSetMask : 0x10, bitClearMask : 0x00 },
   860                                { register : "P4SEL", bitSetMask : 0x10, bitClearMask : 0x00 },
   861                                { register : "ADC10AE1", bitSetMask : 0x00, bitClearMask : 0x20 }
   862                            ],
   863                            [
   864                                { register : "ADC10AE1", bitSetMask : 0x20, bitClearMask : 0x00 }
   865                            ]
   866                        ]
   867                    }
   868                },
   869                {
   870                    pinName : "P4.5",
   871                    pinFunction : {
   872                        functionName : [
   873                            "GPIO Input",
   874                            "GPIO Output",
   875                            "Timer_B3.TB2",
   876                            "A14/OA0I3"
   877                        ],
   878                        functionConfig : [
   879                            [
   880                                { register : "P4DIR", bitSetMask : 0x00, bitClearMask : 0x20 },
   881                                { register : "P4SEL", bitSetMask : 0x00, bitClearMask : 0x20 },
   882                                { register : "ADC10AE1", bitSetMask : 0x00, bitClearMask : 0x40 }
   883                            ],
   884                            [
   885                                { register : "P4DIR", bitSetMask : 0x20, bitClearMask : 0x00 },
   886                                { register : "P4SEL", bitSetMask : 0x00, bitClearMask : 0x20 },
   887                                { register : "ADC10AE1", bitSetMask : 0x00, bitClearMask : 0x40 }
   888                            ],
   889                            [
   890                                { register : "P4DIR", bitSetMask : 0x20, bitClearMask : 0x00 },
   891                                { register : "P4SEL", bitSetMask : 0x20, bitClearMask : 0x00 },
   892                                { register : "ADC10AE1", bitSetMask : 0x00, bitClearMask : 0x40 }
   893                            ],
   894                            [
   895                                { register : "ADC10AE1", bitSetMask : 0x40, bitClearMask : 0x00 }
   896                            ]
   897                        ]
   898                    }
   899                },
   900                {
   901                    pinName : "P4.6",
   902                    pinFunction : {
   903                        functionName : [
   904                            "GPIO Input",
   905                            "GPIO Output",
   906                            "TBOUTH",
   907                            "DVSS",
   908                            "A15/OA1I3"
   909                        ],
   910                        functionConfig : [
   911                            [
   912                                { register : "P4DIR", bitSetMask : 0x00, bitClearMask : 0x40 },
   913                                { register : "P4SEL", bitSetMask : 0x00, bitClearMask : 0x40 },
   914                                { register : "ADC10AE1", bitSetMask : 0x00, bitClearMask : 0x80 }
   915                            ],
   916                            [
   917                                { register : "P4DIR", bitSetMask : 0x40, bitClearMask : 0x00 },
   918                                { register : "P4SEL", bitSetMask : 0x00, bitClearMask : 0x40 },
   919                                { register : "ADC10AE1", bitSetMask : 0x00, bitClearMask : 0x80 }
   920                            ],
   921                            [
   922                                { register : "P4DIR", bitSetMask : 0x00, bitClearMask : 0x40 },
   923                                { register : "P4SEL", bitSetMask : 0x40, bitClearMask : 0x00 },
   924                                { register : "ADC10AE1", bitSetMask : 0x00, bitClearMask : 0x80 }
   925                            ],
   926                            [
   927                                { register : "P4DIR", bitSetMask : 0x40, bitClearMask : 0x00 },
   928                                { register : "P4SEL", bitSetMask : 0x40, bitClearMask : 0x00 },
   929                                { register : "ADC10AE1", bitSetMask : 0x00, bitClearMask : 0x80 }
   930                            ],
   931                            [
   932                                { register : "ADC10AE1", bitSetMask : 0x80, bitClearMask : 0x00 }
   933                            ]
   934                        ]
   935                    }
   936                },
   937                {
   938                    pinName : "P4.7",
   939                    pinFunction : {
   940                        functionName : [
   941                            "GPIO Input",
   942                            "GPIO Output",
   943                            "Timer_B3.TBCLK",
   944                            "DVSS"
   945                        ],
   946                        functionConfig : [
   947                            [
   948                                { register : "P4DIR", bitSetMask : 0x00, bitClearMask : 0x80 },
   949                                { register : "P4SEL", bitSetMask : 0x00, bitClearMask : 0x80 }
   950                            ],
   951                            [
   952                                { register : "P4DIR", bitSetMask : 0x80, bitClearMask : 0x00 },
   953                                { register : "P4SEL", bitSetMask : 0x00, bitClearMask : 0x80 }
   954                            ],
   955                            [
   956                                { register : "P4DIR", bitSetMask : 0x00, bitClearMask : 0x80 },
   957                                { register : "P4SEL", bitSetMask : 0x80, bitClearMask : 0x00 }
   958                            ],
   959                            [
   960                                { register : "P4DIR", bitSetMask : 0x80, bitClearMask : 0x00 },
   961                                { register : "P4SEL", bitSetMask : 0x80, bitClearMask : 0x00 }
   962                            ]
   963                        ]
   964                    }
   965                }
   966            ]
   967        ];
   968    
   969            /*! Implementation of Device Pin Functional Configuration */
   970            override config DevicePinFunctionSetting_t devicePinSetting[4][8];
   971    
   972            /*! Determine if each Register needs to be forced set or not */
   973            readonly config ForceSetDefaultRegister_t forceSetDefaultRegister[] =
   974            [
   975                    { register : "P1OUT" , regForceSet : true  },
   976                    { register : "P1SEL" , regForceSet : false },
   977                    { register : "P1DIR" , regForceSet : false },
   978                    { register : "P1REN" , regForceSet : false },
   979                    { register : "P1IES" , regForceSet : true },
   980                    { register : "P1IFG" , regForceSet : true },
   981                    { register : "P1IE"  , regForceSet : false },
   982                    { register : "P2OUT" , regForceSet : true  },
   983                    { register : "P2SEL" , regForceSet : false },
   984                    { register : "P2DIR" , regForceSet : false },
   985                    { register : "P2REN" , regForceSet : false },
   986                    { register : "P2IES" , regForceSet : true },
   987                    { register : "P2IFG" , regForceSet : true },
   988                    { register : "P2IE"  , regForceSet : false },
   989                    { register : "P3OUT" , regForceSet : true  },
   990                    { register : "P3SEL" , regForceSet : false },
   991                    { register : "P3DIR" , regForceSet : false },
   992                    { register : "P3REN" , regForceSet : false },
   993                    { register : "P4OUT" , regForceSet : true  },
   994                    { register : "P4SEL" , regForceSet : false },
   995                    { register : "P4DIR" , regForceSet : false },
   996                    { register : "P4REN" , regForceSet : false }
   997            ];
   998            
   999        /*
  1000         *  GPIO Digital I/O Registers
  1001         *
  1002         *  One GIPO instance defines the configuration of an entire,
  1003         *  8-bit wide digital I/O port.
  1004         */
  1005         
  1006        /*! Port 1 Output Register */ 
  1007        config GpioBits8PxOut_t P1OUT = {
  1008            Bit0        : BIT0_OFF,
  1009            Bit1        : BIT1_OFF,
  1010            Bit2        : BIT2_OFF,
  1011            Bit3        : BIT3_OFF,
  1012            Bit4        : BIT4_OFF,
  1013            Bit5        : BIT5_OFF,
  1014            Bit6        : BIT6_OFF,
  1015            Bit7        : BIT7_OFF
  1016        };
  1017    
  1018        /*! Port 1 Port Select Register */
  1019        config GpioBits8PxSel_t P1SEL = {
  1020            Bit0        : BIT0_OFF,
  1021            Bit1        : BIT1_OFF,
  1022            Bit2        : BIT2_OFF,
  1023            Bit3        : BIT3_OFF,
  1024            Bit4        : BIT4_OFF,
  1025            Bit5        : BIT5_OFF,
  1026            Bit6        : BIT6_OFF,
  1027            Bit7        : BIT7_OFF
  1028        };
  1029        
  1030        /*! Port 1 Direction Register */
  1031        config GpioBits8PxDir_t P1DIR = {
  1032            Bit0        : BIT0_OFF,
  1033            Bit1        : BIT1_OFF,
  1034            Bit2        : BIT2_OFF,
  1035            Bit3        : BIT3_OFF,
  1036            Bit4        : BIT4_OFF,
  1037            Bit5        : BIT5_OFF,
  1038            Bit6        : BIT6_OFF,
  1039            Bit7        : BIT7_OFF
  1040        };
  1041        
  1042        /*! Port 1 Resistor Enable Register */
  1043        config GpioBits8PxRen_t P1REN = {
  1044            Bit0        : BIT0_OFF,
  1045            Bit1        : BIT1_OFF,
  1046            Bit2        : BIT2_OFF,
  1047            Bit3        : BIT3_OFF,
  1048            Bit4        : BIT4_OFF,
  1049            Bit5        : BIT5_OFF,
  1050            Bit6        : BIT6_OFF,
  1051            Bit7        : BIT7_OFF
  1052        };
  1053        
  1054        /*! Port 1 Interrupt Edge Select Register */
  1055        config GpioBits8PxIes_t P1IES = {
  1056            Bit0        : BIT0_OFF,
  1057            Bit1        : BIT1_OFF,
  1058            Bit2        : BIT2_OFF,
  1059            Bit3        : BIT3_OFF,
  1060            Bit4        : BIT4_OFF,
  1061            Bit5        : BIT5_OFF,
  1062            Bit6        : BIT6_OFF,
  1063            Bit7        : BIT7_OFF
  1064        };
  1065        
  1066        /*! Port 1 Interrupt Flag Register */
  1067        config GpioBits8PxIfg_t P1IFG = {
  1068            Bit0        : BIT0_OFF,
  1069            Bit1        : BIT1_OFF,
  1070            Bit2        : BIT2_OFF,
  1071            Bit3        : BIT3_OFF,
  1072            Bit4        : BIT4_OFF,
  1073            Bit5        : BIT5_OFF,
  1074            Bit6        : BIT6_OFF,
  1075            Bit7        : BIT7_OFF
  1076        };
  1077        
  1078        /*! Port 1 Interrupt Enable Register */
  1079        config GpioBits8PxIe_t P1IE = {
  1080            Bit0        : BIT0_OFF,
  1081            Bit1        : BIT1_OFF,
  1082            Bit2        : BIT2_OFF,
  1083            Bit3        : BIT3_OFF,
  1084            Bit4        : BIT4_OFF,
  1085            Bit5        : BIT5_OFF,
  1086            Bit6        : BIT6_OFF,
  1087            Bit7        : BIT7_OFF
  1088        };
  1089    
  1090        /*! Port 2 Output Register */ 
  1091        config GpioBits8PxOut_t P2OUT = {
  1092            Bit0        : BIT0_OFF,
  1093            Bit1        : BIT1_OFF,
  1094            Bit2        : BIT2_OFF,
  1095            Bit3        : BIT3_OFF,
  1096            Bit4        : BIT4_OFF,
  1097            Bit5        : BIT5_OFF,
  1098            Bit6        : BIT6_OFF,
  1099            Bit7        : BIT7_OFF
  1100        };
  1101    
  1102        /*! Port 2 Port Select Register */
  1103        config GpioBits8PxSel_t P2SEL = {
  1104            Bit0        : BIT0_OFF,
  1105            Bit1        : BIT1_OFF,
  1106            Bit2        : BIT2_OFF,
  1107            Bit3        : BIT3_OFF,
  1108            Bit4        : BIT4_OFF,
  1109            Bit5        : BIT5_OFF,
  1110            Bit6        : BIT6,         /* POR default for all 2xx devices */
  1111            Bit7        : BIT7          /* POR default for all 2xx devices */
  1112        };
  1113        
  1114        /*! Port 2 Direction Register */
  1115        config GpioBits8PxDir_t P2DIR = {
  1116            Bit0        : BIT0_OFF,
  1117            Bit1        : BIT1_OFF,
  1118            Bit2        : BIT2_OFF,
  1119            Bit3        : BIT3_OFF,
  1120            Bit4        : BIT4_OFF,
  1121            Bit5        : BIT5_OFF,
  1122            Bit6        : BIT6_OFF,
  1123            Bit7        : BIT7_OFF
  1124        };
  1125        
  1126        /*! Port 2 Resistor Enable Register */
  1127        config GpioBits8PxRen_t P2REN = {
  1128            Bit0        : BIT0_OFF,
  1129            Bit1        : BIT1_OFF,
  1130            Bit2        : BIT2_OFF,
  1131            Bit3        : BIT3_OFF,
  1132            Bit4        : BIT4_OFF,
  1133            Bit5        : BIT5_OFF,
  1134            Bit6        : BIT6_OFF,
  1135            Bit7        : BIT7_OFF
  1136        };
  1137        
  1138        /*! Port 2 Interrupt Edge Select Register */
  1139        config GpioBits8PxIes_t P2IES = {
  1140            Bit0        : BIT0_OFF,
  1141            Bit1        : BIT1_OFF,
  1142            Bit2        : BIT2_OFF,
  1143            Bit3        : BIT3_OFF,
  1144            Bit4        : BIT4_OFF,
  1145            Bit5        : BIT5_OFF,
  1146            Bit6        : BIT6_OFF,
  1147            Bit7        : BIT7_OFF
  1148        };
  1149        
  1150        /*! Port 2 Interrupt Flag Register */
  1151        config GpioBits8PxIfg_t P2IFG = {
  1152            Bit0        : BIT0_OFF,
  1153            Bit1        : BIT1_OFF,
  1154            Bit2        : BIT2_OFF,
  1155            Bit3        : BIT3_OFF,
  1156            Bit4        : BIT4_OFF,
  1157            Bit5        : BIT5_OFF,
  1158            Bit6        : BIT6_OFF,
  1159            Bit7        : BIT7_OFF
  1160        };
  1161        
  1162        /*! Port 2 Interrupt Enable Register */
  1163        config GpioBits8PxIe_t P2IE = {
  1164            Bit0        : BIT0_OFF,
  1165            Bit1        : BIT1_OFF,
  1166            Bit2        : BIT2_OFF,
  1167            Bit3        : BIT3_OFF,
  1168            Bit4        : BIT4_OFF,
  1169            Bit5        : BIT5_OFF,
  1170            Bit6        : BIT6_OFF,
  1171            Bit7        : BIT7_OFF
  1172        };
  1173    
  1174        /*! Port 3 Output Register */ 
  1175        config GpioBits8PxOut_t P3OUT = {
  1176            Bit0        : BIT0_OFF,
  1177            Bit1        : BIT1_OFF,
  1178            Bit2        : BIT2_OFF,
  1179            Bit3        : BIT3_OFF,
  1180            Bit4        : BIT4_OFF,
  1181            Bit5        : BIT5_OFF,
  1182            Bit6        : BIT6_OFF,
  1183            Bit7        : BIT7_OFF
  1184        };
  1185    
  1186        /*! Port 3 Port Select Register */
  1187        config GpioBits8PxSel_t P3SEL = {
  1188            Bit0        : BIT0_OFF,
  1189            Bit1        : BIT1_OFF,
  1190            Bit2        : BIT2_OFF,
  1191            Bit3        : BIT3_OFF,
  1192            Bit4        : BIT4_OFF,
  1193            Bit5        : BIT5_OFF,
  1194            Bit6        : BIT6_OFF,
  1195            Bit7        : BIT7_OFF
  1196        };
  1197        
  1198        /*! Port 3 Direction Register */
  1199        config GpioBits8PxDir_t P3DIR = {
  1200            Bit0        : BIT0_OFF,
  1201            Bit1        : BIT1_OFF,
  1202            Bit2        : BIT2_OFF,
  1203            Bit3        : BIT3_OFF,
  1204            Bit4        : BIT4_OFF,
  1205            Bit5        : BIT5_OFF,
  1206            Bit6        : BIT6_OFF,
  1207            Bit7        : BIT7_OFF
  1208        };
  1209        
  1210        /*! Port 3 Resistor Enable Register */
  1211        config GpioBits8PxRen_t P3REN = {
  1212            Bit0        : BIT0_OFF,
  1213            Bit1        : BIT1_OFF,
  1214            Bit2        : BIT2_OFF,
  1215            Bit3        : BIT3_OFF,
  1216            Bit4        : BIT4_OFF,
  1217            Bit5        : BIT5_OFF,
  1218            Bit6        : BIT6_OFF,
  1219            Bit7        : BIT7_OFF
  1220        };
  1221    
  1222        /*! Port 4 Output Register */ 
  1223        config GpioBits8PxOut_t P4OUT = {
  1224            Bit0        : BIT0_OFF,
  1225            Bit1        : BIT1_OFF,
  1226            Bit2        : BIT2_OFF,
  1227            Bit3        : BIT3_OFF,
  1228            Bit4        : BIT4_OFF,
  1229            Bit5        : BIT5_OFF,
  1230            Bit6        : BIT6_OFF,
  1231            Bit7        : BIT7_OFF
  1232        };
  1233    
  1234        /*! Port 4 Port Select Register */
  1235        config GpioBits8PxSel_t P4SEL = {
  1236            Bit0        : BIT0_OFF,
  1237            Bit1        : BIT1_OFF,
  1238            Bit2        : BIT2_OFF,
  1239            Bit3        : BIT3_OFF,
  1240            Bit4        : BIT4_OFF,
  1241            Bit5        : BIT5_OFF,
  1242            Bit6        : BIT6_OFF,
  1243            Bit7        : BIT7_OFF
  1244        };
  1245        
  1246        /*! Port 4 Direction Register */
  1247        config GpioBits8PxDir_t P4DIR = {
  1248            Bit0        : BIT0_OFF,
  1249            Bit1        : BIT1_OFF,
  1250            Bit2        : BIT2_OFF,
  1251            Bit3        : BIT3_OFF,
  1252            Bit4        : BIT4_OFF,
  1253            Bit5        : BIT5_OFF,
  1254            Bit6        : BIT6_OFF,
  1255            Bit7        : BIT7_OFF
  1256        };
  1257        
  1258        /*! Port 4 Resistor Enable Register */
  1259        config GpioBits8PxRen_t P4REN = {
  1260            Bit0        : BIT0_OFF,
  1261            Bit1        : BIT1_OFF,
  1262            Bit2        : BIT2_OFF,
  1263            Bit3        : BIT3_OFF,
  1264            Bit4        : BIT4_OFF,
  1265            Bit5        : BIT5_OFF,
  1266            Bit6        : BIT6_OFF,
  1267            Bit7        : BIT7_OFF
  1268        };
  1269    }