mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-29 23:07:42 +00:00
parent
1aca038daf
commit
29a5006df9
@ -114,22 +114,19 @@
|
||||
// Misc. Functions
|
||||
//
|
||||
#ifndef analogInputToDigitalPin
|
||||
#define analogInputToDigitalPin(p) pin_t(p)
|
||||
#define analogInputToDigitalPin(p) pin_t(p)
|
||||
#endif
|
||||
|
||||
#define CRITICAL_SECTION_START \
|
||||
uint32_t primask = __get_PRIMASK(); \
|
||||
(void)__iCliRetVal()
|
||||
#define CRITICAL_SECTION_START() \
|
||||
const bool irqon = !__get_PRIMASK(); \
|
||||
__disable_irq(); \
|
||||
__DSB();
|
||||
#define CRITICAL_SECTION_END() \
|
||||
__DSB(); \
|
||||
if (irqon) __enable_irq();
|
||||
|
||||
#define CRITICAL_SECTION_END \
|
||||
if (!primask) \
|
||||
(void)__iSeiRetVal()
|
||||
|
||||
// Disable interrupts
|
||||
#define cli() noInterrupts()
|
||||
|
||||
// Enable interrupts
|
||||
#define sei() interrupts()
|
||||
#define cli() __disable_irq()
|
||||
#define sei() __enable_irq()
|
||||
|
||||
// bss_end alias
|
||||
#define __bss_end __bss_end__
|
||||
|
Loading…
Reference in New Issue
Block a user