app: convert device status to C struct

DeviceStatus becomes struct device_status with prefixed functions. The
error flag helpers are static inline functions in the header.

The implementation stays in C++ for now, as it reads data from objects
which are not converted yet. The header doesn't include the headers of
these objects anymore.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Martin Jäger
2026-11-01 15:21:57 +01:00
co-authored by Claude Opus 5.5
parent 3cc24411b5
commit a428892916
13 changed files with 178 additions and 149 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ LOG_MODULE_REGISTER(load, CONFIG_LOAD_LOG_LEVEL);
#define PCB_MOSFETS_TAU_JA DT_PROP(DT_PATH(pcb), mosfets_tau_ja)
#define PCB_INTERNAL_TREF_MAX DT_PROP(DT_PATH(pcb), internal_tref_max)
extern DeviceStatus dev_stat;
extern struct device_status dev_stat;
LoadOutput::LoadOutput(struct dc_bus *dc_bus, const struct device *sw, int led_pos)
: power_switch(sw), led(led_pos)