macros.h 438 B

123456789101112131415161718
  1. #ifndef MACROS_H
  2. #define MACROS_H
  3. #define FORCE_INLINE __attribute__((always_inline)) inline
  4. #define _UNUSED __attribute__((unused))
  5. #ifndef CRITICAL_SECTION_START
  6. #define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
  7. #define CRITICAL_SECTION_END SREG = _sreg;
  8. #endif //CRITICAL_SECTION_START
  9. // Macros to make a string from a macro
  10. #define STRINGIFY_(M) #M
  11. #define STRINGIFY(M) STRINGIFY_(M)
  12. #endif //MACROS_H