Explorar el Código

Fix analogWriteFrequency on pinx 25 & 32

teensy4-core
PaulStoffregen hace 10 años
padre
commit
c2ef8b638e
Se han modificado 1 ficheros con 8 adiciones y 1 borrados
  1. +8
    -1
      teensy3/pins_teensy.c

+ 8
- 1
teensy3/pins_teensy.c Ver fichero

@@ -555,11 +555,18 @@ void analogWriteFrequency(uint8_t pin, uint32_t frequency)
FTM0_MOD = mod;
FTM0_SC = FTM_SC_CLKS(1) | FTM_SC_PS(prescale);
}
#if defined(__MK20DX256__)
else if (pin == 25 || pin == 32) {
FTM2_SC = 0;
FTM2_CNT = 0;
FTM2_MOD = mod;
FTM2_SC = FTM_SC_CLKS(1) | FTM_SC_PS(prescale);
}
#endif
}




// TODO: startup code needs to initialize all pins to GPIO mode, input by default

void digitalWrite(uint8_t pin, uint8_t val)

Cargando…
Cancelar
Guardar