From 48ec55bd19362c5b8f7d06f7678321c3535672f4 Mon Sep 17 00:00:00 2001 From: PA4WDH Date: Sat, 20 May 2023 19:27:47 +0200 Subject: Add validation and fallback to startup --- cputemp2maxfreq.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 cputemp2maxfreq.h (limited to 'cputemp2maxfreq.h') diff --git a/cputemp2maxfreq.h b/cputemp2maxfreq.h new file mode 100644 index 0000000..ef33fd5 --- /dev/null +++ b/cputemp2maxfreq.h @@ -0,0 +1,17 @@ +struct s_cpudata { + long int min_freq; // CPU's minimum frequency + long int max_freq; // CPU's maximum frequency + long int cur_freq; // CPU's current frequency + long int cur_temp; // CPU's current temperature + long int scale_max; // Governor's maximum scaling frequency +}; + +struct s_config { + char *governor; // The governor to use + long int max_temp; // The target temperature + char *temp_input; // Input file to read the temperature + long int freq_step; // Step size to increase/decrease CPU frequency + long int fallback_freq; // CPU frquency to set if we fail to protect hardware + unsigned int interval; // Time interval to check CPU temperature +}; + -- cgit v1.2.3