A
Affan Syed
Hi,
I have done a lot of user space coding in C, which doesnt really need me to
understand the following MACRO:
#define UARTOutput(__x,__y,__args...) do { \
static char __s[] PROGMEM = __y; \
if (debug_out) \
printf_P(__s, ## __args); \
} while (0)
So now what exactly is happening over here?
Does double underscore do something special? Basically i can see that it is
used as outputting a string to the UART like this
UARTOutput(DBG,"%s", buf);
So it just outputs the string in buf to the UART... but how (Assume that the
UART is somehow initialized.. how is it even going to the UART!!!
Thanks..
Affan
I have done a lot of user space coding in C, which doesnt really need me to
understand the following MACRO:
#define UARTOutput(__x,__y,__args...) do { \
static char __s[] PROGMEM = __y; \
if (debug_out) \
printf_P(__s, ## __args); \
} while (0)
So now what exactly is happening over here?
Does double underscore do something special? Basically i can see that it is
used as outputting a string to the UART like this
UARTOutput(DBG,"%s", buf);
So it just outputs the string in buf to the UART... but how (Assume that the
UART is somehow initialized.. how is it even going to the UART!!!
Thanks..
Affan