Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
cbprintf.h File Reference
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <toolchain.h>
#include <stdio.h>
#include <sys/cbprintf_internal.h>

Go to the source code of this file.

Macros

#define CBPRINTF_PACKAGE_ALIGNMENT
 Required alignment of the buffer used for packaging. More...
 
#define CBPRINTF_PACKAGE_ADD_STRING_IDXS   BIT(0)
 Append indexes of read-only string arguments in the package. More...
 
#define CBPRINTF_MUST_RUNTIME_PACKAGE(skip, ...)    Z_CBPRINTF_MUST_RUNTIME_PACKAGE(skip, __VA_ARGS__)
 Determine if string must be packaged in run time. More...
 
#define CBPRINTF_STATIC_PACKAGE(packaged, inlen, outlen, align_offset, flags, ...)
 Statically package string. More...
 

Typedefs

typedef int(* cbprintf_cb) ()
 Signature for a cbprintf callback function. More...
 

Functions

int cbprintf_package (void *packaged, size_t len, uint32_t flags, const char *format,...)
 Capture state required to output formatted data later. More...
 
int cbvprintf_package (void *packaged, size_t len, uint32_t flags, const char *format, va_list ap)
 Capture state required to output formatted data later. More...
 
int cbprintf_fsc_package (void *in_packaged, size_t in_len, void *packaged, size_t len)
 Convert package to fully self-contained (fsc) package. More...
 
int cbpprintf (cbprintf_cb out, void *ctx, void *packaged)
 Generate the output for a previously captured format operation. More...
 
int cbprintf (cbprintf_cb out, void *ctx, const char *format,...)
 *printf-like output through a callback. More...
 
int cbvprintf (cbprintf_cb out, void *ctx, const char *format, va_list ap)
 varargs-aware *printf-like output through a callback. More...
 
int fprintfcb (FILE *stream, const char *format,...)
 fprintf using Zephyrs cbprintf infrastructure. More...
 
int vfprintfcb (FILE *stream, const char *format, va_list ap)
 vfprintf using Zephyrs cbprintf infrastructure. More...
 
int printfcb (const char *format,...)
 printf using Zephyrs cbprintf infrastructure. More...
 
int vprintfcb (const char *format, va_list ap)
 vprintf using Zephyrs cbprintf infrastructure. More...
 
int snprintfcb (char *str, size_t size, const char *format,...)
 snprintf using Zephyrs cbprintf infrastructure. More...
 
int vsnprintfcb (char *str, size_t size, const char *format, va_list ap)
 vsnprintf using Zephyrs cbprintf infrastructure. More...