yuge overhaul, threads, hass, rewrote display, hwmons, bunc of shit
This commit is contained in:
@@ -1,25 +1,32 @@
|
||||
#ifndef GPU_HPP
|
||||
#define GPU_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <fstream>
|
||||
#include <print>
|
||||
#include <string>
|
||||
#include <utils.hpp>
|
||||
|
||||
struct gpu_t {
|
||||
uint16_t fan_speed;
|
||||
uint16_t core_clock;
|
||||
uint16_t mem_clock;
|
||||
double vcore;
|
||||
uint16_t power_avg;
|
||||
uint16_t power_cap;
|
||||
uint16_t power_max;
|
||||
uint8_t fan_pwm;
|
||||
uint8_t edge_temp;
|
||||
uint8_t hotspot_temp;
|
||||
uint8_t mem_temp;
|
||||
uint8_t gfx_vrm_temp;
|
||||
uint8_t soc_vrm_temp;
|
||||
uint8_t mem_vrm_temp;
|
||||
uint64_t vram_used;
|
||||
uint64_t vram_total;
|
||||
uint8_t core_usage;
|
||||
uint8_t media_usage;
|
||||
uint8_t umc_usage;
|
||||
uint16_t fan_speed = 0;
|
||||
uint16_t core_clock = 0;
|
||||
uint16_t mem_clock = 0;
|
||||
double vcore = 0;
|
||||
uint16_t power_avg = 0;
|
||||
uint16_t power_cap = 0;
|
||||
uint16_t power_max = 0;
|
||||
uint8_t fan_pwm = 0;
|
||||
uint8_t edge_temp = 0;
|
||||
uint8_t hotspot_temp = 0;
|
||||
uint8_t mem_temp = 0;
|
||||
uint8_t gfx_vrm_temp = 0;
|
||||
uint8_t soc_vrm_temp = 0;
|
||||
uint8_t mem_vrm_temp = 0;
|
||||
uint64_t vram_used = 0;
|
||||
uint64_t vram_total = 0;
|
||||
uint8_t core_usage = 0;
|
||||
uint8_t media_usage = 0;
|
||||
uint8_t umc_usage = 0;
|
||||
};
|
||||
|
||||
struct GpuMetricsHeader_t {
|
||||
@@ -28,6 +35,9 @@ struct GpuMetricsHeader_t {
|
||||
uint8_t content_revision = 0;
|
||||
};
|
||||
|
||||
std::string detectGpuHwmon(std::string pci);
|
||||
gpu_t getGpu(GpuMetricsHeader_t header, std::string hw);
|
||||
gpu_t getGpu(std::string hw);
|
||||
GpuMetricsHeader_t getGpuMetricsHeader(std::string path);
|
||||
GpuMetricsHeader_t getGpuMetricsHeader(std::string path);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user