2021-05-10 08:58:46 +02:00
|
|
|
#ifndef SHO_TEMP_H
|
|
|
|
#define SHO_TEMP_H
|
|
|
|
|
|
|
|
#define PACKAGE "wmtemp"
|
|
|
|
#define VERSION "0.0.4"
|
|
|
|
|
|
|
|
#define TO_FAHRENHEIT(t) (((double)(t) * 1.8) + 32.0)
|
|
|
|
#define TO_KELVIN(t) ((double)(t) + 273.0)
|
|
|
|
|
|
|
|
typedef enum temperature_t {
|
|
|
|
CELCIUS, FAHRENHEIT, KELVIN
|
|
|
|
} temperature_t;
|
|
|
|
|
2021-05-10 13:03:58 +02:00
|
|
|
typedef struct sensor_path_t {
|
|
|
|
char const *chip;
|
|
|
|
char const *feature;
|
|
|
|
char const *subfeature;
|
|
|
|
} sensor_path_t;
|
|
|
|
|
|
|
|
extern sensor_path_t cpu_sensor_path;
|
|
|
|
extern sensor_path_t sys_sensor_path;
|
2021-05-10 08:58:46 +02:00
|
|
|
|
|
|
|
extern temperature_t t_type;
|
|
|
|
|
|
|
|
void temp_init(const char *filename);
|
|
|
|
void temp_getusage(unsigned int *cpu_temp, unsigned int *sys_temp);
|
|
|
|
|
|
|
|
#endif
|