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
9typedef 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;
24
25typedef struct {
26 uint16_t in_24v_mv;
27 uint16_t out_5v_mv;
28 uint16_t out_3v3_mv;
30
31typedef 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;
39
40extern pdu_state_t g_pdu_state;
41
42void state_init_defaults(void);
43
44#endif // STATE_H
Definition state.h:9
Definition state.h:25
Definition state.h:31