Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
printk.h File Reference
#include <zephyr/toolchain.h>
#include <stddef.h>
#include <stdarg.h>
#include <inttypes.h>

Go to the source code of this file.

Functions

static void printk (const char *fmt,...)
 Print kernel debugging message.
 
static void vprintk (const char *fmt, va_list ap)
 
int snprintk (char *str, size_t size, const char *fmt,...)
 
int vsnprintk (char *str, size_t size, const char *fmt, va_list ap)
 

Function Documentation

◆ printk()

static void printk ( const char * fmt,
... )
inlinestatic

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: %%

Field width (with or without leading zeroes) is supported. Length attributes h, hh, l, ll and z are supported. However, integral values with lld and lli are only printed if they fit in a long otherwise 'ERR' is printed. Full 64-bit values may be printed with llx. Flags and precision attributes are not supported.

Parameters
fmtFormat string.
...Optional list of format arguments.

◆ snprintk()

int snprintk ( char * str,
size_t size,
const char * fmt,
... )

◆ vprintk()

static void vprintk ( const char * fmt,
va_list ap )
inlinestatic

◆ vsnprintk()

int vsnprintk ( char * str,
size_t size,
const char * fmt,
va_list ap )