OpenBIC
OpenSource Bridge-IC
plat_voltage_shell.c File Reference
#include <shell/shell.h>
#include <stdlib.h>
#include <logging/log.h>
#include "sensor.h"
#include "plat_hook.h"
#include "plat_class.h"
Include dependency graph for plat_voltage_shell.c:

Functions

 LOG_MODULE_REGISTER (plat_voltage_shell, LOG_LEVEL_DBG)
 
 SHELL_DYNAMIC_CMD_CREATE (voltage_rname, voltage_rname_get)
 
 SHELL_STATIC_SUBCMD_SET_CREATE (sub_voltage_get_cmds, SHELL_CMD(all, NULL, "get voltage all vout command", cmd_voltage_get_all), SHELL_SUBCMD_SET_END)
 
 SHELL_STATIC_SUBCMD_SET_CREATE (sub_voltage_cmds, SHELL_CMD(get, &sub_voltage_get_cmds, "get voltage all", NULL), SHELL_CMD_ARG(set, &voltage_rname, "set <voltage-rail> <new-voltage>|default [perm]", cmd_voltage_set, 3, 1), SHELL_SUBCMD_SET_END)
 
 SHELL_CMD_REGISTER (voltage, &sub_voltage_cmds, "voltage set/get commands", NULL)
 

Function Documentation

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_voltage_shell  ,
LOG_LEVEL_DBG   
)

◆ SHELL_CMD_REGISTER()

SHELL_CMD_REGISTER ( voltage  ,
sub_voltage_cmds,
"voltage set/get commands"  ,
NULL   
)

◆ SHELL_DYNAMIC_CMD_CREATE()

SHELL_DYNAMIC_CMD_CREATE ( voltage_rname  ,
voltage_rname_get   
)

◆ SHELL_STATIC_SUBCMD_SET_CREATE() [1/2]

SHELL_STATIC_SUBCMD_SET_CREATE ( sub_voltage_cmds  ,
SHELL_CMD(get, &sub_voltage_get_cmds, "get voltage all", NULL)  ,
SHELL_CMD_ARG(set, &voltage_rname, "set <voltage-rail> <new-voltage>|default [perm]", cmd_voltage_set, 3, 1)  ,
SHELL_SUBCMD_SET_END   
)

◆ SHELL_STATIC_SUBCMD_SET_CREATE() [2/2]

SHELL_STATIC_SUBCMD_SET_CREATE ( sub_voltage_get_cmds  ,
SHELL_CMD(all, NULL, "get voltage all vout command", cmd_voltage_get_all)  ,
SHELL_SUBCMD_SET_END   
)