|
@@ -9,6 +9,9 @@
|
|
|
/**
|
|
/**
|
|
|
* Import the modules used in this configuration.
|
|
* Import the modules used in this configuration.
|
|
|
*/
|
|
*/
|
|
|
|
|
+const GPIO = scripting.addModule("/ti/driverlib/GPIO", {}, false);
|
|
|
|
|
+const GPIO1 = GPIO.addInstance();
|
|
|
|
|
+const GPIO2 = GPIO.addInstance();
|
|
|
const I2C = scripting.addModule("/ti/driverlib/I2C", {}, false);
|
|
const I2C = scripting.addModule("/ti/driverlib/I2C", {}, false);
|
|
|
const I2C1 = I2C.addInstance();
|
|
const I2C1 = I2C.addInstance();
|
|
|
const I2C2 = I2C.addInstance();
|
|
const I2C2 = I2C.addInstance();
|
|
@@ -18,14 +21,30 @@ const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig");
|
|
|
/**
|
|
/**
|
|
|
* Write custom configuration values to the imported modules.
|
|
* Write custom configuration values to the imported modules.
|
|
|
*/
|
|
*/
|
|
|
|
|
+GPIO1.$name = "GPIO_Battery_Charging";
|
|
|
|
|
+GPIO1.port = "PORTB";
|
|
|
|
|
+GPIO1.associatedPins.create(2);
|
|
|
|
|
+GPIO1.associatedPins[0].$name = "PIN_PB0";
|
|
|
|
|
+GPIO1.associatedPins[0].pin.$assign = "PB0";
|
|
|
|
|
+GPIO1.associatedPins[1].$name = "PIN_PB4";
|
|
|
|
|
+GPIO1.associatedPins[1].pin.$assign = "PB4";
|
|
|
|
|
+
|
|
|
|
|
+const Board = scripting.addModule("/ti/driverlib/Board", {}, false);
|
|
|
|
|
+
|
|
|
|
|
+GPIO2.$name = "GPIO_Battery_Discharging";
|
|
|
|
|
+GPIO2.port = "PORTB";
|
|
|
|
|
+GPIO2.associatedPins.create(2);
|
|
|
|
|
+GPIO2.associatedPins[0].$name = "PIN_PB8";
|
|
|
|
|
+GPIO2.associatedPins[0].pin.$assign = "PB8";
|
|
|
|
|
+GPIO2.associatedPins[1].$name = "PIN_PB12";
|
|
|
|
|
+GPIO2.associatedPins[1].pin.$assign = "PB12";
|
|
|
|
|
+
|
|
|
I2C1.$name = "I2C_0";
|
|
I2C1.$name = "I2C_0";
|
|
|
I2C1.basicEnableTarget = true;
|
|
I2C1.basicEnableTarget = true;
|
|
|
I2C1.intTarget = ["RXFIFO_TRIGGER","RX_DONE","START","STOP","TXFIFO_TRIGGER","TX_DONE"];
|
|
I2C1.intTarget = ["RXFIFO_TRIGGER","RX_DONE","START","STOP","TXFIFO_TRIGGER","TX_DONE"];
|
|
|
I2C1.sdaPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
|
|
I2C1.sdaPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
|
|
|
I2C1.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1";
|
|
I2C1.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1";
|
|
|
|
|
|
|
|
-const Board = scripting.addModule("/ti/driverlib/Board", {}, false);
|
|
|
|
|
-
|
|
|
|
|
I2C2.$name = "I2C_1";
|
|
I2C2.$name = "I2C_1";
|
|
|
I2C2.basicEnableController = true;
|
|
I2C2.basicEnableController = true;
|
|
|
I2C2.intController = ["ARBITRATION_LOST","NACK","RXFIFO_TRIGGER","RX_DONE","TXFIFO_TRIGGER","TX_DONE"];
|
|
I2C2.intController = ["ARBITRATION_LOST","NACK","RXFIFO_TRIGGER","RX_DONE","TXFIFO_TRIGGER","TX_DONE"];
|
|
@@ -40,12 +59,12 @@ ProjectConfig.deviceSpin = "MSPM0G3507";
|
|
|
* version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
|
|
* version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
|
|
|
* re-solve from scratch.
|
|
* re-solve from scratch.
|
|
|
*/
|
|
*/
|
|
|
-I2C1.peripheral.$suggestSolution = "I2C1";
|
|
|
|
|
-I2C1.peripheral.sdaPin.$suggestSolution = "PA10";
|
|
|
|
|
-I2C1.peripheral.sclPin.$suggestSolution = "PA11";
|
|
|
|
|
Board.peripheral.$suggestSolution = "DEBUGSS";
|
|
Board.peripheral.$suggestSolution = "DEBUGSS";
|
|
|
Board.peripheral.swclkPin.$suggestSolution = "PA20";
|
|
Board.peripheral.swclkPin.$suggestSolution = "PA20";
|
|
|
Board.peripheral.swdioPin.$suggestSolution = "PA19";
|
|
Board.peripheral.swdioPin.$suggestSolution = "PA19";
|
|
|
|
|
+I2C1.peripheral.$suggestSolution = "I2C1";
|
|
|
|
|
+I2C1.peripheral.sdaPin.$suggestSolution = "PA10";
|
|
|
|
|
+I2C1.peripheral.sclPin.$suggestSolution = "PA11";
|
|
|
I2C2.peripheral.$suggestSolution = "I2C0";
|
|
I2C2.peripheral.$suggestSolution = "I2C0";
|
|
|
I2C2.peripheral.sdaPin.$suggestSolution = "PA0";
|
|
I2C2.peripheral.sdaPin.$suggestSolution = "PA0";
|
|
|
I2C2.peripheral.sclPin.$suggestSolution = "PA1";
|
|
I2C2.peripheral.sclPin.$suggestSolution = "PA1";
|