heinbali01 wrote on Thursday, December 25, 2014:
If I’m not mistaken, this happens in printf-stdarg.c
If snprintf() is called with NULL as as buffer, the function
vOutputChar() will be called for every byte:
extern void vOutputChar( const char cChar, const TickType_t xTicksToWait );
/* here the logging function is called printk()
(just like Linux). It calls print() with a NULL
int printk(const char *format, ...)
va_start( args, format );
return print( 0, format, args );
vOutputChar(), which should be provided by the application, shall forward the byte to a serial console or whatever.
“printf-stdarg.c” never got a standard location in projects, you’ll find it in the home directory of many projects.
The above method of logging is very economic: each byte formatted goes straight to the serial driver.
You’ll get a smoother output when XXX_serial_put_string() is used for a whole string.