瀏覽代碼

Fix Teensy 3.5/3.6 __get_primask (#13514)

Scott Alfter 6 年之前
父節點
當前提交
c6dbe6e9d6
共有 1 個檔案被更改,包括 3 行新增2 行删除
  1. 3
    2
      Marlin/src/HAL/HAL_TEENSY35_36/HAL.h

+ 3
- 2
Marlin/src/HAL/HAL_TEENSY35_36/HAL.h 查看文件

@@ -49,6 +49,7 @@
49 49
 #include "HAL_timers_Teensy.h"
50 50
 
51 51
 #include <stdint.h>
52
+#include <util/atomic.h>
52 53
 
53 54
 #define ST7920_DELAY_1 DELAY_NS(600)
54 55
 #define ST7920_DELAY_2 DELAY_NS(750)
@@ -84,9 +85,9 @@ typedef int8_t pin_t;
84 85
   #define analogInputToDigitalPin(p) ((p < 12u) ? (p) + 54u : -1)
85 86
 #endif
86 87
 
87
-#define CRITICAL_SECTION_START  uint32_t primask = __get_PRIMASK(); __disable_irq()
88
+#define CRITICAL_SECTION_START  uint32_t primask = __get_primask(); __disable_irq()
88 89
 #define CRITICAL_SECTION_END    if (!primask) __enable_irq()
89
-#define ISRS_ENABLED() (!__get_PRIMASK())
90
+#define ISRS_ENABLED() (!__get_primask())
90 91
 #define ENABLE_ISRS()  __enable_irq()
91 92
 #define DISABLE_ISRS() __disable_irq()
92 93
 

Loading…
取消
儲存