瀏覽代碼

Fix analogWriteFrequency on pinx 25 & 32

teensy4-core
PaulStoffregen 10 年之前
父節點
當前提交
c2ef8b638e
共有 1 個檔案被更改,包括 8 行新增1 行删除
  1. +8
    -1
      teensy3/pins_teensy.c

+ 8
- 1
teensy3/pins_teensy.c 查看文件

@@ -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)

Loading…
取消
儲存