Files
linuxSmartie/include/cpu.hpp
2026-01-02 19:50:55 +01:00

36 lines
655 B
C++

#ifndef CPU_HPP
#define CPU_HPP
#include <cstdint>
#include <string>
#define N_CPU 16
namespace cpu {
enum Module : uint8_t { unknown,
k10temp,
zenpower };
struct cpuSensors {
Module module = unknown;
uint8_t num_cores = 0;
int16_t tdie = 0;
int16_t tctl = 0;
int16_t tccd1 = 0;
// double pcore = 0.0;
// double psoc = 0.0;
float ptotal = 0.0;
// double vcore = 0.0;
// double vsoc = 0.0;
uint32_t avg_freq = 0;
std::string hwmon;
};
void detectHwmon(cpuSensors* target, const std::string& pci);
void update(cpuSensors* c);
} // namespace cpu
#endif