mbpfan/src/mbpfan.h

51 lines
1.2 KiB
C
Raw Normal View History

2012-06-09 14:25:28 +00:00
/** Basic fan speed parameters
*/
extern int min_fan_speed;
extern int max_fan_speed;
2012-06-09 14:25:28 +00:00
/** Temperature Thresholds
* low_temp - temperature below which fan speed will be at minimum
* high_temp - fan will increase speed when higher than this temperature
* max_temp - fan will run at full speed above this temperature */
extern int low_temp;
extern int high_temp;
extern int max_temp;
2012-06-09 14:25:28 +00:00
/** Temperature polling interval
* Default value was 10 (seconds)
*/
extern int polling_interval;
2012-06-09 14:25:28 +00:00
/** Represents a Temperature sensor
*/
struct s_sensors;
typedef struct s_sensors t_sensors;
/**
* Detect the sensors in /sys/devices/platform/coretemp.0/temp
* Return a linked list of t_sensors (first temperature detected)
*/
2012-06-11 19:43:53 +00:00
t_sensors *retrieve_sensors();
2012-06-09 14:25:28 +00:00
/**
* Given a linked list of t_sensors, refresh their detected
* temperature
*/
t_sensors *refresh_sensors(t_sensors *sensors);
2012-06-09 14:25:28 +00:00
/**
* Detect the fans in /sys/devices/platform/applesmc.768/
* Associate each fan to a sensor
*/
void find_fans(t_sensors *sensors);
/**
* Given a list of sensors with associated fans
* Set them to manual control
2012-06-09 14:25:28 +00:00
*/
2012-06-11 19:43:53 +00:00
void set_fans_man(t_sensors *sensors);
/**
* Main Program
*/
void mbpfan();