Macros initial
This commit is contained in:
parent
160af0a624
commit
eb007c35d2
8 changed files with 35 additions and 32 deletions
Firmware
18
Firmware/macros.h
Normal file
18
Firmware/macros.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
#ifndef MACROS_H
|
||||
#define MACROS_H
|
||||
|
||||
|
||||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||
#define _UNUSED __attribute__((unused))
|
||||
|
||||
#ifndef CRITICAL_SECTION_START
|
||||
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
|
||||
#define CRITICAL_SECTION_END SREG = _sreg;
|
||||
#endif //CRITICAL_SECTION_START
|
||||
|
||||
// Macros to make a string from a macro
|
||||
#define STRINGIFY_(M) #M
|
||||
#define STRINGIFY(M) STRINGIFY_(M)
|
||||
|
||||
|
||||
#endif //MACROS_H
|
Loading…
Add table
Add a link
Reference in a new issue