12#ifndef ZEPHYR_INCLUDE_SHELL_SHELL_FPRINTF_H_
13#define ZEPHYR_INCLUDE_SHELL_SHELL_FPRINTF_H_
25typedef void (*shell_fprintf_fwrite)(
const void *user_ctx,
29struct shell_fprintf_control_block {
39 shell_fprintf_fwrite
fwrite;
41 struct shell_fprintf_control_block *ctrl_blk;
56#define Z_SHELL_FPRINTF_DEFINE(_name, _user_ctx, _buf, _size, \
57 _autoflush, _fwrite) \
58 static struct shell_fprintf_control_block \
59 _name##_shell_fprintf_ctx = { \
60 .autoflush = _autoflush, \
63 static const struct shell_fprintf _name = { \
65 .buffer_size = _size, \
67 .user_ctx = _user_ctx, \
68 .ctrl_blk = &_name##_shell_fprintf_ctx \
78void z_shell_fprintf_fmt(
const struct shell_fprintf *sh_fprintf,
79 char const *fmt, va_list args);
87void z_shell_cbpprintf_fmt(
const struct shell_fprintf *sh_fprintf,
void *package);
94void z_shell_fprintf_buffer_flush(
const struct shell_fprintf *sh_fprintf);
#define shell_fprintf(sh, color, fmt,...)
printf-like function which sends formatted data stream to the shell.
Definition shell.h:1299
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
size_t fwrite(const void *ZRESTRICT ptr, size_t size, size_t nitems, FILE *ZRESTRICT stream)