|
|
@@ -9,6 +9,8 @@
|
|
|
/**
|
|
|
* Import the modules used in this configuration.
|
|
|
*/
|
|
|
+const GPIO = scripting.addModule("/ti/driverlib/GPIO", {}, false);
|
|
|
+const GPIO1 = GPIO.addInstance();
|
|
|
const I2C = scripting.addModule("/ti/driverlib/I2C", {}, false);
|
|
|
const I2C1 = I2C.addInstance();
|
|
|
const I2C2 = I2C.addInstance();
|
|
|
@@ -20,6 +22,15 @@ const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig");
|
|
|
/**
|
|
|
* Write custom configuration values to the imported modules.
|
|
|
*/
|
|
|
+GPIO1.$name = "GPIOS";
|
|
|
+GPIO1.associatedPins[0].direction = "INPUT";
|
|
|
+GPIO1.associatedPins[0].$name = "ADDR";
|
|
|
+
|
|
|
+const Board = scripting.addModule("/ti/driverlib/Board", {}, false);
|
|
|
+Board.peripheral.$assign = "DEBUGSS";
|
|
|
+Board.peripheral.swclkPin.$assign = "PA20";
|
|
|
+Board.peripheral.swdioPin.$assign = "PA19";
|
|
|
+
|
|
|
I2C1.$name = "I2C_controller";
|
|
|
I2C1.basicEnableController = true;
|
|
|
I2C1.intController = ["ARBITRATION_LOST","NACK","RXFIFO_TRIGGER","RX_DONE","TXFIFO_TRIGGER","TX_DONE"];
|
|
|
@@ -39,11 +50,6 @@ I2C1.sclPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
|
|
|
I2C1.sclPinConfig.enableConfig = true;
|
|
|
I2C1.sclPinConfig.internalResistor = "PULL_UP";
|
|
|
|
|
|
-const Board = scripting.addModule("/ti/driverlib/Board", {}, false);
|
|
|
-Board.peripheral.$assign = "DEBUGSS";
|
|
|
-Board.peripheral.swclkPin.$assign = "PA20";
|
|
|
-Board.peripheral.swdioPin.$assign = "PA19";
|
|
|
-
|
|
|
I2C2.$name = "I2C_target";
|
|
|
I2C2.basicEnableTarget = true;
|
|
|
I2C2.basicTargetAddress = 0x48;
|
|
|
@@ -80,5 +86,6 @@ ProjectConfig.migrationCondition = true;
|
|
|
* 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.
|
|
|
*/
|
|
|
-I2C2.peripheral.$suggestSolution = "I2C0";
|
|
|
-PWM1.peripheral.$suggestSolution = "TIMG1";
|
|
|
+GPIO1.associatedPins[0].pin.$suggestSolution = "PA2";
|
|
|
+I2C2.peripheral.$suggestSolution = "I2C0";
|
|
|
+PWM1.peripheral.$suggestSolution = "TIMG1";
|