You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, use natively available printf() (which is currently achieved by macro printf_P)
If passed a buffer (as opposed to a stream pointer), then log all messages to the buffer, and let the user manage the buffer size/etc... This stipulates that snprintf() is natively available (which may not be the case for MCUs like the RP2040 -- though the Arduino's avr/pgmspace.h does provide access to snprintf()).
By default, use our own parser instead of the natively available printf() functionality. However, allow a bypass function (call it logf()) to allow user to use native printf() parser. This could be done with a macro, but it seems inexpensive to implement with a logf() function.
I wanted to jot these thoughts down somewhere.
printf()(which is currently achieved by macroprintf_P)If passed a buffer (as opposed to a stream pointer), then log all messages to the buffer, and let the user manage the buffer size/etc... This stipulates thatsnprintf()is natively available (which may not be the case for MCUs like the RP2040 -- though the Arduino's avr/pgmspace.h does provide access tosnprintf()).printf()functionality. However, allow a bypass function (call itlogf()) to allow user to use nativeprintf()parser. This could be done with a macro, but it seems inexpensive to implement with alogf()function.