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

Macros

#define AEGIS_CPLD_ADDR   (0x4C >> 1)
 
#define I2C_BUS_CPLD   I2C_BUS5
 
#define CPLD_THROTTLE_SWITCH_ADDR   0x32
 

Functions

 LOG_MODULE_REGISTER (plat_throttle_switch_shell, LOG_LEVEL_DBG)
 
void cmd_throttle_status_get (const struct shell *shell, size_t argc, char **argv)
 
int cmd_throttle_status_en (const struct shell *shell, size_t argc, char **argv)
 
int cmd_throttle_status_dis (const struct shell *shell, size_t argc, char **argv)
 
 SHELL_DYNAMIC_CMD_CREATE (throttle_status, throttle_status_get)
 
 SHELL_DYNAMIC_CMD_CREATE (throttle_name, throttle_name_get)
 
 SHELL_STATIC_SUBCMD_SET_CREATE (sub_throttle_switch_cmds, SHELL_CMD(get, NULL, "get throttle switch status", cmd_throttle_status_get), SHELL_CMD_ARG(set, &throttle_name, "set throttle <sense0|sense1|all> <enable|disable> [perm]", NULL, 3, 1), SHELL_SUBCMD_SET_END)
 
 SHELL_CMD_REGISTER (throttle_switch, &sub_throttle_switch_cmds, "thermal trip switch command", NULL)
 

Macro Definition Documentation

◆ AEGIS_CPLD_ADDR

#define AEGIS_CPLD_ADDR   (0x4C >> 1)

◆ CPLD_THROTTLE_SWITCH_ADDR

#define CPLD_THROTTLE_SWITCH_ADDR   0x32

◆ I2C_BUS_CPLD

#define I2C_BUS_CPLD   I2C_BUS5

Function Documentation

◆ cmd_throttle_status_dis()

int cmd_throttle_status_dis ( const struct shell *  shell,
size_t  argc,
char **  argv 
)

◆ cmd_throttle_status_en()

int cmd_throttle_status_en ( const struct shell *  shell,
size_t  argc,
char **  argv 
)

◆ cmd_throttle_status_get()

void cmd_throttle_status_get ( const struct shell *  shell,
size_t  argc,
char **  argv 
)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_throttle_switch_shell  ,
LOG_LEVEL_DBG   
)

◆ SHELL_CMD_REGISTER()

SHELL_CMD_REGISTER ( throttle_switch  ,
sub_throttle_switch_cmds,
"thermal trip switch command"  ,
NULL   
)

◆ SHELL_DYNAMIC_CMD_CREATE() [1/2]

SHELL_DYNAMIC_CMD_CREATE ( throttle_name  ,
throttle_name_get   
)

◆ SHELL_DYNAMIC_CMD_CREATE() [2/2]

SHELL_DYNAMIC_CMD_CREATE ( throttle_status  ,
throttle_status_get   
)

◆ SHELL_STATIC_SUBCMD_SET_CREATE()

SHELL_STATIC_SUBCMD_SET_CREATE ( sub_throttle_switch_cmds  ,
SHELL_CMD(get, NULL, "get throttle switch status", cmd_throttle_status_get)  ,
SHELL_CMD_ARG(set, &throttle_name, "set throttle <sense0|sense1|all> <enable|disable> [perm]", NULL, 3, 1)  ,
SHELL_SUBCMD_SET_END   
)