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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user