OpenBIC
OpenSource Bridge-IC
shell_plat_i2c_switch_control.c File Reference
#include <shell/shell.h>
#include <stdlib.h>
#include <string.h>
#include <logging/log.h>
#include "plat_gpio.h"
#include "plat_pldm_sensor.h"
Include dependency graph for shell_plat_i2c_switch_control.c:

Functions

 LOG_MODULE_REGISTER (plat_i2c_switch_control_shell, LOG_LEVEL_INF)
 
 SHELL_STATIC_SUBCMD_SET_CREATE (sub_get_cmds, SHELL_CMD(all, NULL, "get all", cmd_i2c_switch_get_all), SHELL_SUBCMD_SET_END)
 
 SHELL_STATIC_SUBCMD_SET_CREATE (sub_set_cmds, SHELL_CMD(all, NULL, "set all <0|1>", cmd_i2c_switch_set_all), SHELL_SUBCMD_SET_END)
 
 SHELL_STATIC_SUBCMD_SET_CREATE (sub_i2c_switch_control_cmds, SHELL_CMD(get, &sub_get_cmds, "get all", NULL), SHELL_CMD(set, &sub_set_cmds, "set all <0|1>", NULL), SHELL_SUBCMD_SET_END)
 
 SHELL_CMD_REGISTER (i2c_switch_control, &sub_i2c_switch_control_cmds, "I2C switch control (HAMSA/MEDHA0/MEDHA1)", NULL)
 

Function Documentation

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_i2c_switch_control_shell  ,
LOG_LEVEL_INF   
)

◆ SHELL_CMD_REGISTER()

SHELL_CMD_REGISTER ( i2c_switch_control  ,
sub_i2c_switch_control_cmds,
"I2C switch control (HAMSA/MEDHA0/MEDHA1)"  ,
NULL   
)

◆ SHELL_STATIC_SUBCMD_SET_CREATE() [1/3]

SHELL_STATIC_SUBCMD_SET_CREATE ( sub_get_cmds  ,
SHELL_CMD(all, NULL, "get all", cmd_i2c_switch_get_all)  ,
SHELL_SUBCMD_SET_END   
)

◆ SHELL_STATIC_SUBCMD_SET_CREATE() [2/3]

SHELL_STATIC_SUBCMD_SET_CREATE ( sub_i2c_switch_control_cmds  ,
SHELL_CMD(get, &sub_get_cmds, "get all", NULL)  ,
SHELL_CMD(set, &sub_set_cmds, "set all <0|1>", NULL)  ,
SHELL_SUBCMD_SET_END   
)

◆ SHELL_STATIC_SUBCMD_SET_CREATE() [3/3]

SHELL_STATIC_SUBCMD_SET_CREATE ( sub_set_cmds  ,
SHELL_CMD(all, NULL, "set all <0|1>", cmd_i2c_switch_set_all)  ,
SHELL_SUBCMD_SET_END   
)