void initPWM(void){
uint32_t ulPeriod, dutyCycle;
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC); // Enable port C
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_WTIMER0); // Enable Timer 0
ROM_GPIOPinConfigure(GPIO_PC5_WT0CCP1); // Configure pin PC5 as output of Timer 0_B
ROM_GPIOPinTypeTimer(GPIO_PORTC_BASE, GPIO_PIN_5); // Enable pin PC5 as output of timer addressed to it
ulPeriod = ROM_SysCtlClockGet() / MOTOR_PWM_HZ;
dutyCycle = (unsigned long)(ulPeriod-1)*0.25;
ROM_TimerConfigure(WTIMER0_BASE, (TIMER_CFG_SPLIT_PAIR|TIMER_CFG_B_PWM)); // Configure Timer 0 as two 32 but timers with both functioning as PWM
ROM_TimerControlLevel(WTIMER0_BASE, TIMER_B, false); // Timer 0 is trigger false invert
ROM_TimerLoadSet(WTIMER0_BASE, TIMER_B, ulPeriod-1); // Timer 0 Load set
ROM_TimerMatchSet(WTIMER0_BASE, TIMER_B, dutyCycle); // Timer 0 Match set
ROM_TimerEnable(WTIMER0_BASE, TIMER_B); nincs bekapcsolva
}