OpenBIC
OpenSource Bridge-IC
|
#include <stdlib.h>
#include <logging/log.h>
#include "plat_hook.h"
#include "plat_class.h"
#include "hal_i2c.h"
#include "plat_i2c.h"
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) | |
#define AEGIS_CPLD_ADDR (0x4C >> 1) |
#define CPLD_THROTTLE_SWITCH_ADDR 0x32 |
#define I2C_BUS_CPLD I2C_BUS5 |
int cmd_throttle_status_dis | ( | const struct shell * | shell, |
size_t | argc, | ||
char ** | argv | ||
) |
int cmd_throttle_status_en | ( | const struct shell * | shell, |
size_t | argc, | ||
char ** | argv | ||
) |
void cmd_throttle_status_get | ( | const struct shell * | shell, |
size_t | argc, | ||
char ** | argv | ||
) |
LOG_MODULE_REGISTER | ( | plat_throttle_switch_shell | , |
LOG_LEVEL_DBG | |||
) |
SHELL_CMD_REGISTER | ( | throttle_switch | , |
& | sub_throttle_switch_cmds, | ||
"thermal trip switch command" | , | ||
NULL | |||
) |
SHELL_DYNAMIC_CMD_CREATE | ( | throttle_name | , |
throttle_name_get | |||
) |
SHELL_DYNAMIC_CMD_CREATE | ( | throttle_status | , |
throttle_status_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 | |||
) |