|
@@ -16,6 +16,9 @@ const I2C1 = I2C.addInstance();
|
|
|
const I2C2 = I2C.addInstance();
|
|
const I2C2 = I2C.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 PWM2 = PWM.addInstance();
|
|
|
|
|
+const PWM3 = PWM.addInstance();
|
|
|
|
|
+const PWM4 = PWM.addInstance();
|
|
|
const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL");
|
|
const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL");
|
|
|
const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig");
|
|
const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig");
|
|
|
|
|
|
|
@@ -25,7 +28,7 @@ const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig");
|
|
|
GPIO1.$name = "GPIOS";
|
|
GPIO1.$name = "GPIOS";
|
|
|
GPIO1.associatedPins[0].direction = "INPUT";
|
|
GPIO1.associatedPins[0].direction = "INPUT";
|
|
|
GPIO1.associatedPins[0].$name = "ADDR";
|
|
GPIO1.associatedPins[0].$name = "ADDR";
|
|
|
-GPIO1.associatedPins[0].pin.$assign = "PA22";
|
|
|
|
|
|
|
+GPIO1.associatedPins[0].pin.$assign = "PA24/OPA0.IN0-";
|
|
|
|
|
|
|
|
const Board = scripting.addModule("/ti/driverlib/Board", {}, false);
|
|
const Board = scripting.addModule("/ti/driverlib/Board", {}, false);
|
|
|
Board.peripheral.$assign = "DEBUGSS";
|
|
Board.peripheral.$assign = "DEBUGSS";
|
|
@@ -68,14 +71,51 @@ I2C2.sclPinConfig.onlyInternalResistor = scripting.forceWrite(false);
|
|
|
I2C2.sclPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
|
|
I2C2.sclPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
|
|
|
I2C2.sclPinConfig.enableConfig = true;
|
|
I2C2.sclPinConfig.enableConfig = true;
|
|
|
|
|
|
|
|
-PWM1.$name = "PWM_0";
|
|
|
|
|
-PWM1.ccIndex = [0];
|
|
|
|
|
-PWM1.timerCount = 320;
|
|
|
|
|
-PWM1.timerStartTimer = true;
|
|
|
|
|
-PWM1.peripheral.ccp0Pin.$assign = "PA26";
|
|
|
|
|
-PWM1.PWM_CHANNEL_0.$name = "ti_driverlib_pwm_PWMTimerCC0";
|
|
|
|
|
-PWM1.PWM_CHANNEL_0.dutyCycle = 10;
|
|
|
|
|
-PWM1.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
|
|
|
|
|
|
|
+PWM1.timerCount = 320;
|
|
|
|
|
+PWM1.timerStartTimer = true;
|
|
|
|
|
+PWM1.ccIndex = [1];
|
|
|
|
|
+PWM1.$name = "PWM_3";
|
|
|
|
|
+PWM1.peripheral.$assign = "TIMG0";
|
|
|
|
|
+PWM1.peripheral.ccp1Pin.$assign = "PA6";
|
|
|
|
|
+PWM1.ccp1PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric11";
|
|
|
|
|
+PWM1.ccp1PinConfig.direction = scripting.forceWrite("OUTPUT");
|
|
|
|
|
+PWM1.ccp1PinConfig.hideOutputInversion = scripting.forceWrite(false);
|
|
|
|
|
+PWM1.ccp1PinConfig.onlyInternalResistor = scripting.forceWrite(false);
|
|
|
|
|
+PWM1.ccp1PinConfig.passedPeripheralType = scripting.forceWrite("Digital");
|
|
|
|
|
+PWM1.PWM_CHANNEL_1.$name = "ti_driverlib_pwm_PWMTimerCC0";
|
|
|
|
|
+
|
|
|
|
|
+PWM2.ccIndex = [1];
|
|
|
|
|
+PWM2.$name = "PWM_2";
|
|
|
|
|
+PWM2.peripheral.$assign = "TIMG1";
|
|
|
|
|
+PWM2.peripheral.ccp1Pin.$assign = "PA2";
|
|
|
|
|
+PWM2.ccp1PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric6";
|
|
|
|
|
+PWM2.ccp1PinConfig.direction = scripting.forceWrite("OUTPUT");
|
|
|
|
|
+PWM2.ccp1PinConfig.hideOutputInversion = scripting.forceWrite(false);
|
|
|
|
|
+PWM2.ccp1PinConfig.onlyInternalResistor = scripting.forceWrite(false);
|
|
|
|
|
+PWM2.ccp1PinConfig.passedPeripheralType = scripting.forceWrite("Digital");
|
|
|
|
|
+PWM2.PWM_CHANNEL_1.$name = "ti_driverlib_pwm_PWMTimerCC1";
|
|
|
|
|
+
|
|
|
|
|
+PWM3.ccIndex = [1];
|
|
|
|
|
+PWM3.$name = "PWM_1";
|
|
|
|
|
+PWM3.peripheral.$assign = "TIMG2";
|
|
|
|
|
+PWM3.peripheral.ccp1Pin.$assign = "PA22";
|
|
|
|
|
+PWM3.ccp1PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric8";
|
|
|
|
|
+PWM3.ccp1PinConfig.direction = scripting.forceWrite("OUTPUT");
|
|
|
|
|
+PWM3.ccp1PinConfig.hideOutputInversion = scripting.forceWrite(false);
|
|
|
|
|
+PWM3.ccp1PinConfig.onlyInternalResistor = scripting.forceWrite(false);
|
|
|
|
|
+PWM3.ccp1PinConfig.passedPeripheralType = scripting.forceWrite("Digital");
|
|
|
|
|
+PWM3.PWM_CHANNEL_1.$name = "ti_driverlib_pwm_PWMTimerCC2";
|
|
|
|
|
+
|
|
|
|
|
+PWM4.ccIndex = [1];
|
|
|
|
|
+PWM4.$name = "PWM_0";
|
|
|
|
|
+PWM4.peripheral.$assign = "TIMG4";
|
|
|
|
|
+PWM4.peripheral.ccp1Pin.$assign = "PA25";
|
|
|
|
|
+PWM4.ccp1PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric10";
|
|
|
|
|
+PWM4.ccp1PinConfig.direction = scripting.forceWrite("OUTPUT");
|
|
|
|
|
+PWM4.ccp1PinConfig.hideOutputInversion = scripting.forceWrite(false);
|
|
|
|
|
+PWM4.ccp1PinConfig.onlyInternalResistor = scripting.forceWrite(false);
|
|
|
|
|
+PWM4.ccp1PinConfig.passedPeripheralType = scripting.forceWrite("Digital");
|
|
|
|
|
+PWM4.PWM_CHANNEL_1.$name = "ti_driverlib_pwm_PWMTimerCC3";
|
|
|
|
|
|
|
|
SYSCTL.disableNRSTPin = true;
|
|
SYSCTL.disableNRSTPin = true;
|
|
|
SYSCTL.peripheral.$assign = "SYSCTL";
|
|
SYSCTL.peripheral.$assign = "SYSCTL";
|
|
@@ -88,4 +128,3 @@ ProjectConfig.migrationCondition = true;
|
|
|
* re-solve from scratch.
|
|
* re-solve from scratch.
|
|
|
*/
|
|
*/
|
|
|
I2C2.peripheral.$suggestSolution = "I2C0";
|
|
I2C2.peripheral.$suggestSolution = "I2C0";
|
|
|
-PWM1.peripheral.$suggestSolution = "TIMG1";
|
|
|