consistency, optminization

This commit is contained in:
2026-05-11 11:02:24 +00:00
parent 574f59b8f5
commit aa57cdf651
4 changed files with 12 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
#ifndef CPU_H
#define CPU_H
#ifndef LINUXSMARTIE_CPU_H
#define LINUXSMARTIE_CPU_H
#include <stdint.h>
@@ -21,7 +21,7 @@ struct cpu_sensors_t {
// double vcore;
// double vsoc;
uint32_t avg_freq;
char hwmon[128];
char hwmon[64];
};
void cpu_detect(struct cpu_sensors_t *t, const char *pci_dev);

View File

@@ -1,5 +1,5 @@
#ifndef GPU_H
#define GPU_H
#ifndef LINUXSMARTIE_GPU_H
#define LINUXSMARTIE_GPU_H
#include <stdbool.h>
#include <stdint.h>
@@ -33,7 +33,7 @@ struct gpu_sensors_t {
uint8_t usage_media;
uint8_t usage_umc;
char hwmon[128];
char hwmon[64];
};
void gpu_detect(struct gpu_sensors_t *t, const char *pci);

View File

@@ -1,5 +1,5 @@
#ifndef LOG_H
#define LOG_H
#ifndef LINUXSMARTIE_LOG_H
#define LINUXSMARTIE_LOG_H
/* ── kill switch ────────────────────────────────────────────────────────── */
/* comment out to disable all logging */

View File

@@ -16,19 +16,19 @@ struct memory_t {
struct disk_t {
struct memory_t usage;
char mountpoint[256];
char mountpoint[64];
};
struct network_t {
uint32_t download;
uint32_t upload;
char device[32];
char device[16];
};
struct syssensors_t {
uint16_t fan_speed[2]; // left and right cpu fans
int16_t t_sensor; // ntc temp sensor
char hwmon[128];
char hwmon[64];
};
void sys_get_time(struct time_date_t *td);
@@ -42,6 +42,7 @@ void sys_get_disk(struct disk_t *disk);
void sys_get_network(struct network_t *network);
void sys_detect(struct syssensors_t *s, const char *platform);
void sys_update_sensors(struct syssensors_t *s);
#endif // LINUXSMARTIE_SYS_H