Files
linuxSmartie/include/cpu.hpp
2026-01-02 18:23:09 +01:00

36 lines
651 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;
std::byte _pad[1];
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