added gpu
This commit is contained in:
41
include/gpu.h
Normal file
41
include/gpu.h
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifndef GPU_H
|
||||
#define GPU_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
struct gpu_sensors_t {
|
||||
uint64_t vram_used;
|
||||
// uint64_t vram_total = 0;
|
||||
|
||||
float vcore;
|
||||
|
||||
uint16_t clock_core;
|
||||
uint16_t clock_mem;
|
||||
|
||||
// uint8_t fan_pwm = 0;
|
||||
uint16_t fan_speed;
|
||||
|
||||
uint16_t power_avg;
|
||||
uint16_t power_cap;
|
||||
// uint16_t power_cap_max = 0;
|
||||
|
||||
uint8_t temp_edge;
|
||||
uint8_t temp_hotspot;
|
||||
uint8_t temp_mem;
|
||||
uint8_t temp_vrm_gfx;
|
||||
uint8_t temp_vrm_soc;
|
||||
uint8_t temp_vrm_mem;
|
||||
|
||||
bool has_gpu_metrics;
|
||||
|
||||
uint8_t usage_core;
|
||||
uint8_t usage_media;
|
||||
uint8_t usage_umc;
|
||||
|
||||
char hwmon[128];
|
||||
};
|
||||
|
||||
void gpu_detect(struct gpu_sensors_t* t, const char* pci);
|
||||
void gpu_update(struct gpu_sensors_t* g);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user