Move some macros from Marlin.h to macros.h
This commit is contained in:
parent
277899c175
commit
d9f7ed9a3c
2 changed files with 11 additions and 11 deletions
|
|
@ -23,6 +23,17 @@
|
|||
#ifndef MACROS_H
|
||||
#define MACROS_H
|
||||
|
||||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||
|
||||
// Bracket code that shouldn't be interrupted
|
||||
#ifndef CRITICAL_SECTION_START
|
||||
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
|
||||
#define CRITICAL_SECTION_END SREG = _sreg;
|
||||
#endif
|
||||
|
||||
// Remove compiler warning on an unused variable
|
||||
#define UNUSED(x) (void) (x)
|
||||
|
||||
// Macros to make a string from a macro
|
||||
#define STRINGIFY_(M) #M
|
||||
#define STRINGIFY(M) STRINGIFY_(M)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue