瀏覽代碼

millis()

systick_millis_count is already volatile, doing it twice is not needed.
main
FrankBoesing 9 年之前
父節點
當前提交
3bc1d5f9e8
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. +1
    -2
      teensy3/core_pins.h

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

@@ -1070,8 +1070,7 @@ extern volatile uint32_t systick_millis_count;
static inline uint32_t millis(void) __attribute__((always_inline, unused));
static inline uint32_t millis(void)
{
volatile uint32_t ret = systick_millis_count; // single aligned 32 bit is atomic;
return ret;
return systick_millis_count; // single aligned 32 bit is atomic;
}

uint32_t micros(void);

Loading…
取消
儲存