diff options
Diffstat (limited to 'include/console.h')
-rw-r--r-- | include/console.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/console.h b/include/console.h index 5cd02bb5c8..f2113cda00 100644 --- a/include/console.h +++ b/include/console.h @@ -85,6 +85,17 @@ int cputs(enum console_channel channel, const char *outstr); int cprintf(enum console_channel channel, const char *format, ...); /** + * Print formatted output with timestamp. This is like: + * cprintf(channel, "[%T " + format + "]\n", ...) + * + * @param channel Output channel + * @param format Format string; see printf.h for valid formatting codes + * + * @return non-zero if output was truncated. + */ +int cprints(enum console_channel channel, const char *format, ...); + +/** * Flush the console output for all channels. */ void cflush(void); @@ -97,6 +108,7 @@ void cflush(void); /* gcc allows variable arg lists in macros; see * http://gcc.gnu.org/onlinedocs/gcc/Variadic-Macros.html */ #define ccprintf(format, args...) cprintf(CC_COMMAND, format, ## args) +#define ccprints(format, args...) cprints(CC_COMMAND, format, ## args) /** * Called by UART when a line of input is pending. |