57 lines
2.0 KiB
Plaintext
57 lines
2.0 KiB
Plaintext
// @cliArgs --board /ti/boards/CC3220S_LAUNCHXL --rtos nortos
|
|
|
|
/**
|
|
* Import the modules used in this configuration.
|
|
*/
|
|
const GPIO = scripting.addModule("/ti/drivers/GPIO", {}, false);
|
|
const GPIO1 = GPIO.addInstance();
|
|
const GPIO2 = GPIO.addInstance();
|
|
const PWM = scripting.addModule("/ti/drivers/PWM", {}, false);
|
|
const PWM1 = PWM.addInstance();
|
|
const RTOS = scripting.addModule("/ti/drivers/RTOS");
|
|
const Timer = scripting.addModule("/ti/drivers/Timer", {}, false);
|
|
const Timer1 = Timer.addInstance();
|
|
const Timer2 = Timer.addInstance();
|
|
const UART = scripting.addModule("/ti/drivers/UART", {}, false);
|
|
const UART1 = UART.addInstance();
|
|
|
|
/**
|
|
* Write custom configuration values to the imported modules.
|
|
*/
|
|
GPIO1.mode = "Output";
|
|
GPIO1.$name = "Board_TRIGGER";
|
|
GPIO1.gpioPin.$assign = "boosterpack.5";
|
|
|
|
GPIO2.$name = "Board_ECHO";
|
|
GPIO2.gpioPin.$assign = "boosterpack.8";
|
|
|
|
PWM1.$name = "CONFIG_PWM_0";
|
|
PWM1.$hardware = system.deviceData.board.components.LED_GREEN;
|
|
|
|
const Power = scripting.addModule("/ti/drivers/Power", {}, true);
|
|
Power.parkPins.$name = "ti_drivers_power_PowerCC32XXPins0";
|
|
|
|
RTOS.name = "NoRTOS";
|
|
|
|
Timer1.$name = "CONFIG_TIMER_0";
|
|
Timer1.timerType = "32 Bits";
|
|
|
|
Timer2.$name = "CONFIG_TIMER_1";
|
|
Timer2.timerType = "32 Bits";
|
|
|
|
UART1.$name = "CONFIG_UART_0";
|
|
UART1.$hardware = system.deviceData.board.components.XDS110UART;
|
|
|
|
/**
|
|
* Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
|
|
* 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.
|
|
*/
|
|
PWM1.timer.$suggestSolution = "Timer3";
|
|
PWM1.timer.pwmPin.$suggestSolution = "boosterpack.10";
|
|
Timer1.timer.$suggestSolution = "Timer1";
|
|
Timer2.timer.$suggestSolution = "Timer0";
|
|
UART1.uart.$suggestSolution = "UART0";
|
|
UART1.uart.txPin.$suggestSolution = "55";
|
|
UART1.uart.rxPin.$suggestSolution = "57";
|