/**
 * Import the modules used in this configuration.
 */
const epwm       = scripting.addModule("/driverlib/epwm.js", {}, false);
const epwm1      = epwm.addInstance();
const epwm2      = epwm.addInstance();
const epwm3      = epwm.addInstance();
const epwm4      = epwm.addInstance();
const inputxbar  = scripting.addModule("/driverlib/inputxbar.js", {}, false);
const inputxbar1 = inputxbar.addInstance();

/**
 * Write custom configuration values to the imported modules.
 */
epwm1.$name                  = "myEPWM1";
epwm1.epwm.$assign           = "EPWM1";
epwm1.epwm.epwm_aPin.$assign = "GPIO0";
epwm1.epwm.epwm_bPin.$assign = "GPIO1";

epwm2.$name                  = "myEPWM2";
epwm2.epwm.$assign           = "EPWM2";
epwm2.epwm.epwm_aPin.$assign = "GPIO2";
epwm2.epwm.epwm_bPin.$assign = "GPIO3";

epwm3.$name                  = "myEPWM3";
epwm3.epwm.$assign           = "EPWM3";
epwm3.epwm.epwm_aPin.$assign = "GPIO4";
epwm3.epwm.epwm_bPin.$assign = "GPIO5";

epwm4.$name                  = "myEPWM4";
epwm4.epwm.$assign           = "EPWM4";
epwm4.epwm.epwm_aPin.$assign = "GPIO6";
epwm4.epwm.epwm_bPin.$assign = "GPIO7";


inputxbar1.$name          = "myINPUTXBAR5";
inputxbar1.inputsUsed     = ["inputxbar5Gpio","inputxbar6Gpio"];
inputxbar1.inputxbar5Gpio = "GPIO40";
inputxbar1.inputxbar6Gpio = "GPIO40";

