|
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"#include "plat_user_setting.h"#include "plat_fru.h"#include "shell_plat_throttle_switch.h"
Classes | |
| struct | throttle_user_settings_struct |
Macros | |
| #define | CPLD_THROTTLE_SWITCH_ADDR 0x25 |
| #define | EEPROM_MAX_WRITE_TIME 5 |
Typedefs | |
| typedef struct throttle_user_settings_struct | throttle_user_settings_struct |
Functions | |
| LOG_MODULE_REGISTER (plat_throttle_switch_shell, LOG_LEVEL_DBG) | |
| bool | set_user_settings_throttle_to_eeprom (void *throttle_user_settings, uint8_t data_length) |
| bool | set_throttle_user_settings (uint8_t *throttle_status_reg, bool is_perm) |
| 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) | |
Variables | |
| throttle_user_settings_struct | throttle_user_settings = { 0xFF } |
| #define CPLD_THROTTLE_SWITCH_ADDR 0x25 |
| #define EEPROM_MAX_WRITE_TIME 5 |
| typedef struct throttle_user_settings_struct throttle_user_settings_struct |
| 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 | |||
| ) |
| bool set_throttle_user_settings | ( | uint8_t * | throttle_status_reg, |
| bool | is_perm | ||
| ) |

| bool set_user_settings_throttle_to_eeprom | ( | void * | throttle_user_settings, |
| uint8_t | data_length | ||
| ) |

| 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, "throttle_switch set <lv1 |lv2 |lv3 |all> <enable>|<disable> [perm]", NULL, 3, 1) | , | ||
| SHELL_SUBCMD_SET_END | |||
| ) |
| throttle_user_settings_struct throttle_user_settings = { 0xFF } |