First
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#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);
|
||||
|
||||
Reference in New Issue
Block a user