OpenBIC
OpenSource Bridge-IC
plat_sensor_polling_shell.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef PLAT_SENSOR_POLLING_SHELL_H
18#define PLAT_SENSOR_POLLING_SHELL_H
19
20#include <shell/shell.h>
21
22void cmd_set_plat_sensor_polling_all(const struct shell *shell, size_t argc, char **argv);
23void cmd_set_plat_sensor_polling_ubc(const struct shell *shell, size_t argc, char **argv);
24void cmd_set_plat_sensor_polling_vr(const struct shell *shell, size_t argc, char **argv);
25void cmd_set_plat_sensor_polling_temp(const struct shell *shell, size_t argc, char **argv);
26void cmd_get_plat_sensor_polling_all(const struct shell *shell, size_t argc, char **argv);
27void cmd_get_plat_sensor_polling_ubc(const struct shell *shell, size_t argc, char **argv);
28void cmd_get_plat_sensor_polling_vr(const struct shell *shell, size_t argc, char **argv);
29void cmd_get_plat_sensor_polling_temp(const struct shell *shell, size_t argc, char **argv);
30
31/* Sub-command Level 3 of command test */
33 cmd_set_plat_sensor_polling,
34 SHELL_CMD(all, NULL, "set platform sensor polling all", cmd_set_plat_sensor_polling_all),
35 SHELL_CMD(ubc, NULL, "set platform sensor polling ubc", cmd_set_plat_sensor_polling_ubc),
36 SHELL_CMD(vr, NULL, "set platform sensor polling vr", cmd_set_plat_sensor_polling_vr),
37 SHELL_CMD(temp, NULL, "set platform sensor polling temp", cmd_set_plat_sensor_polling_temp),
38 SHELL_SUBCMD_SET_END);
39
40SHELL_STATIC_SUBCMD_SET_CREATE(cmd_get_plat_sensor_polling,
41 SHELL_CMD(all, NULL, "get platform sensor polling all",
43 SHELL_SUBCMD_SET_END);
44
45/* Sub-command Level 2 of command test */
46SHELL_STATIC_SUBCMD_SET_CREATE(sub_plat_sensor_polling_cmd,
47 SHELL_CMD(set, &cmd_set_plat_sensor_polling,
48 "set platform sensor polling", NULL),
49 SHELL_CMD(get, &cmd_get_plat_sensor_polling,
50 "get platform sensor polling", NULL),
51 SHELL_SUBCMD_SET_END);
52
53/* Root of command test */
54SHELL_CMD_REGISTER(set_sensor_polling, &sub_plat_sensor_polling_cmd,
55 "Disable/Enable sensor polling for group of sensors", NULL);
56
57#endif
SHELL_STATIC_SUBCMD_SET_CREATE(cmd_set_plat_sensor_polling, SHELL_CMD(all, NULL, "set platform sensor polling all", cmd_set_plat_sensor_polling_all), SHELL_CMD(ubc, NULL, "set platform sensor polling ubc", cmd_set_plat_sensor_polling_ubc), SHELL_CMD(vr, NULL, "set platform sensor polling vr", cmd_set_plat_sensor_polling_vr), SHELL_CMD(temp, NULL, "set platform sensor polling temp", cmd_set_plat_sensor_polling_temp), SHELL_SUBCMD_SET_END)
void cmd_set_plat_sensor_polling_all(const struct shell *shell, size_t argc, char **argv)
Definition: plat_sensor_polling_shell.c:22
void cmd_set_plat_sensor_polling_ubc(const struct shell *shell, size_t argc, char **argv)
Definition: plat_sensor_polling_shell.c:44
void cmd_set_plat_sensor_polling_temp(const struct shell *shell, size_t argc, char **argv)
Definition: plat_sensor_polling_shell.c:88
SHELL_CMD_REGISTER(set_sensor_polling, &sub_plat_sensor_polling_cmd, "Disable/Enable sensor polling for group of sensors", NULL)
void cmd_get_plat_sensor_polling_temp(const struct shell *shell, size_t argc, char **argv)
void cmd_get_plat_sensor_polling_all(const struct shell *shell, size_t argc, char **argv)
Definition: plat_sensor_polling_shell.c:110
void cmd_get_plat_sensor_polling_ubc(const struct shell *shell, size_t argc, char **argv)
void cmd_get_plat_sensor_polling_vr(const struct shell *shell, size_t argc, char **argv)
void cmd_set_plat_sensor_polling_vr(const struct shell *shell, size_t argc, char **argv)
Definition: plat_sensor_polling_shell.c:66