PER Firmware
Loading...
Searching...
No Matches
state.h
1
#ifndef STATE_H
2
#define STATE_H
3
4
#include <stdbool.h>
5
#include <stdint.h>
6
7
#include "switches.h"
8
9
typedef
struct
{
10
uint8_t fan1_percent;
11
uint8_t fan2_percent;
12
uint8_t fan3_percent;
13
uint8_t fan4_percent;
14
bool
fan1_enabled;
15
bool
fan2_enabled;
16
bool
fan3_enabled;
17
bool
fan4_enabled;
18
bool
pump1_enabled;
19
bool
pump2_enabled;
20
bool
hxfan_enabled;
21
bool
batt_fan_autospeed_enabled;
22
bool
motor_fan_autospeed_enabled;
23
}
pdu_cooling_command_t
;
24
25
typedef
struct
{
26
uint16_t in_24v_mv;
27
uint16_t out_5v_mv;
28
uint16_t out_3v3_mv;
29
}
pdu_rail_voltage_mv_t
;
30
31
typedef
struct
{
32
pdu_rail_voltage_mv_t
rail_voltage_mv;
33
uint16_t switch_current_ma[CS_SWITCH_COUNT];
34
uint16_t mux_adc_counts[6];
35
uint8_t next_mux_channel;
36
uint8_t next_rail_fault_index;
37
pdu_cooling_command_t
cooling_command;
38
}
pdu_state_t
;
39
40
extern
pdu_state_t
g_pdu_state;
41
42
void
state_init_defaults(
void
);
43
44
#endif
// STATE_H
pdu_cooling_command_t
Definition
state.h:9
pdu_rail_voltage_mv_t
Definition
state.h:25
pdu_state_t
Definition
state.h:31
source
pdu
state
state.h
Generated by
1.12.0