19#include "bms_carrier.h"
20#include "bms_carrier_getters.h"
21#include "bms_carrier_setters.h"
39#define BMS_FAN_PERIOD_MS 40U
41#define BMS_FAN_TEMP_UPPER_THRESHOLD 50U
43#define BMS_FAN_TEMP_LOWER_THRESHOLD 40U
45#define BMS_FAN_BASE_DUTY_CYCLE 50U
StatusCode
StatusCodes for various errors.
Definition: status.h:27
void update_fans(void)
Update the BMS fans output.
Definition: fan.c:37
uint8_t calculate_fan_dc(uint16_t temperature)
Calculate the fan duty cycle.
Definition: fan.c:25
StatusCode fans_init(BmsStorage *storage)
Initialize the BMS fans.
Definition: fan.c:47
Battery management system storage.
Definition: bms_carrier.h:50
Fan settings.
Definition: fan.h:32
GpioAddress fan1_sense
Definition: fan.h:33
GpioAddress fan_pwm_ctrl
Definition: fan.h:35
GpioAddress fan2_sense
Definition: fan.h:34
Port and pin data.
Definition: gpio.h:112