19 lines
389 B
C
19 lines
389 B
C
#include <zephyr/logging/log.h>
|
|
#include <zephyr/shell/shell.h>
|
|
#include "config.h"
|
|
|
|
LOG_MODULE_REGISTER(commands);
|
|
|
|
void foo(const struct shell *sh, size_t argc, char **argv)
|
|
{
|
|
LOG_INF("info message");
|
|
LOG_WRN("warning message");
|
|
LOG_ERR("err message");
|
|
ARG_UNUSED(argc);
|
|
ARG_UNUSED(argv);
|
|
shell_print(sh, "foo executed");
|
|
}
|
|
|
|
SHELL_CMD_REGISTER(foo, NULL, "foo command", foo);
|
|
|