C Macro – how to get an integer value into a string literal [duplicate]
I think it’s good to have a stringifying macro in your utils header: #define STR_IMPL_(x) #x //stringify argument #define STR(x) STR_IMPL_(x) //indirection to expand argument macros Then you can keep the macro numerical and stringify it on the spot: #define LEDS 48 int x = LEDS; void DrawFrame() { asm( “ldi R27, 0x00 \n\t” “ldi … Read more