Browse Source

Fix PWM polarity on pins 0, 1, 24, 25

teensy4-core
PaulStoffregen 6 years ago
parent
commit
e78946ba14
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      teensy4/pwm.c

+ 1
- 1
teensy4/pwm.c View File

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;

Loading…
Cancel
Save