Skip to content

Commit 5a2eba2

Browse files
committed
Add Stringification macro
Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
1 parent 447c8ad commit 5a2eba2

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

cores/arduino/utils.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@
2727
// Concatenate 2 strings separated by space
2828
#define CONCATS(s1, s2) (s1" " s2)
2929

30+
// Stringification
31+
#define xstr(s) str(s)
32+
#define str(s) #s
33+
3034
#endif

cores/arduino/wiring.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
#include "binary.h"
3030
#include "itoa.h"
31+
#include "utils.h"
3132

3233
#include "wiring_analog.h"
3334
#include "wiring_constants.h"

0 commit comments

Comments
 (0)