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