/* * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include "esp_err.h" #ifdef __cplusplus extern "C" { #endif /** * @brief Serve the JSON API on the USB serial port (USB-Serial-JTAG), for led-tool. * * One request per line, one reply per line; every other line on the port is log output: * @api {"id": n, "method": "GET" or "POST", "path": "/api/...", "body": ..., "host": optional} * -> @api {"id": n, "status": 200, "body": ""} * @reboot -> @ok, then the device restarts */ esp_err_t usb_cfg_start(void); #ifdef __cplusplus } #endif