lil refactor
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user