|
|
@@ -15,6 +15,8 @@ const GPIO2 = GPIO.addInstance();
|
|
|
const I2C = scripting.addModule("/ti/driverlib/I2C", {}, false);
|
|
|
const I2C1 = I2C.addInstance();
|
|
|
const I2C2 = I2C.addInstance();
|
|
|
+const PWM = scripting.addModule("/ti/driverlib/PWM", {}, false);
|
|
|
+const PWM1 = PWM.addInstance();
|
|
|
const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL");
|
|
|
const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig");
|
|
|
|
|
|
@@ -53,6 +55,14 @@ I2C2.peripheral.sclPin.$assign = "PA4";
|
|
|
I2C2.sdaPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric2";
|
|
|
I2C2.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3";
|
|
|
|
|
|
+PWM1.$name = "PWM_0";
|
|
|
+PWM1.timerCount = 320;
|
|
|
+PWM1.timerStartTimer = true;
|
|
|
+PWM1.ccIndex = [0];
|
|
|
+PWM1.peripheral.ccp0Pin.$assign = "PA5";
|
|
|
+PWM1.PWM_CHANNEL_0.$name = "ti_driverlib_pwm_PWMTimerCC0";
|
|
|
+PWM1.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
|
|
|
+
|
|
|
|
|
|
ProjectConfig.deviceSpin = "MSPM0G3507";
|
|
|
|
|
|
@@ -68,4 +78,5 @@ I2C1.peripheral.$suggestSolution = "I2C0";
|
|
|
I2C1.peripheral.sdaPin.$suggestSolution = "PA0";
|
|
|
I2C1.peripheral.sclPin.$suggestSolution = "PA1";
|
|
|
I2C2.peripheral.$suggestSolution = "I2C1";
|
|
|
+PWM1.peripheral.$suggestSolution = "TIMG0";
|
|
|
SYSCTL.peripheral.$suggestSolution = "SYSCTL";
|