38 lines
1.5 KiB
Plaintext
38 lines
1.5 KiB
Plaintext
|
|
/**
|
||
|
|
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
||
|
|
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
||
|
|
* @cliArgs --device "F2838x" --package "337bga" --part "F2838x_337bga" --context "CPU1" --product "C2000WARE@5.00.00.00"
|
||
|
|
* @versions {"tool":"1.17.0+3128"}
|
||
|
|
*/
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Import the modules used in this configuration.
|
||
|
|
*/
|
||
|
|
const gpio = scripting.addModule("/driverlib/gpio.js", {}, false);
|
||
|
|
const gpio1 = gpio.addInstance();
|
||
|
|
const spi = scripting.addModule("/driverlib/spi.js", {}, false);
|
||
|
|
const spi1 = spi.addInstance();
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Write custom configuration values to the imported modules.
|
||
|
|
*/
|
||
|
|
gpio1.$name = "mySDCardCS";
|
||
|
|
gpio1.writeInitialValue = true;
|
||
|
|
gpio1.initialValue = 1;
|
||
|
|
gpio1.direction = "GPIO_DIR_MODE_OUT";
|
||
|
|
gpio1.gpioPin.$assign = "GPIO128";
|
||
|
|
|
||
|
|
spi1.mode = "SPI_MODE_CONTROLLER";
|
||
|
|
spi1.emulationMode = "SPI_EMULATION_STOP_AFTER_TRANSMIT";
|
||
|
|
spi1.bitRate = 1000000;
|
||
|
|
spi1.dataWidth = "8";
|
||
|
|
spi1.transferProtocol = "SPI_PROT_POL0PHA1";
|
||
|
|
spi1.$name = "mySDCardSPI";
|
||
|
|
spi1.useCase = "CUSTOM";
|
||
|
|
spi1.useInterfacePins = ["SPI@_CLK","SPI@_SIMO","SPI@_SOMI"];
|
||
|
|
spi1.useInterrupts = false;
|
||
|
|
spi1.spi.$assign = "SPIA";
|
||
|
|
spi1.spi.spi_picoPin.$assign = "GPIO32";
|
||
|
|
spi1.spi.spi_pociPin.$assign = "GPIO33";
|
||
|
|
spi1.spi.spi_clkPin.$assign = "GPIO34";
|