Files
panda-meb/board/drivers/fan_declarations.h
probablyanasian a2064b86f3 Change fan to use pure pwm (#2267)
* set cuatro fan settings

* set cuatro to use pure pwm

* use pwm on all boards

* remove fan max rpm configs, use pure pwm

* add comment about cooldown

* change max rpm in python side

* remove reference to max_fan_pwm in fan.h

* fully refactor fan configs into "has_fan"

* increase limits on fan test to 15% either way

* only tres for now

* doesn't matter

* not relevant anymore

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-09-13 11:09:51 -07:00

17 lines
321 B
C

#pragma once
struct fan_state_t {
uint16_t tach_counter;
uint16_t rpm;
uint8_t power;
float error_integral;
uint8_t cooldown_counter;
};
extern struct fan_state_t fan_state;
void fan_set_power(uint8_t percentage);
void llfan_init(void);
void fan_init(void);
// Call this at FAN_TICK_FREQ
void fan_tick(void);