|
@@ -21,7 +21,6 @@ const GPIO2 = GPIO.addInstance();
|
|
|
const GPIO3 = GPIO.addInstance();
|
|
|
const GPIO4 = GPIO.addInstance();
|
|
|
const GPIO5 = GPIO.addInstance();
|
|
|
-const GPIO6 = GPIO.addInstance();
|
|
|
const MATHACL = scripting.addModule("/ti/driverlib/MATHACL");
|
|
|
const MCAN = scripting.addModule("/ti/driverlib/MCAN", {}, false);
|
|
|
const MCAN1 = MCAN.addInstance();
|
|
@@ -126,11 +125,11 @@ ADC122.peripheral.adcPin5.$assign = "PB18";
|
|
|
ADC122.peripheral.adcPin4.$assign = "PB17";
|
|
|
ADC122.peripheral.adcPin7.$assign = "PA21";
|
|
|
ADC122.peripheral.adcPin0.$assign = "PA15";
|
|
|
+ADC122.adcPin0Config.$name = "ti_driverlib_gpio_GPIOPinGeneric7";
|
|
|
ADC122.adcPin4Config.$name = "ti_driverlib_gpio_GPIOPinGeneric19";
|
|
|
ADC122.adcPin5Config.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
|
|
|
ADC122.adcPin6Config.$name = "ti_driverlib_gpio_GPIOPinGeneric23";
|
|
|
ADC122.adcPin7Config.$name = "ti_driverlib_gpio_GPIOPinGeneric22";
|
|
|
-ADC122.adcPin0Config.$name = "ti_driverlib_gpio_GPIOPinGeneric7";
|
|
|
|
|
|
Board.peripheral.$assign = "DEBUGSS";
|
|
|
|
|
@@ -147,29 +146,34 @@ COMP1.setDACCode0 = 0x99;
|
|
|
COMP1.peripheral.compPinPos1.$assign = "PB24";
|
|
|
COMP1.compPinPos1Config.$name = "ti_driverlib_gpio_GPIOPinGeneric21";
|
|
|
|
|
|
-GPIO1.$name = "INPUT";
|
|
|
-GPIO1.associatedPins.create(4);
|
|
|
-GPIO1.associatedPins[0].$name = "BREAK";
|
|
|
-GPIO1.associatedPins[0].direction = "INPUT";
|
|
|
-GPIO1.associatedPins[0].assignedPort = "PORTA";
|
|
|
-GPIO1.associatedPins[0].assignedPin = "28";
|
|
|
-GPIO1.associatedPins[0].polarity = "RISE";
|
|
|
-GPIO1.associatedPins[0].pin.$assign = "PA28";
|
|
|
-GPIO1.associatedPins[1].direction = "INPUT";
|
|
|
-GPIO1.associatedPins[1].assignedPort = "PORTA";
|
|
|
-GPIO1.associatedPins[1].assignedPin = "9";
|
|
|
-GPIO1.associatedPins[1].$name = "Cadence_Speed";
|
|
|
-GPIO1.associatedPins[1].pin.$assign = "PA9";
|
|
|
-GPIO1.associatedPins[2].direction = "INPUT";
|
|
|
-GPIO1.associatedPins[2].$name = "Cadence_Dir";
|
|
|
-GPIO1.associatedPins[2].assignedPort = "PORTB";
|
|
|
-GPIO1.associatedPins[2].assignedPin = "7";
|
|
|
-GPIO1.associatedPins[2].pin.$assign = "PB7";
|
|
|
-GPIO1.associatedPins[3].$name = "PIN_GEAR";
|
|
|
-GPIO1.associatedPins[3].direction = "INPUT";
|
|
|
-GPIO1.associatedPins[3].assignedPort = "PORTB";
|
|
|
-GPIO1.associatedPins[3].assignedPin = "15";
|
|
|
-GPIO1.associatedPins[3].pin.$assign = "PB15";
|
|
|
+GPIO1.$name = "INPUT";
|
|
|
+GPIO1.associatedPins.create(5);
|
|
|
+GPIO1.associatedPins[0].$name = "BREAK";
|
|
|
+GPIO1.associatedPins[0].direction = "INPUT";
|
|
|
+GPIO1.associatedPins[0].assignedPort = "PORTA";
|
|
|
+GPIO1.associatedPins[0].assignedPin = "28";
|
|
|
+GPIO1.associatedPins[0].polarity = "RISE";
|
|
|
+GPIO1.associatedPins[0].internalResistor = "PULL_UP";
|
|
|
+GPIO1.associatedPins[0].pin.$assign = "PA28";
|
|
|
+GPIO1.associatedPins[1].direction = "INPUT";
|
|
|
+GPIO1.associatedPins[1].assignedPort = "PORTA";
|
|
|
+GPIO1.associatedPins[1].assignedPin = "9";
|
|
|
+GPIO1.associatedPins[1].$name = "Cadence_Dir";
|
|
|
+GPIO1.associatedPins[2].direction = "INPUT";
|
|
|
+GPIO1.associatedPins[2].assignedPort = "PORTB";
|
|
|
+GPIO1.associatedPins[2].assignedPin = "7";
|
|
|
+GPIO1.associatedPins[2].$name = "Cadence_Speed";
|
|
|
+GPIO1.associatedPins[3].$name = "PIN_GEAR";
|
|
|
+GPIO1.associatedPins[3].direction = "INPUT";
|
|
|
+GPIO1.associatedPins[3].assignedPort = "PORTB";
|
|
|
+GPIO1.associatedPins[3].assignedPin = "15";
|
|
|
+GPIO1.associatedPins[3].internalResistor = "PULL_UP";
|
|
|
+GPIO1.associatedPins[3].pin.$assign = "PB15";
|
|
|
+GPIO1.associatedPins[4].$name = "Speed_In";
|
|
|
+GPIO1.associatedPins[4].direction = "INPUT";
|
|
|
+GPIO1.associatedPins[4].assignedPort = "PORTA";
|
|
|
+GPIO1.associatedPins[4].assignedPin = "31";
|
|
|
+GPIO1.associatedPins[4].internalResistor = "PULL_UP";
|
|
|
|
|
|
GPIO2.$name = "HALL";
|
|
|
GPIO2.associatedPins.create(3);
|
|
@@ -202,23 +206,23 @@ GPIO3.associatedPins[0].assignedPort = "PORTB";
|
|
|
GPIO3.associatedPins[0].assignedPin = "8";
|
|
|
GPIO3.associatedPins[0].pin.$assign = "PB8";
|
|
|
|
|
|
-GPIO4.$name = "LIGHT_DETECT";
|
|
|
-GPIO4.associatedPins[0].$name = "LEFT";
|
|
|
-GPIO4.associatedPins[0].direction = "INPUT";
|
|
|
-GPIO4.associatedPins[0].interruptEn = true;
|
|
|
-GPIO4.associatedPins[0].polarity = "RISE";
|
|
|
-GPIO4.associatedPins[0].pin.$assign = "PA3";
|
|
|
-
|
|
|
-GPIO5.$name = "GPIO_BIKESPEED";
|
|
|
-GPIO5.associatedPins[0].$name = "PIN_speed";
|
|
|
-GPIO5.associatedPins[0].direction = "INPUT";
|
|
|
-
|
|
|
-GPIO6.$name = "GPIO_B_LED";
|
|
|
-GPIO6.associatedPins.create(2);
|
|
|
-GPIO6.associatedPins[0].$name = "PIN_EN";
|
|
|
-GPIO6.associatedPins[0].pin.$assign = "PB6";
|
|
|
-GPIO6.associatedPins[1].$name = "PIN_SEL";
|
|
|
-GPIO6.associatedPins[1].pin.$assign = "PB16";
|
|
|
+GPIO4.$name = "LIGHT_DETECT";
|
|
|
+GPIO4.associatedPins[0].direction = "INPUT";
|
|
|
+GPIO4.associatedPins[0].interruptEn = true;
|
|
|
+GPIO4.associatedPins[0].polarity = "RISE";
|
|
|
+GPIO4.associatedPins[0].$name = "LIGHT_PWM_F";
|
|
|
+GPIO4.associatedPins[0].assignedPort = "PORTA";
|
|
|
+GPIO4.associatedPins[0].assignedPin = "23";
|
|
|
+
|
|
|
+GPIO5.$name = "GPIO_B_LED";
|
|
|
+GPIO5.associatedPins.create(2);
|
|
|
+GPIO5.associatedPins[0].$name = "PIN_EN";
|
|
|
+GPIO5.associatedPins[0].assignedPort = "PORTB";
|
|
|
+GPIO5.associatedPins[0].assignedPin = "16";
|
|
|
+GPIO5.associatedPins[0].pin.$assign = "PB16";
|
|
|
+GPIO5.associatedPins[1].$name = "PIN_SEL";
|
|
|
+GPIO5.associatedPins[1].assignedPort = "PORTB";
|
|
|
+GPIO5.associatedPins[1].assignedPin = "6";
|
|
|
|
|
|
MCAN1.$name = "MCAN0";
|
|
|
MCAN1.desiredNomRate = 250;
|
|
@@ -426,4 +430,8 @@ scripting.suppress("Migrating requires going through the Switch Board or Device
|
|
|
Board.peripheral.swclkPin.$suggestSolution = "PA20";
|
|
|
Board.peripheral.swdioPin.$suggestSolution = "PA19";
|
|
|
COMP1.peripheral.$suggestSolution = "COMP1";
|
|
|
-GPIO5.associatedPins[0].pin.$suggestSolution = "PA31";
|
|
|
+GPIO1.associatedPins[1].pin.$suggestSolution = "PA9";
|
|
|
+GPIO1.associatedPins[2].pin.$suggestSolution = "PB7";
|
|
|
+GPIO1.associatedPins[4].pin.$suggestSolution = "PA31";
|
|
|
+GPIO4.associatedPins[0].pin.$suggestSolution = "PA23";
|
|
|
+GPIO5.associatedPins[1].pin.$suggestSolution = "PB6";
|