mbpfan/src/mbpfan.h
2012-06-09 16:25:28 +02:00

41 lines
No EOL
1.1 KiB
C

/** Basic fan speed parameters
*/
extern unsigned short min_fan_speed;
extern unsigned short max_fan_speed;
/** 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 unsigned short low_temp;
extern unsigned short high_temp;
extern unsigned short max_temp;
/** Temperature polling interval
* Default value was 10 (seconds)
*/
extern unsigned short polling_interval;
/** 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)
*/
t_sensors *find_sensors();
/**
* Detect the fans in /sys/devices/platform/applesmc.768/
* Associate each fan to a sensor
*/
void find_fans(t_sensors *sensors);
/**
* Given a linked list of t_sensors, refresh their detected
* temperature
*/
t_sensors *refresh_sensors(t_sensors *sensors);