Files
linuxSmartie/include/cpu.hpp
2025-09-14 21:33:58 +02:00

42 lines
724 B
C++

#ifndef CPU_HPP
#define CPU_HPP
#include <cstdint>
#include <filesystem>
#include <print>
#include <string>
#include <utils.hpp>
#define N_CPU 16
// struct cpu_hwmon_t {
// std::string path = "";
// bool zenpower = false;
// };
namespace cpu {
struct sensors {
std::string hwmon = "";
bool zenpower = false;
int tdie = 0;
int tctl = 0;
int tccd1 = 0;
double pcore = 0.0;
double psoc = 0.0;
double ptotal = 0.0;
double vcore = 0.0;
double vsoc = 0.0;
uint32_t avg_freq = 0;
};
// 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