Promote STRINGIFY to macros.h

This commit is contained in:
Scott Lahteine
2016-03-13 23:15:17 -07:00
parent f4a3efd35e
commit 9418b4f2f3
2 changed files with 5 additions and 6 deletions

View File

@ -1,6 +1,10 @@
#ifndef MACROS_H
#define MACROS_H
// Macros to make a string from a macro
#define STRINGIFY_(n) #n
#define STRINGIFY(n) STRINGIFY_(n)
// Macros for bit masks
#define TEST(n,b) (((n)&_BV(b))!=0)
#define SBI(n,b) (n |= _BV(b))