lil refactor

This commit is contained in:
Drath
2025-09-14 21:33:58 +02:00
parent 2ceb08f5ca
commit 329837f92d
5 changed files with 197 additions and 110 deletions

View File

@@ -5,17 +5,21 @@
#include <filesystem>
#include <print>
#include <string>
#include <utils.hpp>
#define N_CPU 16
struct cpu_hwmon_t {
std::string path = "";
bool zenpower = false;
};
// struct cpu_hwmon_t {
// std::string path = "";
// bool zenpower = false;
// };
namespace cpu {
struct sensors {
std::string hwmon = "";
bool zenpower = false;
struct cpu_t {
int tdie = 0;
int tctl = 0;
int tccd1 = 0;
@@ -27,7 +31,12 @@ struct cpu_t {
uint32_t avg_freq = 0;
};
cpu_t getCpu(cpu_hwmon_t hw);
cpu_hwmon_t detectCpuHwmon(std::string pci);
// sensors getCpu(cpu_hwmon_t hw);
// cpu_hwmon_t detectCpuHwmon(std::string pci);
void detectHwmon(sensors* target, std::string pci);
void update(sensors* g);
} // namespace cpu
#endif