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

Macros

#define EEPROM_MAX_WRITE_TIME   5
 

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, "throttle_switch set <lv1 |lv2 |lv3 |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

◆ EEPROM_MAX_WRITE_TIME

#define EEPROM_MAX_WRITE_TIME   5

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, "throttle_switch set <lv1 |lv2 |lv3 |all> <enable>|<disable> [perm]", NULL, 3, 1)  ,
SHELL_SUBCMD_SET_END   
)