Add command queue dispatcher and VERSION UART handler.

Centralize command dispatch over a FreeRTOS queue so UART and future
ESP-NOW transports can register handlers; implement the protobuf VERSION
command with framed nanopb responses including build git hash.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-18 21:46:51 +02:00
co-authored by Cursor
parent 6b7ccb4256
commit 43a85ce697
12 changed files with 422 additions and 12 deletions
+3
View File
@@ -1,8 +1,10 @@
#ifndef UART_H
#define UART_H
#include "esp_err.h"
#include "freertos/idf_additions.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#define UART_NUM UART_NUM_1
#define UART_BUF_SIZE 256
@@ -38,5 +40,6 @@ typedef struct {
void init_uart(QueueHandle_t cmd_queue);
void uart_read_task(void *param);
bool parse_uart_byte(uint8_t byte, uart_packet_t *p);
esp_err_t uart_send_framed(const uint8_t *payload, size_t len);
#endif