First implementation of INA3221 power monitor

This commit is contained in:
Your Name
2026-10-03 20:50:51 +03:00
parent 3e23ddfa3d
commit 5bba799bdd
11 changed files with 474 additions and 88 deletions
+10
View File
@@ -5,6 +5,7 @@
#include "adc.h"
#include "usb.h"
#include "digital_out.h"
#include "power_monitor.h"
#include <zephyr/logging/log.h>
@@ -123,6 +124,15 @@ int command_handler(struct command_message_t *msg) {
break;
}
case POWER_MONITOR_SET_READ: {
int interval_ms;
memcpy(&interval_ms, &msg->data[0], sizeof(int));
power_monitor_timer_set(interval_ms);
break;
}
default: {
LOG_WRN("Unknown command received: %d", msg->command);
return -EINVAL;