feat: JSON API on the USB serial port for led-tool
One request per line on USB-Serial-JTAG (@api {"id","method","path","body"}),
one @api envelope back; @reboot restarts. Requests run on the httpd task
through the same dispatcher as the WebSocket, so the checks match the web UI
and never race an HTTP handler. Replies go out in chunks under a lock that log
output shares, so a reply over the TX buffer size isn't dropped and log lines
can't land inside one. The primary console moves to USB-Serial-JTAG.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4cd3bc7973
commit
762ec338bc
8 files changed
+266
-4
No files matched your search
@@ -9,6 +9,7 @@
|
||||
#include "ota.h"
|
||||
#include "patterns.h"
|
||||
#include "presets.h"
|
||||
#include "usb_cfg.h"
|
||||
#include "web.h"
|
||||
|
||||
static const char *TAG = "example";
|
||||
@@ -30,6 +31,7 @@ extern "C" void app_main(void)
|
||||
presets_apply_startup();
|
||||
ESP_ERROR_CHECK(net_start());
|
||||
ESP_ERROR_CHECK(web_start());
|
||||
usb_cfg_start(); // led-tool over USB; the LEDs and Wi-Fi work without it
|
||||
ESP_ERROR_CHECK(ddp_start());
|
||||
ota_confirm_later();
|
||||
|
||||
|
||||
Reference in new issue
Block a user