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    /*!
    13     *  ======== OA_2 ========
    14     *  MSP430 General Purpose Operational Amplifier
    15     *
    16     *  The module is named OA_2 because it only supports two OAs. A device
    17     *  containing three op-amps would require a separate module.
    18     */
    19    metaonly module OA_2 inherits IOA {
    20        /*!
    21         *  ======== create ========
    22         *  Create an instance of this peripheral
    23         */
    24        create();
    25        
    26    instance:
    27        /*! OA0 control register 0 */    
    28        config OAxCTL0_t OA0CTL0 = {
    29          OAN : OAN_0,
    30          OAP : OAP_0,
    31          OAPM : OAPM_0,
    32          OAADC0 : OAADC0_OFF,
    33          OAADC1 : OAADC1_OFF 
    34        };
    35    
    36        /*! OA0 control register 1 */    
    37        config OAxCTL1_t OA0CTL1 = {
    38          OAFBR : OAFBR_0,
    39          OAFC : OAFC_0,
    40          OANEXT : OANEXT_OFF,
    41          OARRIP : OARRIP_OFF, 
    42        };
    43        
    44        /*! OA1 control register 0 */    
    45        config OAxCTL0_t OA1CTL0 = {
    46          OAN : OAN_0,
    47          OAP : OAP_0,
    48          OAPM : OAPM_0,
    49          OAADC0 : OAADC0_OFF,
    50          OAADC1 : OAADC1_OFF 
    51        };
    52    
    53        /*! OA1 control register 1 */    
    54        config OAxCTL1_t OA1CTL1 = {
    55          OAFBR : OAFBR_0,
    56          OAFC : OAFC_0,
    57          OANEXT : OANEXT_OFF,
    58          OARRIP : OARRIP_OFF, 
    59        };
    60        
    61        /*! Determine if each Register needs to be forced set or not */
    62        readonly config ForceSetDefaultRegister_t forceSetDefaultRegister[] =
    63        [
    64            { register : "OA0CTL0" , regForceSet : false },
    65            { register : "OA0CTL1" , regForceSet : false },
    66            { register : "OA1CTL0" , regForceSet : false },
    67            { register : "OA1CTL1" , regForceSet : false }
    68        ];
    69    }