Browse Source

Fix Teensy 3.5/3.6 __get_primask (#13514)

Scott Alfter 6 years ago
parent
commit
c6dbe6e9d6
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      Marlin/src/HAL/HAL_TEENSY35_36/HAL.h

+ 3
- 2
Marlin/src/HAL/HAL_TEENSY35_36/HAL.h View File

49
 #include "HAL_timers_Teensy.h"
49
 #include "HAL_timers_Teensy.h"
50
 
50
 
51
 #include <stdint.h>
51
 #include <stdint.h>
52
+#include <util/atomic.h>
52
 
53
 
53
 #define ST7920_DELAY_1 DELAY_NS(600)
54
 #define ST7920_DELAY_1 DELAY_NS(600)
54
 #define ST7920_DELAY_2 DELAY_NS(750)
55
 #define ST7920_DELAY_2 DELAY_NS(750)
84
   #define analogInputToDigitalPin(p) ((p < 12u) ? (p) + 54u : -1)
85
   #define analogInputToDigitalPin(p) ((p < 12u) ? (p) + 54u : -1)
85
 #endif
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
 #define CRITICAL_SECTION_END    if (!primask) __enable_irq()
89
 #define CRITICAL_SECTION_END    if (!primask) __enable_irq()
89
-#define ISRS_ENABLED() (!__get_PRIMASK())
90
+#define ISRS_ENABLED() (!__get_primask())
90
 #define ENABLE_ISRS()  __enable_irq()
91
 #define ENABLE_ISRS()  __enable_irq()
91
 #define DISABLE_ISRS() __disable_irq()
92
 #define DISABLE_ISRS() __disable_irq()
92
 
93
 

Loading…
Cancel
Save