metaonly module ti.catalog.msp430.peripherals.comparator.Comparator_Aplus

MSP430F2xx Family Comparator_Aplus Module

XDCscript usage meta-domain sourced in ti/catalog/msp430/peripherals/comparator/Comparator_Aplus.xdc
var Comparator_Aplus = xdc.useModule('ti.catalog.msp430.peripherals.comparator.Comparator_Aplus');
module-wide constants & types
    values of type Comparator_Aplus.CAEX_t// CAEX Bit
 
    values of type Comparator_Aplus.CAF_t// CAF Bit
 
    values of type Comparator_Aplus.CAIES_t// CAIES Bit
 
    values of type Comparator_Aplus.CAIE_t// CAIE Bit
 
    values of type Comparator_Aplus.CAIFG_t// CAIFG Bit
 
    values of type Comparator_Aplus.CAON_t// CAON Bit
 
    values of type Comparator_Aplus.CAPD0_t// CAPD0 Bit
 
    values of type Comparator_Aplus.CAPD1_t// CAPD1 Bit
 
    values of type Comparator_Aplus.CAPD2_t// CAPD2 Bit
 
    values of type Comparator_Aplus.CAPD3_t// CAPD3 Bit
 
    values of type Comparator_Aplus.CAPD4_t// CAPD4 Bit
 
    values of type Comparator_Aplus.CAPD5_t// CAPD5 Bit
 
    values of type Comparator_Aplus.CAPD6_t// CAPD6 Bit
 
    values of type Comparator_Aplus.CAPD7_t// CAPD7 Bit
 
    values of type Comparator_Aplus.CAREF_t// CAREF Bit
 
 
 
    values of type Comparator_Aplus.P2CA0_t// P2CA0 Bit
 
    values of type Comparator_Aplus.P2CA1_t// P2CA1 Bit
 
    values of type Comparator_Aplus.P2CA2_t// P2CA2 Bit
 
    values of type Comparator_Aplus.P2CA3_t// P2CA3 Bit
 
    values of type Comparator_Aplus.P2CA4_t// P2CA4 Bit
 
 
 
 
        obj.register = String  ...
        obj.regForceSet = Bool  ...
module-wide functions
per-instance config parameters
    var params = new Comparator_Aplus.Params// Instance config-params object;
            CAEX: IComparator.CAEX_OFF,
            CARSEL: IComparator.CARSEL_OFF,
            CAREF: IComparator.CAREF_0,
            CAON: IComparator.CAON_OFF,
            CAIES: IComparator.CAIES_OFF,
            CAIE: IComparator.CAIE_OFF,
            CAIFG: IComparator.CAIFG_OFF
        };
            CASHORT: IComparator.CASHORT_OFF,
            P2CA4: IComparator.P2CA4_OFF,
            P2CA3: IComparator.P2CA3_OFF,
            P2CA2: IComparator.P2CA2_OFF,
            P2CA1: IComparator.P2CA1_OFF,
            P2CA0: IComparator.P2CA0_OFF,
            CAF: IComparator.CAF_OFF
        };
        params.CAPD// CAPD, Register = Comparator_Aplus.CAPD_t {
            CAPD7: IComparator.CAPD7_OFF,
            CAPD6: IComparator.CAPD6_OFF,
            CAPD5: IComparator.CAPD5_OFF,
            CAPD4: IComparator.CAPD4_OFF,
            CAPD3: IComparator.CAPD3_OFF,
            CAPD2: IComparator.CAPD2_OFF,
            CAPD1: IComparator.CAPD1_OFF,
            CAPD0: IComparator.CAPD0_OFF
        };
            {
                register: "CACTL1",
                regForceSet: false
            },
            {
                register: "CACTL2",
                regForceSet: false
            },
            {
                register: "CAPD",
                regForceSet: false
            }
        ];
        params.name// Specific peripheral name given by the device = String undefined;
        params.owner// String specifying the entity that manages the peripheral = String undefined;
per-instance creation
    var inst = Comparator_Aplus.create// Create an instance-object(params);
 
 
enum Comparator_Aplus.CAEX_t

CAEX Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.CAEX_t
    const Comparator_Aplus.CAEX_OFF;
    // Disable CAEX bit
    const Comparator_Aplus.CAEX;
    // Enable CAEX bit
 
 
enum Comparator_Aplus.CAF_t

CAF Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.CAF_t
    const Comparator_Aplus.CAF_OFF;
    // Disable CAF bit
    const Comparator_Aplus.CAF;
    // Enable CAF bit
 
 
enum Comparator_Aplus.CAIES_t

CAIES Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.CAIES_t
    const Comparator_Aplus.CAIES_OFF;
    // Rising Edge
    const Comparator_Aplus.CAIES;
    // Falling Edge
 
 
enum Comparator_Aplus.CAIE_t

CAIE Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.CAIE_t
    const Comparator_Aplus.CAIE_OFF;
    // Disable CAIE bit
    const Comparator_Aplus.CAIE;
    // Enable CAIE bit
 
 
enum Comparator_Aplus.CAIFG_t

CAIFG Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.CAIFG_t
    const Comparator_Aplus.CAIFG_OFF;
    // Disable CAIFG bit
    const Comparator_Aplus.CAIFG;
    // Enable CAIFG bit
 
 
enum Comparator_Aplus.CAON_t

CAON Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.CAON_t
    const Comparator_Aplus.CAON_OFF;
    // Disable CAON bit
    const Comparator_Aplus.CAON;
    // Enable CAON bit
 
 
enum Comparator_Aplus.CAPD0_t

CAPD0 Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.CAPD0_t
    const Comparator_Aplus.CAPD0_OFF;
    // Disable CAPD0 bit
    const Comparator_Aplus.CAPD0;
    // Enable CAPD0 bit
 
 
enum Comparator_Aplus.CAPD1_t

CAPD1 Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.CAPD1_t
    const Comparator_Aplus.CAPD1_OFF;
    // Disable CAPD1 bit
    const Comparator_Aplus.CAPD1;
    // Enable CAPD1 bit
 
 
enum Comparator_Aplus.CAPD2_t

CAPD2 Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.CAPD2_t
    const Comparator_Aplus.CAPD2_OFF;
    // Disable CAPD2 bit
    const Comparator_Aplus.CAPD2;
    // Enable CAPD2 bit
 
 
enum Comparator_Aplus.CAPD3_t

CAPD3 Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.CAPD3_t
    const Comparator_Aplus.CAPD3_OFF;
    // Disable CAPD3 bit
    const Comparator_Aplus.CAPD3;
    // Enable CAPD3 bit
 
 
enum Comparator_Aplus.CAPD4_t

CAPD4 Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.CAPD4_t
    const Comparator_Aplus.CAPD4_OFF;
    // Disable CAPD4 bit
    const Comparator_Aplus.CAPD4;
    // Enable CAPD4 bit
 
 
enum Comparator_Aplus.CAPD5_t

CAPD5 Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.CAPD5_t
    const Comparator_Aplus.CAPD5_OFF;
    // Disable CAPD5 bit
    const Comparator_Aplus.CAPD5;
    // Enable CAPD5 bit
 
 
enum Comparator_Aplus.CAPD6_t

CAPD6 Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.CAPD6_t
    const Comparator_Aplus.CAPD6_OFF;
    // Disable CAPD6 bit
    const Comparator_Aplus.CAPD6;
    // Enable CAPD6 bit
 
 
enum Comparator_Aplus.CAPD7_t

CAPD7 Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.CAPD7_t
    const Comparator_Aplus.CAPD7_OFF;
    // Disable CAPD7 bit
    const Comparator_Aplus.CAPD7;
    // Enable CAPD7 bit
 
 
enum Comparator_Aplus.CAREF_t

CAREF Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.CAREF_t
    const Comparator_Aplus.CAREF_0;
    // Reference Off
    const Comparator_Aplus.CAREF_1;
    // 0.25 * VCC
    const Comparator_Aplus.CAREF_2;
    // 0.50 * VCC
    const Comparator_Aplus.CAREF_3;
    // Diode Reference
 
 
enum Comparator_Aplus.CARSEL_t

CARSEL Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.CARSEL_t
    const Comparator_Aplus.CARSEL_OFF;
    // Disable CARSEL bit
    const Comparator_Aplus.CARSEL;
    // Enable CARSEL bit
 
 
enum Comparator_Aplus.CASHORT_t

CASHORT Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.CASHORT_t
    const Comparator_Aplus.CASHORT_OFF;
    // Disable CASHORT bit
    const Comparator_Aplus.CASHORT;
    // Enable CASHORT bit
 
 
enum Comparator_Aplus.P2CA0_t

P2CA0 Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.P2CA0_t
    const Comparator_Aplus.P2CA0_OFF;
    // Disable P2CA0 bit
    const Comparator_Aplus.P2CA0;
    // Enable P2CA0 bit
 
 
enum Comparator_Aplus.P2CA1_t

P2CA1 Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.P2CA1_t
    const Comparator_Aplus.P2CA1_OFF;
    // Disable P2CA1 bit
    const Comparator_Aplus.P2CA1;
    // Enable P2CA1 bit
 
 
enum Comparator_Aplus.P2CA2_t

P2CA2 Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.P2CA2_t
    const Comparator_Aplus.P2CA2_OFF;
    // Disable P2CA2 bit
    const Comparator_Aplus.P2CA2;
    // Enable P2CA2 bit
 
 
enum Comparator_Aplus.P2CA3_t

P2CA3 Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.P2CA3_t
    const Comparator_Aplus.P2CA3_OFF;
    // Disable P2CA3 bit
    const Comparator_Aplus.P2CA3;
    // Enable P2CA3 bit
 
 
enum Comparator_Aplus.P2CA4_t

P2CA4 Bit

XDCscript usage meta-domain
values of type Comparator_Aplus.P2CA4_t
    const Comparator_Aplus.P2CA4_OFF;
    // Disable P2CA4 bit
    const Comparator_Aplus.P2CA4;
    // Enable P2CA4 bit
 
 
struct Comparator_Aplus.CACTL1_t

CACTL1 Register

XDCscript usage meta-domain
var obj = new Comparator_Aplus.CACTL1_t;
 
    obj.CAEX = Comparator_Aplus.CAEX_t  ...
    // Comparator_A+ exchange. This bit exchanges the comparator inputs and inverts the comparator output
    obj.CARSEL = Comparator_Aplus.CARSEL_t  ...
    // Comparator_A+ reference select. This bit selects which terminal the VCAREF is applied to. When CAEX = 0: 0 VCAREF is applied to the + terminal 1 VCAREF is applied to the ? terminal When CAEX = 1: 0 VCAREF is applied to the ? terminal 1 VCAREF is applied to the + terminal
    obj.CAREF = Comparator_Aplus.CAREF_t  ...
    // Comparator_A+ reference. These bits select the reference voltage VCAREF. 00 Internal reference off. An external reference can be applied. 01 0.25*VCC 10 0.50*VCC 11 Diode reference is selected
    obj.CAON = Comparator_Aplus.CAON_t  ...
    // Comparator_A+ on. This bit turns on the comparator. When the comparator is off it consumes no current. The reference circuitry is enabled or disabled independently. 0 Off 1 On
    obj.CAIES = Comparator_Aplus.CAIES_t  ...
    // Comparator_A interrupt edge select 0 Rising edge 1 Falling edge
    obj.CAIE = Comparator_Aplus.CAIE_t  ...
    // Comparator_A+ interrupt enable 0 Disabled 1 Enabled
    obj.CAIFG = Comparator_Aplus.CAIFG_t  ...
    // The Comparator_A+ interrupt flag 0 No interrupt pending 1 Interrupt pending
 
 
struct Comparator_Aplus.CACTL2_t

CACTL1 Register

XDCscript usage meta-domain
var obj = new Comparator_Aplus.CACTL2_t;
 
    obj.CASHORT = Comparator_Aplus.CASHORT_t  ...
    // Input short. This bit shorts the + and - input terminals. 0 Inputs not shorted. 1 Inputs shorted
    obj.P2CA4 = Comparator_Aplus.P2CA4_t  ...
    // Input select. This bit together with P2CA0 selects the + terminal input when CAEX = 0 and the - terminal input when CAEX = 1
    obj.P2CA3 = Comparator_Aplus.P2CA3_t  ...
    // Input select. These bits select the - terminal input when CAEX = 0 and the + terminal input when CAEX = 1. 000 No connection 001 CA1 010 CA2 011 CA3 100 CA4 101 CA5 110 CA6 111 CA7
    obj.P2CA2 = Comparator_Aplus.P2CA2_t  ...
    // Input select. These bits select the - terminal input when CAEX = 0 and the + terminal input when CAEX = 1. 000 No connection 001 CA1 010 CA2 011 CA3 100 CA4 101 CA5 110 CA6 111 CA7
    obj.P2CA1 = Comparator_Aplus.P2CA1_t  ...
    // Input select. These bits select the - terminal input when CAEX = 0 and the + terminal input when CAEX = 1. 000 No connection 001 CA1 010 CA2 011 CA3 100 CA4 101 CA5 110 CA6 111 CA7
    obj.P2CA0 = Comparator_Aplus.P2CA0_t  ...
    // Input select. This bit, together with P2CA4, selects the + terminal input when CAEX = 0 and the - terminal input when CAEX = 1. 00 No connection 01 CA0 10 CA1 11 CA2
    obj.CAF = Comparator_Aplus.CAF_t  ...
    // Comparator_A+ output filter 0 Comparator_A+ output is not filtered 1 Comparator_A+ output is filtered
 
 
struct Comparator_Aplus.CAPD_t

CAPD, Register

XDCscript usage meta-domain
var obj = new Comparator_Aplus.CAPD_t;
 
    obj.CAPD7 = Comparator_Aplus.CAPD7_t  ...
    // CAPD7 Comparator_A+ port disable 0 The input buffer is enabled. 1 The input buffer is disabled
    obj.CAPD6 = Comparator_Aplus.CAPD6_t  ...
    // CAPD6 Comparator_A+ port disable 0 The input buffer is enabled. 1 The input buffer is disabled
    obj.CAPD5 = Comparator_Aplus.CAPD5_t  ...
    // CAPD5 Comparator_A+ port disable 0 The input buffer is enabled. 1 The input buffer is disabled
    obj.CAPD4 = Comparator_Aplus.CAPD4_t  ...
    // CAPD4 Comparator_A+ port disable 0 The input buffer is enabled. 1 The input buffer is disabled
    obj.CAPD3 = Comparator_Aplus.CAPD3_t  ...
    // CAPD3 Comparator_A+ port disable 0 The input buffer is enabled. 1 The input buffer is disabled
    obj.CAPD2 = Comparator_Aplus.CAPD2_t  ...
    // CAPD2 Comparator_A+ port disable 0 The input buffer is enabled. 1 The input buffer is disabled
    obj.CAPD1 = Comparator_Aplus.CAPD1_t  ...
    // CAPD1 Comparator_A+ port disable 0 The input buffer is enabled. 1 The input buffer is disabled
    obj.CAPD0 = Comparator_Aplus.CAPD0_t  ...
    // CAPD0 Comparator_A+ port disable 0 The input buffer is enabled. 1 The input buffer is disabled
 
 
struct Comparator_Aplus.ForceSetDefaultRegister_t

Force Set Default Register

XDCscript usage meta-domain
var obj = new Comparator_Aplus.ForceSetDefaultRegister_t;
 
    obj.register = String  ...
    obj.regForceSet = Bool  ...
 
DETAILS
Type to store if each register needs to be forced initialized even if the register is in default state.
SEE
 
Comparator_Aplus.getAll()  // module-wide

Find all peripherals of a certain type

XDCscript usage meta-domain
Comparator_Aplus.getAll() returns IPeripheral.Instance[]
 
DETAILS
The type of the peripherals returned is defined by the type of the caller.
RETURNS
Returns an array of IPeripheral instances
 
Comparator_Aplus.getRegisters()  // module-wide

Find all registers defined by the peripheral

XDCscript usage meta-domain
Comparator_Aplus.getRegisters() returns String[]
 
RETURNS
Returns an array of register names
Instance Config Parameters

XDCscript usage meta-domain
var params = new Comparator_Aplus.Params;
// Instance config-params object
    params.CACTL1 = Comparator_Aplus.CACTL1_t {
    // CACTL1 Register
        CAEX: IComparator.CAEX_OFF,
        CARSEL: IComparator.CARSEL_OFF,
        CAREF: IComparator.CAREF_0,
        CAON: IComparator.CAON_OFF,
        CAIES: IComparator.CAIES_OFF,
        CAIE: IComparator.CAIE_OFF,
        CAIFG: IComparator.CAIFG_OFF
    };
    params.CACTL2 = Comparator_Aplus.CACTL2_t {
    // CACTL2 Register
        CASHORT: IComparator.CASHORT_OFF,
        P2CA4: IComparator.P2CA4_OFF,
        P2CA3: IComparator.P2CA3_OFF,
        P2CA2: IComparator.P2CA2_OFF,
        P2CA1: IComparator.P2CA1_OFF,
        P2CA0: IComparator.P2CA0_OFF,
        CAF: IComparator.CAF_OFF
    };
    params.CAPD = Comparator_Aplus.CAPD_t {
    // CAPD, Register
        CAPD7: IComparator.CAPD7_OFF,
        CAPD6: IComparator.CAPD6_OFF,
        CAPD5: IComparator.CAPD5_OFF,
        CAPD4: IComparator.CAPD4_OFF,
        CAPD3: IComparator.CAPD3_OFF,
        CAPD2: IComparator.CAPD2_OFF,
        CAPD1: IComparator.CAPD1_OFF,
        CAPD0: IComparator.CAPD0_OFF
    };
    params.forceSetDefaultRegister = Comparator_Aplus.ForceSetDefaultRegister_t[] [
    // Determine if each Register needs to be forced set or not
        {
            register: "CACTL1",
            regForceSet: false
        },
        {
            register: "CACTL2",
            regForceSet: false
        },
        {
            register: "CAPD",
            regForceSet: false
        }
    ];
    params.name = String undefined;
    // Specific peripheral name given by the device
    params.owner = String undefined;
    // String specifying the entity that manages the peripheral
 
config Comparator_Aplus.CACTL1  // instance

CACTL1 Register

XDCscript usage meta-domain
var params = new Comparator_Aplus.Params;
  ...
params.CACTL1 = Comparator_Aplus.CACTL1_t {
    CAEX: IComparator.CAEX_OFF,
    CARSEL: IComparator.CARSEL_OFF,
    CAREF: IComparator.CAREF_0,
    CAON: IComparator.CAON_OFF,
    CAIES: IComparator.CAIES_OFF,
    CAIE: IComparator.CAIE_OFF,
    CAIFG: IComparator.CAIFG_OFF
};
 
 
config Comparator_Aplus.CACTL2  // instance

CACTL2 Register

XDCscript usage meta-domain
var params = new Comparator_Aplus.Params;
  ...
params.CACTL2 = Comparator_Aplus.CACTL2_t {
    CASHORT: IComparator.CASHORT_OFF,
    P2CA4: IComparator.P2CA4_OFF,
    P2CA3: IComparator.P2CA3_OFF,
    P2CA2: IComparator.P2CA2_OFF,
    P2CA1: IComparator.P2CA1_OFF,
    P2CA0: IComparator.P2CA0_OFF,
    CAF: IComparator.CAF_OFF
};
 
 
config Comparator_Aplus.CAPD  // instance

CAPD, Register

XDCscript usage meta-domain
var params = new Comparator_Aplus.Params;
  ...
params.CAPD = Comparator_Aplus.CAPD_t {
    CAPD7: IComparator.CAPD7_OFF,
    CAPD6: IComparator.CAPD6_OFF,
    CAPD5: IComparator.CAPD5_OFF,
    CAPD4: IComparator.CAPD4_OFF,
    CAPD3: IComparator.CAPD3_OFF,
    CAPD2: IComparator.CAPD2_OFF,
    CAPD1: IComparator.CAPD1_OFF,
    CAPD0: IComparator.CAPD0_OFF
};
 
 
config Comparator_Aplus.forceSetDefaultRegister  // instance

Determine if each Register needs to be forced set or not

XDCscript usage meta-domain
var params = new Comparator_Aplus.Params;
  ...
const params.forceSetDefaultRegister = Comparator_Aplus.ForceSetDefaultRegister_t[] [
    {
        register: "CACTL1",
        regForceSet: false
    },
    {
        register: "CACTL2",
        regForceSet: false
    },
    {
        register: "CAPD",
        regForceSet: false
    }
];
 
 
config Comparator_Aplus.name  // instance

Specific peripheral name given by the device

XDCscript usage meta-domain
var params = new Comparator_Aplus.Params;
  ...
params.name = String undefined;
 
DETAILS
Devices can have more than one peripheral of the same type. In such cases, device data sheets give different names to the instances of a same peripheral. For example, the name for a timer module could be TimerA3, and a device that has two such timers can name them TA0 and TA1.
 
config Comparator_Aplus.owner  // instance

String specifying the entity that manages the peripheral

XDCscript usage meta-domain
var params = new Comparator_Aplus.Params;
  ...
params.owner = String undefined;
 
Instance Creation

XDCscript usage meta-domain
var params = new Comparator_Aplus.Params;
// Allocate instance config-params
params.config =   ...
// Assign individual configs
 
var inst = Comparator_Aplus.create(params);
// Create an instance-object
generated on Thu, 23 Aug 2012 18:53:05 GMT