瀏覽代碼

fix for delay of 1 micro sec @ 2MHz will be 0

main
duff2013 10 年之前
父節點
當前提交
4d3cf8fff7
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. +2
    -1
      teensy3/core_pins.h

+ 2
- 1
teensy3/core_pins.h 查看文件

@@ -793,7 +793,8 @@ static inline void delayMicroseconds(uint32_t usec)
#elif F_CPU == 2000000
uint32_t n = usec >> 1;
#endif
if (usec == 0) return;
// changed because a delay of 1 micro Sec @ 2MHz will be 0
if (n == 0) return;
__asm__ volatile(
"L_%=_delayMicroseconds:" "\n\t"
#if F_CPU < 24000000

Loading…
取消
儲存