OpenBIC
OpenSource Bridge-IC
plat_hwmon.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
31};
32
33typedef struct _pump_reset_struct {
35 bool (*fn)(struct _pump_reset_struct *, uint8_t bit_value);
36 uint8_t senser_num;
38
44};
45
47 uint8_t pump_num;
48 uint8_t size;
49 uint16_t eeprom_offset;
51
56bool close_pump(pump_reset_struct *data, uint8_t bit_val);
61bool set_all_pump_power(bool switch_val);
64void set_pump_redundant_switch_time(uint8_t time);
66void pump_redundant_enable(uint8_t onoff);
67uint8_t pwm_control(uint8_t group, uint8_t duty);
68bool get_pump_uptime_secs(uint8_t pump_num, uint32_t *return_uptime);
69bool set_pump_uptime_secs(uint8_t pump_1_set, uint8_t pump_2_set, uint8_t pump_3_set);
70bool get_pump_last_switch_time(uint8_t pump_num, uint32_t *return_uptime);
71bool get_pump_current_boot_unrunning_time(uint8_t pump_num, uint32_t *return_uptime);
struct _pump_running_time_struct pump_running_time
void pump_redundant_enable(uint8_t onoff)
Definition: plat_hwmon.c:335
bool set_all_pump_power(bool switch_val)
Definition: plat_hwmon.c:186
bool rpu_remote_power_cycle_function(pump_reset_struct *data, uint8_t bit_val)
Definition: plat_hwmon.c:294
bool modbus_pump_setting_unsupport_function(pump_reset_struct *data, uint8_t bit_val)
Definition: plat_hwmon.c:47
bool pump_setting_pump2_reset(pump_reset_struct *data, uint8_t bit_val)
bool pump_setting_pump3_reset(pump_reset_struct *data, uint8_t bit_val)
bool get_pump_current_boot_unrunning_time(uint8_t pump_num, uint32_t *return_uptime)
Definition: plat_hwmon.c:486
struct _pump_reset_struct pump_reset_struct
bool pump_setting_pump1_reset(pump_reset_struct *data, uint8_t bit_val)
PUMP_NUM
Definition: plat_hwmon.h:39
@ PUMP_MAX_NUM
Definition: plat_hwmon.h:43
@ PUMP_1_UPTIME
Definition: plat_hwmon.h:40
@ PUMP_3_UPTIME
Definition: plat_hwmon.h:42
@ PUMP_2_UPTIME
Definition: plat_hwmon.h:41
void set_pump_redundant_switch_time_type(uint8_t type)
Definition: plat_hwmon.c:331
bool get_pump_last_switch_time(uint8_t pump_num, uint32_t *return_uptime)
Definition: plat_hwmon.c:463
uint8_t pwm_control(uint8_t group, uint8_t duty)
Definition: plat_hwmon.c:389
bool clear_log_for_modbus_pump_setting(pump_reset_struct *data, uint8_t bit_val)
Definition: plat_hwmon.c:54
bool get_pump_uptime_secs(uint8_t pump_num, uint32_t *return_uptime)
Definition: plat_hwmon.c:539
bool close_pump(pump_reset_struct *data, uint8_t bit_val)
Definition: plat_hwmon.c:114
bool modbus_clear_pump_running_time_function(pump_reset_struct *data, uint8_t bit_val)
Definition: plat_hwmon.c:607
bool pump_setting_set_manual_flag(pump_reset_struct *data, uint8_t bit_val)
Definition: plat_hwmon.c:135
PUMP_STATE
Definition: plat_hwmon.h:17
@ CLEAR_LOG
Definition: plat_hwmon.h:27
@ MANUAL_CONTROL_PUMP
Definition: plat_hwmon.h:19
@ CLEAR_PUMP_RUNNING_TIME
Definition: plat_hwmon.h:26
@ MANUAL_CONTROL_FAN
Definition: plat_hwmon.h:20
@ PUMP_REDUNDENT_SWITCHED
Definition: plat_hwmon.h:18
@ AUTOTUNE_PRESSURE_BALANCE_CONTROL
Definition: plat_hwmon.h:22
@ SYSTEM_STOP
Definition: plat_hwmon.h:23
@ PUMP_2_RESET
Definition: plat_hwmon.h:29
@ PUMP_1_RESET
Definition: plat_hwmon.h:28
@ PUMP_3_RESET
Definition: plat_hwmon.h:30
@ MANUAL_CONTROL
Definition: plat_hwmon.h:25
@ AUTOTUNE_FLOW_CONTROL
Definition: plat_hwmon.h:21
@ RPU_REMOTE_POWER_CYCLE
Definition: plat_hwmon.h:24
bool pump_setting_set_auto_tune_flag(pump_reset_struct *data, uint8_t bit_val)
Definition: plat_hwmon.c:153
uint8_t get_pump_redundant_switch_time()
Definition: plat_hwmon.c:323
bool set_pump_uptime_secs(uint8_t pump_1_set, uint8_t pump_2_set, uint8_t pump_3_set)
Definition: plat_hwmon.c:571
bool pump_setting_set_pump_redundant(pump_reset_struct *data, uint8_t bit_val)
Definition: plat_hwmon.c:177
void set_pump_redundant_switch_time(uint8_t time)
Definition: plat_hwmon.c:327
uint8_t data[]
Definition: isl69259.c:2
uint8_t type
Definition: pldm_base.h:0
Definition: plat_hwmon.h:33
uint8_t senser_num
Definition: plat_hwmon.h:36
bool(* fn)(struct _pump_reset_struct *, uint8_t bit_value)
Definition: plat_hwmon.h:35
uint8_t function_index
Definition: plat_hwmon.h:34
Definition: plat_hwmon.h:46
uint8_t pump_num
Definition: plat_hwmon.h:47
uint16_t eeprom_offset
Definition: plat_hwmon.h:49
uint8_t size
Definition: plat_hwmon.h:48