1    /*
     2     * Copyright (c) 2016, Texas Instruments Incorporated
     3     * All rights reserved.
     4     *
     5     * Redistribution and use in source and binary forms, with or without
     6     * modification, are permitted provided that the following conditions
     7     * are met:
     8     *
     9     * *  Redistributions of source code must retain the above copyright
    10     *    notice, this list of conditions and the following disclaimer.
    11     *
    12     * *  Redistributions in binary form must reproduce the above copyright
    13     *    notice, this list of conditions and the following disclaimer in the
    14     *    documentation and/or other materials provided with the distribution.
    15     *
    16     * *  Neither the name of Texas Instruments Incorporated nor the names of
    17     *    its contributors may be used to endorse or promote products derived
    18     *    from this software without specific prior written permission.
    19     *
    20     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    21     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    22     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    23     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    24     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    25     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    26     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
    27     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    28     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
    29     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    30     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    31     */
    32    
    33    /*!
    34     *  ======== IComparator ========
    35     *  MSP430 IComparator interface
    36     */
    37    metaonly interface IComparator inherits xdc.platform.IPeripheral {
    38    
    39        /*! CAEX Bit */
    40        enum CAEX_t {
    41            CAEX_OFF = 0x0000,          /*! Disable CAEX bit */
    42            CAEX     = 0x0080           /*! Enable  CAEX bit */
    43        };
    44    
    45        /*! CARSEL Bit */
    46        enum CARSEL_t {
    47            CARSEL_OFF     = 0x0000,    /*! Disable CARSEL bit */
    48            CARSEL         = 0x0040     /*! Enable  CARSEL bit */
    49         };
    50    
    51         /*! CAREF Bit */
    52         enum CAREF_t {
    53             CAREF_0 = 0x0000,          /*! Reference Off */
    54             CAREF_1 = 0x0010,          /*! 0.25 * VCC */
    55             CAREF_2 = 0x0020,          /*! 0.50 * VCC */
    56             CAREF_3 = 0x0030           /*! Diode Reference */
    57         };
    58    
    59        /*! CAON Bit */
    60        enum CAON_t {
    61             CAON_OFF = 0x0000,         /*! Disable CAON bit */
    62             CAON = 0x0008              /*! Enable  CAON bit */
    63          };
    64    
    65        /*! CAIES Bit */
    66         enum CAIES_t {
    67             CAIES_OFF = 0x0000,        /*! Rising Edge */
    68             CAIES = 0x0004             /*! Falling Edge */
    69         };
    70    
    71         /*! CAIE Bit */
    72         enum CAIE_t {
    73             CAIE_OFF = 0x0000,         /*! Disable CAIE bit */
    74             CAIE = 0x0002              /*! Enable  CAIE bit */
    75         };
    76    
    77         /*! CAIFG Bit */
    78         enum CAIFG_t {
    79             CAIFG_OFF = 0x0000,        /*! Disable CAIFG bit */
    80             CAIFG = 0x0001             /*! Enable  CAIFG bit */
    81         };
    82    
    83         /*! CASHORT Bit */
    84         enum CASHORT_t {
    85             CASHORT_OFF = 0x0000,      /*! Disable CASHORT bit */
    86             CASHORT = 0x0080           /*! Enable  CASHORT bit */
    87         };
    88    
    89         /*! P2CA4 Bit */
    90         enum P2CA4_t {
    91             P2CA4_OFF = 0x0000,        /*! Disable P2CA4 bit */
    92             P2CA4 = 0x0040             /*! Enable  P2CA4 bit */
    93         };
    94    
    95          /*! P2CA3 Bit */
    96         enum P2CA3_t {
    97             P2CA3_OFF = 0x0000,        /*! Disable P2CA3 bit */
    98             P2CA3 = 0x0020             /*! Enable  P2CA3 bit */
    99         };
   100    
   101          /*! P2CA2 Bit */
   102         enum P2CA2_t {
   103             P2CA2_OFF = 0x0000,        /*! Disable P2CA2 bit */
   104             P2CA2 = 0x0010             /*! Enable  P2CA2 bit */
   105         };
   106    
   107          /*! P2CA1 Bit */
   108         enum P2CA1_t {
   109             P2CA1_OFF = 0x0000,        /*! Disable P2CA1 bit */
   110             P2CA1 = 0x0008             /*! Enable  P2CA1 bit */
   111         };
   112    
   113    
   114         /*! P2CA0 Bit */
   115         enum P2CA0_t {
   116             P2CA0_OFF = 0x0000,        /*! Disable P2CA0 bit */
   117             P2CA0 = 0x0004             /*! Enable  P2CA0 bit */
   118         };
   119    
   120         /*! CAF Bit */
   121         enum CAF_t {
   122             CAF_OFF = 0x0000,          /*! Disable CAF bit */
   123             CAF = 0x0002               /*! Enable  CAF bit */
   124         };
   125    
   126         /*! CAPD7 Bit */
   127         enum CAPD7_t {
   128             CAPD7_OFF = 0x0000,        /*! Disable CAPD7 bit */
   129             CAPD7 = 0x0001             /*! Enable  CAPD7 bit */
   130         };
   131    
   132         /*! CAPD6 Bit */
   133         enum CAPD6_t {
   134             CAPD6_OFF = 0x0000,        /*! Disable CAPD6 bit */
   135             CAPD6 = 0x0002             /*! Enable  CAPD6 bit */
   136         };
   137    
   138         /*! CAPD5 Bit */
   139         enum CAPD5_t {
   140             CAPD5_OFF = 0x0000,        /*! Disable CAPD5 bit */
   141             CAPD5 = 0x0004             /*! Enable  CAPD5 bit */
   142         };
   143    
   144         /*! CAPD4 Bit */
   145         enum CAPD4_t {
   146             CAPD4_OFF = 0x0000,        /*! Disable CAPD4 bit */
   147             CAPD4 = 0x0008             /*! Enable  CAPD4 bit */
   148         };
   149    
   150         /*! CAPD3 Bit */
   151         enum CAPD3_t {
   152             CAPD3_OFF = 0x0000,        /*! Disable CAPD3 bit */
   153             CAPD3 = 0x0010             /*! Enable  CAPD3 bit */
   154         };
   155    
   156         /*! CAPD2 Bit */
   157         enum CAPD2_t {
   158             CAPD2_OFF = 0x0000,        /*! Disable CAPD2 bit */
   159             CAPD2 = 0x0020             /*! Enable  CAPD2 bit */
   160         };
   161    
   162         /*! CAPD1 Bit */
   163         enum CAPD1_t {
   164             CAPD1_OFF = 0x0000,        /*! Disable CAPD1 bit */
   165             CAPD1 = 0x0040             /*! Enable  CAPD1 bit */
   166         };
   167    
   168         /*! CAPD0 Bit */
   169         enum CAPD0_t {
   170             CAPD0_OFF = 0x0000,        /*! Disable CAPD0 bit */
   171             CAPD0 = 0x0080             /*! Enable  CAPD0 bit */
   172         };
   173    
   174    
   175        /*!
   176        *  ======== ForceSetDefaultRegister_t ========
   177        *  Force Set Default Register
   178        *
   179        *  Type to store if each register needs to be forced initialized
   180        *  even if the register is in default state.
   181        *
   182        *  @see #ForceSetDefaultRegister_t
   183        */
   184        struct ForceSetDefaultRegister_t {
   185            String     register;
   186            Bool       regForceSet;
   187        }
   188    
   189        /*!
   190        *  ======== regIntVect_t ========
   191        *  Interrupt vector description
   192        *
   193        *  Type to describe a single interrupt vector pin and all its possible
   194        *  configurations.
   195        *
   196        *  @see #regIntVect_t
   197        */
   198        struct regIntVect_t {
   199            String                    registerName;
   200            String                    registerDescription;
   201            String                    isrToggleString;
   202            String                    priorityName;
   203            Bool                      interruptEnable;
   204            Bool                      interruptHandler;
   205            Int                       priority;
   206        }
   207    instance:
   208    
   209    }