From 528ed19e15f6ecf8ca78790d4fd09a7fc351b0fd Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Mon, 26 Oct 2015 14:29:04 -0400 Subject: [PATCH] doc: Add API documentation for printk() Allows users to better understand the capabilities of printk(), particularly what it *doesn't* support. Change-Id: I946ef10fca78464f887c28848d143479f7b7211f Signed-off-by: Allan Stephens --- include/misc/printk.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/include/misc/printk.h b/include/misc/printk.h index 0996d0aa0ab..ce3811cc3ea 100644 --- a/include/misc/printk.h +++ b/include/misc/printk.h @@ -20,6 +20,30 @@ #include +/** + * + * @brief Print kernel debugging message. + * + * This routine prints a kernel debugging message to the system console. + * Output is send immediately, without any mutual exclusion or buffering. + * + * A basic set of conversion specifier characters are supported: + * - signed decimal: \%d, \%i + * - unsigned decimal: \%u + * - unsigned hexadecimal: \%x (\%X is treated as \%x) + * - pointer: \%p + * - string: \%s + * - character: \%c + * - percent: \%\% + * + * No other conversion specification capabilities are supported, such as flags, + * field width, precision, or length attributes. + * + * @param fmt Format string. + * @param ... Optional list of format arguments. + * + * @return N/A + */ #ifdef CONFIG_PRINTK extern void printk(const char *fmt, ...); #else