|
@@ -20,6 +20,7 @@ const I2C = scripting.addModule("/ti/driverlib/I2C", {}, false);
|
|
|
const I2C1 = I2C.addInstance();
|
|
const I2C1 = I2C.addInstance();
|
|
|
const OPA = scripting.addModule("/ti/driverlib/OPA", {}, false);
|
|
const OPA = scripting.addModule("/ti/driverlib/OPA", {}, false);
|
|
|
const OPA1 = OPA.addInstance();
|
|
const OPA1 = OPA.addInstance();
|
|
|
|
|
+const OPA2 = OPA.addInstance();
|
|
|
const PWM = scripting.addModule("/ti/driverlib/PWM", {}, false);
|
|
const PWM = scripting.addModule("/ti/driverlib/PWM", {}, false);
|
|
|
const PWM1 = PWM.addInstance();
|
|
const PWM1 = PWM.addInstance();
|
|
|
const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL");
|
|
const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL");
|
|
@@ -34,6 +35,7 @@ ADC121.enabledInterrupts = ["DL_ADC12_INTERRUPT_MEM0_RESULT_LOADED"];
|
|
|
ADC121.sampClkDiv = "DL_ADC12_CLOCK_DIVIDE_8";
|
|
ADC121.sampClkDiv = "DL_ADC12_CLOCK_DIVIDE_8";
|
|
|
ADC121.powerDownMode = "DL_ADC12_POWER_DOWN_MODE_MANUAL";
|
|
ADC121.powerDownMode = "DL_ADC12_POWER_DOWN_MODE_MANUAL";
|
|
|
ADC121.sampleTime0 = "125 us";
|
|
ADC121.sampleTime0 = "125 us";
|
|
|
|
|
+ADC121.adcMem0vref = "VREF";
|
|
|
ADC121.peripheral.$assign = "ADC0";
|
|
ADC121.peripheral.$assign = "ADC0";
|
|
|
ADC121.adcPin0Config.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
|
|
ADC121.adcPin0Config.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
|
|
|
|
|
|
|
@@ -79,7 +81,6 @@ I2C1.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3";
|
|
|
I2C1.sclPinConfig.enableConfig = true;
|
|
I2C1.sclPinConfig.enableConfig = true;
|
|
|
|
|
|
|
|
OPA1.$name = "OPA_0";
|
|
OPA1.$name = "OPA_0";
|
|
|
-OPA1.cfg0Gain = "N1_P2";
|
|
|
|
|
OPA1.cfg0OutputPin = "ENABLED";
|
|
OPA1.cfg0OutputPin = "ENABLED";
|
|
|
OPA1.cfg0PSELChannel = "DAC8_OUT";
|
|
OPA1.cfg0PSELChannel = "DAC8_OUT";
|
|
|
OPA1.cfg0NSELChannel = "RTAP";
|
|
OPA1.cfg0NSELChannel = "RTAP";
|
|
@@ -88,6 +89,19 @@ OPA1.peripheral.$assign = "OPA0";
|
|
|
OPA1.peripheral.OutPin.$assign = "PA22";
|
|
OPA1.peripheral.OutPin.$assign = "PA22";
|
|
|
OPA1.OutPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
|
|
OPA1.OutPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
|
|
|
|
|
|
|
|
|
|
+OPA2.$name = "OPA_1";
|
|
|
|
|
+OPA2.cfg0PSELChannel = "IN0_POS";
|
|
|
|
|
+OPA2.cfg0NSELChannel = "IN1_NEG";
|
|
|
|
|
+OPA2.cfg0OutputPin = "ENABLED";
|
|
|
|
|
+OPA2.cfg0MSELChannel = "IN1_NEG";
|
|
|
|
|
+OPA2.peripheral.$assign = "OPA1";
|
|
|
|
|
+OPA2.peripheral.In0PosPin.$assign = "PA18";
|
|
|
|
|
+OPA2.peripheral.In1NegPin.$assign = "PA17/OPA1.IN0-";
|
|
|
|
|
+OPA2.peripheral.OutPin.$assign = "PA16";
|
|
|
|
|
+OPA2.In0PosPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric5";
|
|
|
|
|
+OPA2.In1NegPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric6";
|
|
|
|
|
+OPA2.OutPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric7";
|
|
|
|
|
+
|
|
|
PWM1.$name = "PWM";
|
|
PWM1.$name = "PWM";
|
|
|
PWM1.ccIndex = [1];
|
|
PWM1.ccIndex = [1];
|
|
|
PWM1.timerCount = 320;
|
|
PWM1.timerCount = 320;
|
|
@@ -99,7 +113,7 @@ PWM1.ccp1PinConfig.onlyInternalResistor = scripting.forceWrite(false);
|
|
|
PWM1.ccp1PinConfig.passedPeripheralType = scripting.forceWrite("Digital");
|
|
PWM1.ccp1PinConfig.passedPeripheralType = scripting.forceWrite("Digital");
|
|
|
PWM1.ccp1PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1";
|
|
PWM1.ccp1PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1";
|
|
|
PWM1.PWM_CHANNEL_1.$name = "ti_driverlib_pwm_PWMTimerCC0";
|
|
PWM1.PWM_CHANNEL_1.$name = "ti_driverlib_pwm_PWMTimerCC0";
|
|
|
-PWM1.PWM_CHANNEL_1.ccValue = 320;
|
|
|
|
|
|
|
+PWM1.PWM_CHANNEL_1.invert = true;
|
|
|
|
|
|
|
|
SYSCTL.disableNRSTPin = true;
|
|
SYSCTL.disableNRSTPin = true;
|
|
|
SYSCTL.peripheral.$assign = "SYSCTL";
|
|
SYSCTL.peripheral.$assign = "SYSCTL";
|