12#include "can_library/generated/PDU.h"
float current_ma
Definition switch.h:27
uint8_t mux_addr
Definition switch.h:25
mux_id_t mux_id
Definition switch.h:24
fault_id_t fault_id
Definition switch.h:26
GPIO_TypeDef * ctrl_port
Definition switch.h:22
uint8_t ctrl_pin
Definition switch.h:23
static constexpr float SWITCH_CURRENT_SENSE_GAIN
Definition switch.h:33
void SWITCH_disable(switch_id_t switch_id)
Definition switch.c:178
void SWITCH_enable_all(void)
Definition switch.c:193
switch_t g_switches[NUM_SWITCHES]
Definition switch.c:14
static constexpr float SWITCH_FAULT_MARGIN
Definition switch.h:40
void SWITCH_enable(switch_id_t switch_id)
Definition switch.c:166
static constexpr float SWITCH_IMON_R1_OHMS
Definition switch.h:31
static constexpr float SWITCH_SENSE_DIVIDER_GAIN
Definition switch.h:34
mux_id_t
Definition switch.h:16
@ ANALOG_MUX2
Definition switch.h:18
@ ANALOG_MUX1
Definition switch.h:17
static constexpr float SWITCH_FAULT_CURRENT_THRESHOLD_MA
Definition switch.h:41
static constexpr float SWITCH_IMON_R2_OHMS
Definition switch.h:32
static constexpr uint8_t NUM_SWITCHES
Definition switch.h:14
static constexpr float SWITCH_FAULT_SENSE_V
Definition switch.h:37