pwm uart gipo i2c
This commit is contained in:
21
empty.syscfg
21
empty.syscfg
@@ -13,6 +13,8 @@ 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 PWM = scripting.addModule("/ti/driverlib/PWM", {}, false);
|
||||
const PWM1 = PWM.addInstance();
|
||||
const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL");
|
||||
const UART = scripting.addModule("/ti/driverlib/UART", {}, false);
|
||||
const UART1 = UART.addInstance();
|
||||
@@ -47,6 +49,25 @@ I2C1.sclPinConfig.onlyInternalResistor = scripting.forceWrite(false);
|
||||
I2C1.sclPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
|
||||
I2C1.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3";
|
||||
|
||||
PWM1.$name = "PWM_0";
|
||||
PWM1.ccIndex = [0,1,2];
|
||||
PWM1.clockDivider = 2;
|
||||
PWM1.timerCount = 2000;
|
||||
PWM1.pwmMode = "CENTER_ALIGN";
|
||||
PWM1.PWM_CHANNEL_0.$name = "ti_driverlib_pwm_PWMTimerCC0";
|
||||
PWM1.PWM_CHANNEL_0.dutyCycle = 25;
|
||||
PWM1.PWM_CHANNEL_1.$name = "ti_driverlib_pwm_PWMTimerCC1";
|
||||
PWM1.PWM_CHANNEL_1.dutyCycle = 50;
|
||||
PWM1.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
|
||||
PWM1.ccp1PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric5";
|
||||
PWM1.peripheral.$assign = "TIMA0";
|
||||
PWM1.peripheral.ccp0Pin.$assign = "PA21";
|
||||
PWM1.peripheral.ccp1Pin.$assign = "PA22";
|
||||
PWM1.peripheral.ccp2Pin.$assign = "PB20";
|
||||
PWM1.PWM_CHANNEL_2.$name = "ti_driverlib_pwm_PWMTimerCC2";
|
||||
PWM1.PWM_CHANNEL_2.dutyCycle = 75;
|
||||
PWM1.ccp2PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric6";
|
||||
|
||||
SYSCTL.forceDefaultClkConfig = true;
|
||||
SYSCTL.peripheral.$assign = "SYSCTL";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user