Added timer trigger for continuous ADC, added command to set the ADC read timer interval

This commit is contained in:
Your Name
2026-09-24 14:56:37 +03:00
parent 4066cd3fbe
commit 921796cb6e
4 changed files with 164 additions and 0 deletions
+10
View File
@@ -96,6 +96,7 @@ int command_handler(struct command_message_t *msg) {
break;
}
case ADC_READ_ALL: {
uint32_t mask = 0b1111111111111111;
@@ -104,6 +105,15 @@ int command_handler(struct command_message_t *msg) {
break;
}
case ADC_SET_READ: {
int interval_ms;
memcpy(&interval_ms, &msg->data[0], sizeof(int));
adc_timer_set(interval_ms);
break;
}
default: {
LOG_WRN("Unknown command received: %d", msg->command);
return -EINVAL;