diff options
author | PA4WDH | 2024-09-12 13:34:54 +0200 |
---|---|---|
committer | PA4WDH | 2024-09-12 13:34:54 +0200 |
commit | 03d8eb4eaf05e5f9929a765e04600dbcace8015f (patch) | |
tree | 41dda2ceef729a9b16f453c2c0741d84919263b3 /cpufreq.c | |
parent | Fix copyright headers (diff) | |
download | cputemp2maxfreq-03d8eb4eaf05e5f9929a765e04600dbcace8015f.tar.gz cputemp2maxfreq-03d8eb4eaf05e5f9929a765e04600dbcace8015f.tar.bz2 cputemp2maxfreq-03d8eb4eaf05e5f9929a765e04600dbcace8015f.zip |
Add cpufreq_get_long_int as generic function to get cpufreq data
Diffstat (limited to 'cpufreq.c')
-rw-r--r-- | cpufreq.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -69,3 +69,11 @@ int cpufreq_set_long_int(char *parameter,long int value,long int checkdelay) snprintf(buf,255,"%ld",value); return cpufreq_set_str(parameter,buf,checkdelay); } + +long int cpufreq_get_long_int(char *parameter) +{ + char sysfs_file[128]; + sprintf(sysfs_file,"/sys/devices/system/cpu/%s/cpufreq/%s",cpudata.cpulist[0],parameter); + return sysfs_read_long_int(sysfs_file); +} + |