p->MCTRL |= FLEXPWM_MCTRL_CLDOK(mask); | p->MCTRL |= FLEXPWM_MCTRL_CLDOK(mask); | ||||
switch (channel) { | switch (channel) { | ||||
case 0: // X | case 0: // X | ||||
p->SM[submodule].VAL0 = cval; | |||||
p->SM[submodule].VAL0 = modulo - cval; | |||||
p->OUTEN |= FLEXPWM_OUTEN_PWMX_EN(mask); | p->OUTEN |= FLEXPWM_OUTEN_PWMX_EN(mask); | ||||
//printf(" write channel X\n"); | //printf(" write channel X\n"); | ||||
break; | break; |