7#ifndef ZEPHYR_INCLUDE_SYS_CBPRINTF_H_
8#define ZEPHYR_INCLUDE_SYS_CBPRINTF_H_
15#ifdef CONFIG_CBPRINTF_LIBC_SUBSTS
28#if defined(__cplusplus) || (((__STDC_VERSION__ >= 201112L) || \
29 ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40900) || \
30 ((__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) >= 30000)))
52#define CBPRINTF_PACKAGE_ALIGNMENT 16
53#elif defined(CONFIG_X86) && !defined(CONFIG_64BIT)
57#define CBPRINTF_PACKAGE_ALIGNMENT \
58 (IS_ENABLED(CONFIG_CBPRINTF_PACKAGE_LONGDOUBLE) ? \
59 16 : MAX(sizeof(double), sizeof(long long)))
61#define CBPRINTF_PACKAGE_ALIGNMENT \
62 (IS_ENABLED(CONFIG_CBPRINTF_PACKAGE_LONGDOUBLE) ? \
63 sizeof(long double) : MAX(sizeof(double), sizeof(long long)))
76#define CBPRINTF_PACKAGE_ADD_STRING_IDXS BIT(0)
115#define CBPRINTF_MUST_RUNTIME_PACKAGE(skip, ... ) \
116 Z_CBPRINTF_MUST_RUNTIME_PACKAGE(skip, __VA_ARGS__)
147#define CBPRINTF_STATIC_PACKAGE(packaged, inlen, outlen, align_offset, flags, \
149 Z_CBPRINTF_STATIC_PACKAGE(packaged, inlen, outlen, \
150 align_offset, flags, __VA_ARGS__)
347#ifdef CONFIG_CBPRINTF_LIBC_SUBSTS
449int snprintfcb(
char *str,
size_t size, const
char *format, ...);
473int vsnprintfcb(
char *str,
size_t size, const
char *format, va_list ap);
int cbprintf(cbprintf_cb out, void *ctx, const char *format,...)
*printf-like output through a callback.
int printfcb(const char *format,...)
printf using Zephyrs cbprintf infrastructure.
int cbpprintf(cbprintf_cb out, void *ctx, void *packaged)
Generate the output for a previously captured format operation.
int vfprintfcb(FILE *stream, const char *format, va_list ap)
vfprintf using Zephyrs cbprintf infrastructure.
int fprintfcb(FILE *stream, const char *format,...)
fprintf using Zephyrs cbprintf infrastructure.
int vsnprintfcb(char *str, size_t size, const char *format, va_list ap)
vsnprintf using Zephyrs cbprintf infrastructure.
int cbvprintf(cbprintf_cb out, void *ctx, const char *format, va_list ap)
varargs-aware *printf-like output through a callback.
int cbprintf_fsc_package(void *in_packaged, size_t in_len, void *packaged, size_t len)
Convert package to fully self-contained (fsc) package.
int snprintfcb(char *str, size_t size, const char *format,...)
snprintf using Zephyrs cbprintf infrastructure.
int vprintfcb(const char *format, va_list ap)
vprintf using Zephyrs cbprintf infrastructure.
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.
int(* cbprintf_cb)()
Signature for a cbprintf callback function.
Definition: cbprintf.h:97
int cbprintf_package(void *packaged, size_t len, uint32_t flags, const char *format,...)
Capture state required to output formatted data later.
flags
Definition: http_parser.h:131
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
int FILE
Definition: stdio.h:23