Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
shell_remote_cli.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2026 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12
13#ifndef ZEPHYR_INCLUDE_SHELL_SHELL_REMOTE_CLI_H_
14#define ZEPHYR_INCLUDE_SHELL_SHELL_REMOTE_CLI_H_
15
16#include <zephyr/sys/cbprintf.h>
17#include <zephyr/shell/shell.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
31void shell_remote_cli_cbpprintf(const struct shell *sh, enum shell_vt100_color color, void *package,
32 size_t len);
33
38
40#define SHELL_REMOTE_CLI_ALIGN sizeof(long long)
41
51#define SHELL_REMOTE_CLI_FPRINTF(_sh, _color, ...) \
52 do { \
53 int _plen; \
54 void *_pkg; \
55 uint32_t _options = \
56 CBPRINTF_PACKAGE_ADD_RO_STR_POS | CBPRINTF_PACKAGE_ADD_RW_STR_POS; \
57 CBPRINTF_STATIC_PACKAGE(NULL, 0, _plen, SHELL_REMOTE_CLI_ALIGN, _options, \
58 __VA_ARGS__); \
59 _pkg = __builtin_alloca_with_align(_plen, 8); \
60 CBPRINTF_STATIC_PACKAGE(_pkg, _plen, _plen, SHELL_REMOTE_CLI_ALIGN, _options, \
61 __VA_ARGS__); \
62 shell_remote_cli_cbpprintf(_sh, _color, _pkg, _plen); \
63 } while (0)
64
65#ifdef __cplusplus
66}
67#endif
68
69#endif /* ZEPHYR_INCLUDE_SHELL_SHELL_REMOTE_CLI_H_ */
void shell_remote_cli_cbpprintf(const struct shell *sh, enum shell_vt100_color color, void *package, size_t len)
Print a formatted string to the remote shell.
void shell_remote_cmd_process(void)
Process the remote message in the main context when CONFIG_MULTITHREADING is disabled.
shell_vt100_color
Definition shell_types.h:14
Shell instance internals.
Definition shell.h:1076