refactor(architecture): unify facade headers and remove unused lcd dependency
This commit is contained in:
13
AGENTS.md
13
AGENTS.md
@@ -13,9 +13,16 @@
|
|||||||
1. Dependencies are one-way only: `app_composition -> control_plane -> domain -> platform`.
|
1. Dependencies are one-way only: `app_composition -> control_plane -> domain -> platform`.
|
||||||
2. Lateral direct dependencies are forbidden unless listed in `dependency_whitelist.md`.
|
2. Lateral direct dependencies are forbidden unless listed in `dependency_whitelist.md`.
|
||||||
3. Cross-domain communication must use events or Port interfaces; never include another domain's `internal/*.h`.
|
3. Cross-domain communication must use events or Port interfaces; never include another domain's `internal/*.h`.
|
||||||
4. Each component keeps one public header in `include/`; private headers stay in `internal/` via `PRIV_INCLUDE_DIRS`.
|
4. Each component keeps exactly one public facade header in `include/`; private headers stay in `internal/` via `PRIV_INCLUDE_DIRS`.
|
||||||
5. Runtime state must have a single source of truth (SSOT); other modules subscribe/query instead of copying fields.
|
- Long-term canonical facade headers in this repo:
|
||||||
6. Blocking APIs must define timeout and idempotent semantics (no destructive background continuation after caller timeout).
|
- `platform/include/platform.h`
|
||||||
|
- `domain/include/domain.h`
|
||||||
|
- `control_plane/include/control_plane.h`
|
||||||
|
- `app_composition/include/app_composition.h`
|
||||||
|
5. Upper layers may include only immediate downstream public facade headers; leapfrog includes across multiple layers are forbidden.
|
||||||
|
6. Cross-cutting contracts must have a single declared owner layer and one public declaration point; duplicated declarations across layers are forbidden.
|
||||||
|
7. Runtime state must have a single source of truth (SSOT); orchestration layers should query/subscribe rather than duplicate lower-layer lifecycle or readiness state.
|
||||||
|
8. Blocking APIs must define timeout and idempotent semantics (no destructive background continuation after caller timeout).
|
||||||
|
|
||||||
## Build, Flash, and Validation
|
## Build, Flash, and Validation
|
||||||
Activate ESP-IDF v5.5.2 before running any `idf.py` command:
|
Activate ESP-IDF v5.5.2 before running any `idf.py` command:
|
||||||
|
|||||||
13
components/app_composition/include/app_composition.h
Normal file
13
components/app_composition/include/app_composition.h
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "esp_err.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
esp_err_t app_composition_start(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -1,12 +1,17 @@
|
|||||||
#include "controller_lifecycle.h"
|
#include "app_composition.h"
|
||||||
|
#include "control_plane.h"
|
||||||
|
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
|
|
||||||
static const char *TAG = "app_main";
|
static const char *TAG = "app_main";
|
||||||
|
|
||||||
|
esp_err_t app_composition_start(void) {
|
||||||
|
return controller_lifecycle_start();
|
||||||
|
}
|
||||||
|
|
||||||
void app_main(void) {
|
void app_main(void) {
|
||||||
esp_err_t rc = controller_lifecycle_start();
|
esp_err_t rc = app_composition_start();
|
||||||
if (rc != ESP_OK) {
|
if (rc != ESP_OK) {
|
||||||
ESP_LOGE(TAG, "Controller lifecycle start failed: %s", esp_err_to_name(rc));
|
ESP_LOGE(TAG, "Controller lifecycle start failed: %s", esp_err_to_name(rc));
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -4,6 +4,10 @@
|
|||||||
|
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CONTROLLER_LIFECYCLE_STATE_STOPPED = 0,
|
CONTROLLER_LIFECYCLE_STATE_STOPPED = 0,
|
||||||
CONTROLLER_LIFECYCLE_STATE_STARTING,
|
CONTROLLER_LIFECYCLE_STATE_STARTING,
|
||||||
@@ -24,3 +28,10 @@ esp_err_t controller_lifecycle_start(void);
|
|||||||
esp_err_t controller_lifecycle_stop(void);
|
esp_err_t controller_lifecycle_stop(void);
|
||||||
void controller_lifecycle_get_status(controller_lifecycle_status_t *out_status);
|
void controller_lifecycle_get_status(controller_lifecycle_status_t *out_status);
|
||||||
const char *controller_lifecycle_state_str(controller_lifecycle_state_t state);
|
const char *controller_lifecycle_state_str(controller_lifecycle_state_t state);
|
||||||
|
|
||||||
|
esp_err_t rest_server_start(void);
|
||||||
|
void rest_server_stop(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "esp_err.h"
|
|
||||||
|
|
||||||
esp_err_t rest_server_start(void);
|
|
||||||
void rest_server_stop(void);
|
|
||||||
@@ -1,16 +1,10 @@
|
|||||||
#include "controller_lifecycle.h"
|
#include "control_plane.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "esp_timer.h"
|
#include "esp_timer.h"
|
||||||
#include "image_generation.h"
|
#include "domain.h"
|
||||||
#include "printer_protocol.h"
|
|
||||||
#include "rest_server.h"
|
|
||||||
#include "runtime_diagnostics.h"
|
|
||||||
#include "runtime_policy.h"
|
|
||||||
#include "system_runtime.h"
|
|
||||||
#include "voice_interaction.h"
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/semphr.h"
|
#include "freertos/semphr.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "rest_server.h"
|
#include "control_plane.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include "esp_heap_caps.h"
|
#include "esp_heap_caps.h"
|
||||||
#include "mbedtls/base64.h"
|
#include "mbedtls/base64.h"
|
||||||
#include "runtime_diagnostics.h"
|
#include "domain.h"
|
||||||
|
|
||||||
#define REST_SERVER_MAX_BODY_BYTES (4 * 1024 * 1024)
|
#define REST_SERVER_MAX_BODY_BYTES (4 * 1024 * 1024)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "printer_protocol.h"
|
#include "domain.h"
|
||||||
esp_err_t rest_server_job_get(httpd_req_t *req) {
|
esp_err_t rest_server_job_get(httpd_req_t *req) {
|
||||||
if (!rest_server_auth_ok(req)) {
|
if (!rest_server_auth_ok(req)) {
|
||||||
return rest_server_send_error(req, "401 Unauthorized", "unauthorized");
|
return rest_server_send_error(req, "401 Unauthorized", "unauthorized");
|
||||||
|
|||||||
@@ -4,12 +4,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "controller_lifecycle.h"
|
#include "control_plane.h"
|
||||||
#include "printer_protocol.h"
|
#include "domain.h"
|
||||||
#include "runtime_diagnostics.h"
|
|
||||||
#include "runtime_policy.h"
|
|
||||||
#include "system_runtime.h"
|
|
||||||
#include "voice_interaction.h"
|
|
||||||
|
|
||||||
static void fill_runtime_diag_json(cJSON *root) {
|
static void fill_runtime_diag_json(cJSON *root) {
|
||||||
runtime_diag_snapshot_t snapshot = {0};
|
runtime_diag_snapshot_t snapshot = {0};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "printer_protocol.h"
|
#include "domain.h"
|
||||||
|
|
||||||
static const char *TAG = "rest_print";
|
static const char *TAG = "rest_print";
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,7 @@
|
|||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "image_generation.h"
|
#include "domain.h"
|
||||||
#include "printer_protocol.h"
|
|
||||||
#include "raster_tools.h"
|
|
||||||
#include "runtime_policy.h"
|
|
||||||
|
|
||||||
static const char *TAG = "rest_print";
|
static const char *TAG = "rest_print";
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
|
||||||
#include "printer_protocol.h"
|
#include "domain.h"
|
||||||
#include "raster_tools.h"
|
|
||||||
|
|
||||||
static esp_err_t decode_image_json_to_raster(cJSON *json,
|
static esp_err_t decode_image_json_to_raster(cJSON *json,
|
||||||
uint16_t *out_width,
|
uint16_t *out_width,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "voice_interaction.h"
|
#include "domain.h"
|
||||||
|
|
||||||
static void rest_server_add_voice_status(cJSON *root) {
|
static void rest_server_add_voice_status(cJSON *root) {
|
||||||
voice_interaction_status_t st = {0};
|
voice_interaction_status_t st = {0};
|
||||||
|
|||||||
227
components/domain/include/domain.h
Normal file
227
components/domain/include/domain.h
Normal file
@@ -0,0 +1,227 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "esp_err.h"
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ---------- system_runtime ----------
|
||||||
|
esp_err_t system_runtime_start(void);
|
||||||
|
esp_err_t system_runtime_shutdown(void);
|
||||||
|
esp_err_t system_runtime_bootstrap(void);
|
||||||
|
|
||||||
|
bool system_runtime_wifi_ready(void);
|
||||||
|
void system_runtime_get_ip(char *buf, size_t buf_len);
|
||||||
|
|
||||||
|
// ---------- raster_tools ----------
|
||||||
|
esp_err_t raster_tools_render_text_384(const char *text,
|
||||||
|
uint8_t scale,
|
||||||
|
uint8_t line_spacing,
|
||||||
|
uint16_t max_height,
|
||||||
|
uint16_t *out_width,
|
||||||
|
uint16_t *out_height,
|
||||||
|
uint8_t **out_raster,
|
||||||
|
size_t *out_len,
|
||||||
|
char *err,
|
||||||
|
size_t err_len);
|
||||||
|
|
||||||
|
esp_err_t raster_tools_convert_gray8_to_raster_384(const uint8_t *gray,
|
||||||
|
uint16_t src_width,
|
||||||
|
uint16_t src_height,
|
||||||
|
bool scale_to_width,
|
||||||
|
uint8_t threshold,
|
||||||
|
bool invert,
|
||||||
|
uint16_t max_height,
|
||||||
|
uint16_t *out_width,
|
||||||
|
uint16_t *out_height,
|
||||||
|
uint8_t **out_raster,
|
||||||
|
size_t *out_len,
|
||||||
|
char *err,
|
||||||
|
size_t err_len);
|
||||||
|
|
||||||
|
esp_err_t raster_tools_convert_png_to_raster_384(const uint8_t *png,
|
||||||
|
size_t png_len,
|
||||||
|
bool scale_to_width,
|
||||||
|
uint8_t threshold,
|
||||||
|
bool invert,
|
||||||
|
uint16_t max_height,
|
||||||
|
uint16_t *out_width,
|
||||||
|
uint16_t *out_height,
|
||||||
|
uint8_t **out_raster,
|
||||||
|
size_t *out_len,
|
||||||
|
char *err,
|
||||||
|
size_t err_len);
|
||||||
|
|
||||||
|
esp_err_t raster_tools_render_qr_384(const char *text,
|
||||||
|
uint8_t module_scale,
|
||||||
|
uint8_t margin_modules,
|
||||||
|
uint8_t ecc_level,
|
||||||
|
uint16_t max_height,
|
||||||
|
uint16_t *out_width,
|
||||||
|
uint16_t *out_height,
|
||||||
|
uint8_t **out_raster,
|
||||||
|
size_t *out_len,
|
||||||
|
char *err,
|
||||||
|
size_t err_len);
|
||||||
|
|
||||||
|
// ---------- image_generation ----------
|
||||||
|
typedef struct {
|
||||||
|
const char *prompt;
|
||||||
|
const char *size;
|
||||||
|
bool prompt_extend;
|
||||||
|
bool has_seed;
|
||||||
|
uint32_t seed;
|
||||||
|
uint32_t generation_timeout_ms;
|
||||||
|
uint32_t download_timeout_ms;
|
||||||
|
} image_generation_request_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint8_t *png;
|
||||||
|
size_t png_len;
|
||||||
|
char image_url[1024];
|
||||||
|
char output_prompt[256];
|
||||||
|
char request_id[80];
|
||||||
|
uint16_t width;
|
||||||
|
uint16_t height;
|
||||||
|
} image_generation_result_t;
|
||||||
|
|
||||||
|
void image_generation_result_reset(image_generation_result_t *result);
|
||||||
|
void image_generation_result_free(image_generation_result_t *result);
|
||||||
|
void image_generation_schedule_prewarm(void);
|
||||||
|
|
||||||
|
esp_err_t image_generation_generate_png(const image_generation_request_t *req,
|
||||||
|
image_generation_result_t *out_result,
|
||||||
|
char *err,
|
||||||
|
size_t err_len);
|
||||||
|
|
||||||
|
// ---------- printer_protocol ----------
|
||||||
|
typedef enum {
|
||||||
|
PRINT_JOB_STATE_NONE = 0,
|
||||||
|
PRINT_JOB_STATE_QUEUED,
|
||||||
|
PRINT_JOB_STATE_RUNNING,
|
||||||
|
PRINT_JOB_STATE_SUCCESS,
|
||||||
|
PRINT_JOB_STATE_FAILED,
|
||||||
|
PRINT_JOB_STATE_CANCELED,
|
||||||
|
} print_job_state_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint32_t id;
|
||||||
|
print_job_state_t state;
|
||||||
|
uint8_t progress;
|
||||||
|
uint16_t width;
|
||||||
|
uint16_t height;
|
||||||
|
size_t data_len;
|
||||||
|
char density[16];
|
||||||
|
char error[96];
|
||||||
|
int64_t created_ms;
|
||||||
|
int64_t started_ms;
|
||||||
|
int64_t finished_ms;
|
||||||
|
} print_job_info_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint8_t major;
|
||||||
|
uint8_t minor;
|
||||||
|
uint8_t patch;
|
||||||
|
} printer_ota_version_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
bool connected;
|
||||||
|
bool notify_ready;
|
||||||
|
bool busy;
|
||||||
|
bool has_paper;
|
||||||
|
uint8_t battery_percent;
|
||||||
|
float temperature;
|
||||||
|
uint16_t mtu;
|
||||||
|
uint32_t queue_depth;
|
||||||
|
int64_t last_status_ms;
|
||||||
|
} printer_runtime_status_t;
|
||||||
|
|
||||||
|
typedef uint32_t printer_status_poll_pause_token_t;
|
||||||
|
|
||||||
|
esp_err_t printer_protocol_init(void);
|
||||||
|
esp_err_t printer_protocol_stop(uint32_t timeout_ms);
|
||||||
|
|
||||||
|
esp_err_t printer_protocol_connect(const char *target_name, uint32_t timeout_ms);
|
||||||
|
void printer_protocol_disconnect(void);
|
||||||
|
|
||||||
|
void printer_protocol_get_runtime_status(printer_runtime_status_t *out_status);
|
||||||
|
printer_status_poll_pause_token_t printer_protocol_status_poll_pause_acquire(void);
|
||||||
|
void printer_protocol_status_poll_pause_release(printer_status_poll_pause_token_t *token);
|
||||||
|
|
||||||
|
esp_err_t printer_protocol_submit_raster_job(const uint8_t *raster,
|
||||||
|
size_t raster_len,
|
||||||
|
uint16_t width,
|
||||||
|
uint16_t height,
|
||||||
|
const char *density,
|
||||||
|
uint32_t *out_job_id,
|
||||||
|
char *err,
|
||||||
|
size_t err_len);
|
||||||
|
|
||||||
|
bool printer_protocol_get_job(uint32_t job_id, print_job_info_t *out_info);
|
||||||
|
esp_err_t printer_protocol_list_jobs(print_job_info_t *out_jobs, size_t max_jobs, size_t *out_count);
|
||||||
|
esp_err_t printer_protocol_cancel_job(uint32_t job_id, char *err, size_t err_len);
|
||||||
|
size_t printer_protocol_cleanup_jobs(bool include_success, bool include_failed, bool include_canceled);
|
||||||
|
|
||||||
|
esp_err_t printer_protocol_gap_move(uint32_t timeout_ms, char *err, size_t err_len);
|
||||||
|
esp_err_t printer_protocol_get_label_offset(uint8_t *out_offset, uint32_t timeout_ms, char *err, size_t err_len);
|
||||||
|
esp_err_t printer_protocol_set_label_offset(uint8_t offset, uint32_t timeout_ms, char *err, size_t err_len);
|
||||||
|
|
||||||
|
esp_err_t printer_protocol_ota_jump_boot(uint32_t timeout_ms, char *err, size_t err_len);
|
||||||
|
esp_err_t printer_protocol_ota_jump_app(uint32_t timeout_ms, char *err, size_t err_len);
|
||||||
|
esp_err_t printer_protocol_ota_erase_page(uint16_t page_num, uint32_t timeout_ms, char *err, size_t err_len);
|
||||||
|
esp_err_t printer_protocol_ota_write_frame(uint16_t packet_num,
|
||||||
|
bool is_last_frame,
|
||||||
|
const uint8_t *data,
|
||||||
|
size_t data_len,
|
||||||
|
uint32_t timeout_ms,
|
||||||
|
char *err,
|
||||||
|
size_t err_len);
|
||||||
|
esp_err_t printer_protocol_ota_get_version(printer_ota_version_t *out_version,
|
||||||
|
uint32_t timeout_ms,
|
||||||
|
char *err,
|
||||||
|
size_t err_len);
|
||||||
|
|
||||||
|
const char *printer_protocol_job_state_str(print_job_state_t state);
|
||||||
|
|
||||||
|
// ---------- voice_interaction ----------
|
||||||
|
typedef enum {
|
||||||
|
VOICE_DIALOG_STATE_IDLE = 0,
|
||||||
|
VOICE_DIALOG_STATE_LISTENING,
|
||||||
|
VOICE_DIALOG_STATE_THINKING,
|
||||||
|
VOICE_DIALOG_STATE_RESPONDING,
|
||||||
|
} voice_dialog_state_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
bool ready;
|
||||||
|
bool session_active;
|
||||||
|
bool ws_connected;
|
||||||
|
bool started;
|
||||||
|
bool tap_active;
|
||||||
|
voice_dialog_state_t dialog_state;
|
||||||
|
char task_id[40];
|
||||||
|
char dialog_id[40];
|
||||||
|
char last_error[128];
|
||||||
|
int64_t last_event_ms;
|
||||||
|
uint32_t upstream_packets;
|
||||||
|
uint32_t downstream_packets;
|
||||||
|
} voice_interaction_status_t;
|
||||||
|
|
||||||
|
esp_err_t voice_interaction_init(void);
|
||||||
|
esp_err_t voice_interaction_start(char *err, size_t err_len);
|
||||||
|
esp_err_t voice_interaction_stop(char *err, size_t err_len);
|
||||||
|
|
||||||
|
esp_err_t voice_interaction_tap_start(char *err, size_t err_len);
|
||||||
|
esp_err_t voice_interaction_tap_cancel(char *err, size_t err_len);
|
||||||
|
|
||||||
|
void voice_interaction_get_status(voice_interaction_status_t *out_status);
|
||||||
|
const char *voice_interaction_dialog_state_str(voice_dialog_state_t state);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#include "esp_err.h"
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
const char *prompt;
|
|
||||||
const char *size;
|
|
||||||
bool prompt_extend;
|
|
||||||
bool has_seed;
|
|
||||||
uint32_t seed;
|
|
||||||
uint32_t generation_timeout_ms;
|
|
||||||
uint32_t download_timeout_ms;
|
|
||||||
} image_generation_request_t;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
uint8_t *png;
|
|
||||||
size_t png_len;
|
|
||||||
char image_url[1024];
|
|
||||||
char output_prompt[256];
|
|
||||||
char request_id[80];
|
|
||||||
uint16_t width;
|
|
||||||
uint16_t height;
|
|
||||||
} image_generation_result_t;
|
|
||||||
|
|
||||||
void image_generation_result_reset(image_generation_result_t *result);
|
|
||||||
void image_generation_result_free(image_generation_result_t *result);
|
|
||||||
void image_generation_schedule_prewarm(void);
|
|
||||||
|
|
||||||
esp_err_t image_generation_generate_png(const image_generation_request_t *req,
|
|
||||||
image_generation_result_t *out_result,
|
|
||||||
char *err,
|
|
||||||
size_t err_len);
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#include "esp_err.h"
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
PRINT_JOB_STATE_NONE = 0,
|
|
||||||
PRINT_JOB_STATE_QUEUED,
|
|
||||||
PRINT_JOB_STATE_RUNNING,
|
|
||||||
PRINT_JOB_STATE_SUCCESS,
|
|
||||||
PRINT_JOB_STATE_FAILED,
|
|
||||||
PRINT_JOB_STATE_CANCELED,
|
|
||||||
} print_job_state_t;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
uint32_t id;
|
|
||||||
print_job_state_t state;
|
|
||||||
uint8_t progress;
|
|
||||||
uint16_t width;
|
|
||||||
uint16_t height;
|
|
||||||
size_t data_len;
|
|
||||||
char density[16];
|
|
||||||
char error[96];
|
|
||||||
int64_t created_ms;
|
|
||||||
int64_t started_ms;
|
|
||||||
int64_t finished_ms;
|
|
||||||
} print_job_info_t;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
uint8_t major;
|
|
||||||
uint8_t minor;
|
|
||||||
uint8_t patch;
|
|
||||||
} printer_ota_version_t;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
bool connected;
|
|
||||||
bool notify_ready;
|
|
||||||
bool busy;
|
|
||||||
bool has_paper;
|
|
||||||
uint8_t battery_percent;
|
|
||||||
float temperature;
|
|
||||||
uint16_t mtu;
|
|
||||||
uint32_t queue_depth;
|
|
||||||
int64_t last_status_ms;
|
|
||||||
} printer_runtime_status_t;
|
|
||||||
|
|
||||||
typedef uint32_t printer_status_poll_pause_token_t;
|
|
||||||
|
|
||||||
esp_err_t printer_protocol_init(void);
|
|
||||||
esp_err_t printer_protocol_stop(uint32_t timeout_ms);
|
|
||||||
|
|
||||||
esp_err_t printer_protocol_connect(const char *target_name, uint32_t timeout_ms);
|
|
||||||
void printer_protocol_disconnect(void);
|
|
||||||
|
|
||||||
void printer_protocol_get_runtime_status(printer_runtime_status_t *out_status);
|
|
||||||
printer_status_poll_pause_token_t printer_protocol_status_poll_pause_acquire(void);
|
|
||||||
void printer_protocol_status_poll_pause_release(printer_status_poll_pause_token_t *token);
|
|
||||||
|
|
||||||
esp_err_t printer_protocol_submit_raster_job(const uint8_t *raster,
|
|
||||||
size_t raster_len,
|
|
||||||
uint16_t width,
|
|
||||||
uint16_t height,
|
|
||||||
const char *density,
|
|
||||||
uint32_t *out_job_id,
|
|
||||||
char *err,
|
|
||||||
size_t err_len);
|
|
||||||
|
|
||||||
bool printer_protocol_get_job(uint32_t job_id, print_job_info_t *out_info);
|
|
||||||
esp_err_t printer_protocol_list_jobs(print_job_info_t *out_jobs, size_t max_jobs, size_t *out_count);
|
|
||||||
esp_err_t printer_protocol_cancel_job(uint32_t job_id, char *err, size_t err_len);
|
|
||||||
size_t printer_protocol_cleanup_jobs(bool include_success, bool include_failed, bool include_canceled);
|
|
||||||
|
|
||||||
esp_err_t printer_protocol_gap_move(uint32_t timeout_ms, char *err, size_t err_len);
|
|
||||||
esp_err_t printer_protocol_get_label_offset(uint8_t *out_offset, uint32_t timeout_ms, char *err, size_t err_len);
|
|
||||||
esp_err_t printer_protocol_set_label_offset(uint8_t offset, uint32_t timeout_ms, char *err, size_t err_len);
|
|
||||||
|
|
||||||
esp_err_t printer_protocol_ota_jump_boot(uint32_t timeout_ms, char *err, size_t err_len);
|
|
||||||
esp_err_t printer_protocol_ota_jump_app(uint32_t timeout_ms, char *err, size_t err_len);
|
|
||||||
esp_err_t printer_protocol_ota_erase_page(uint16_t page_num, uint32_t timeout_ms, char *err, size_t err_len);
|
|
||||||
esp_err_t printer_protocol_ota_write_frame(uint16_t packet_num,
|
|
||||||
bool is_last_frame,
|
|
||||||
const uint8_t *data,
|
|
||||||
size_t data_len,
|
|
||||||
uint32_t timeout_ms,
|
|
||||||
char *err,
|
|
||||||
size_t err_len);
|
|
||||||
esp_err_t printer_protocol_ota_get_version(printer_ota_version_t *out_version,
|
|
||||||
uint32_t timeout_ms,
|
|
||||||
char *err,
|
|
||||||
size_t err_len);
|
|
||||||
|
|
||||||
const char *printer_protocol_job_state_str(print_job_state_t state);
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#include "esp_err.h"
|
|
||||||
|
|
||||||
esp_err_t raster_tools_render_text_384(const char *text,
|
|
||||||
uint8_t scale,
|
|
||||||
uint8_t line_spacing,
|
|
||||||
uint16_t max_height,
|
|
||||||
uint16_t *out_width,
|
|
||||||
uint16_t *out_height,
|
|
||||||
uint8_t **out_raster,
|
|
||||||
size_t *out_len,
|
|
||||||
char *err,
|
|
||||||
size_t err_len);
|
|
||||||
|
|
||||||
esp_err_t raster_tools_convert_gray8_to_raster_384(const uint8_t *gray,
|
|
||||||
uint16_t src_width,
|
|
||||||
uint16_t src_height,
|
|
||||||
bool scale_to_width,
|
|
||||||
uint8_t threshold,
|
|
||||||
bool invert,
|
|
||||||
uint16_t max_height,
|
|
||||||
uint16_t *out_width,
|
|
||||||
uint16_t *out_height,
|
|
||||||
uint8_t **out_raster,
|
|
||||||
size_t *out_len,
|
|
||||||
char *err,
|
|
||||||
size_t err_len);
|
|
||||||
|
|
||||||
esp_err_t raster_tools_convert_png_to_raster_384(const uint8_t *png,
|
|
||||||
size_t png_len,
|
|
||||||
bool scale_to_width,
|
|
||||||
uint8_t threshold,
|
|
||||||
bool invert,
|
|
||||||
uint16_t max_height,
|
|
||||||
uint16_t *out_width,
|
|
||||||
uint16_t *out_height,
|
|
||||||
uint8_t **out_raster,
|
|
||||||
size_t *out_len,
|
|
||||||
char *err,
|
|
||||||
size_t err_len);
|
|
||||||
|
|
||||||
esp_err_t raster_tools_render_qr_384(const char *text,
|
|
||||||
uint8_t module_scale,
|
|
||||||
uint8_t margin_modules,
|
|
||||||
uint8_t ecc_level,
|
|
||||||
uint16_t max_height,
|
|
||||||
uint16_t *out_width,
|
|
||||||
uint16_t *out_height,
|
|
||||||
uint8_t **out_raster,
|
|
||||||
size_t *out_len,
|
|
||||||
char *err,
|
|
||||||
size_t err_len);
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#include "esp_err.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
RUNTIME_DIAG_COUNTER_LIFECYCLE_START_ATTEMPT = 0,
|
|
||||||
RUNTIME_DIAG_COUNTER_LIFECYCLE_START_SUCCESS,
|
|
||||||
RUNTIME_DIAG_COUNTER_LIFECYCLE_START_FAILED,
|
|
||||||
RUNTIME_DIAG_COUNTER_LIFECYCLE_START_RETRY,
|
|
||||||
RUNTIME_DIAG_COUNTER_LIFECYCLE_STOP_ATTEMPT,
|
|
||||||
RUNTIME_DIAG_COUNTER_LIFECYCLE_STOP_SUCCESS,
|
|
||||||
RUNTIME_DIAG_COUNTER_LIFECYCLE_STOP_FAILED,
|
|
||||||
RUNTIME_DIAG_COUNTER_WIFI_CONNECT_SUCCESS,
|
|
||||||
RUNTIME_DIAG_COUNTER_WIFI_CONNECT_FAILED,
|
|
||||||
RUNTIME_DIAG_COUNTER_WIFI_CONNECT_TIMEOUT,
|
|
||||||
RUNTIME_DIAG_COUNTER_PRINTER_JOB_SUBMITTED,
|
|
||||||
RUNTIME_DIAG_COUNTER_PRINTER_JOB_SUCCESS,
|
|
||||||
RUNTIME_DIAG_COUNTER_PRINTER_JOB_FAILED,
|
|
||||||
RUNTIME_DIAG_COUNTER_PRINTER_JOB_CANCELED,
|
|
||||||
RUNTIME_DIAG_COUNTER_IMAGE_GENERATE_ATTEMPT,
|
|
||||||
RUNTIME_DIAG_COUNTER_IMAGE_GENERATE_SUCCESS,
|
|
||||||
RUNTIME_DIAG_COUNTER_IMAGE_GENERATE_FAILED,
|
|
||||||
RUNTIME_DIAG_COUNTER_IMAGE_GENERATE_TIMEOUT,
|
|
||||||
RUNTIME_DIAG_COUNTER_REST_RESPONSES_TOTAL,
|
|
||||||
RUNTIME_DIAG_COUNTER_REST_ERRORS_TOTAL,
|
|
||||||
RUNTIME_DIAG_COUNTER_MAX,
|
|
||||||
} runtime_diag_counter_t;
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
RUNTIME_DIAG_GAUGE_LIFECYCLE_STATE = 0,
|
|
||||||
RUNTIME_DIAG_GAUGE_STATUS_POLL_PAUSE_DEPTH,
|
|
||||||
RUNTIME_DIAG_GAUGE_PRINTER_QUEUE_DEPTH,
|
|
||||||
RUNTIME_DIAG_GAUGE_MAX,
|
|
||||||
} runtime_diag_gauge_t;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
uint64_t counters[RUNTIME_DIAG_COUNTER_MAX];
|
|
||||||
int32_t gauges[RUNTIME_DIAG_GAUGE_MAX];
|
|
||||||
int64_t last_error_ms;
|
|
||||||
esp_err_t last_error_code;
|
|
||||||
char last_error_source[32];
|
|
||||||
char last_error_message[96];
|
|
||||||
} runtime_diag_snapshot_t;
|
|
||||||
|
|
||||||
void runtime_diag_counter_add(runtime_diag_counter_t counter, uint32_t delta);
|
|
||||||
void runtime_diag_set_gauge(runtime_diag_gauge_t gauge, int32_t value);
|
|
||||||
void runtime_diag_record_error(const char *source, esp_err_t code, const char *message);
|
|
||||||
void runtime_diag_get_snapshot(runtime_diag_snapshot_t *out_snapshot);
|
|
||||||
|
|
||||||
const char *runtime_diag_counter_name(runtime_diag_counter_t counter);
|
|
||||||
const char *runtime_diag_gauge_name(runtime_diag_gauge_t gauge);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#include "esp_err.h"
|
|
||||||
|
|
||||||
uint32_t runtime_policy_wifi_connect_timeout_ms(void);
|
|
||||||
|
|
||||||
uint32_t runtime_policy_lifecycle_start_retry_count(void);
|
|
||||||
uint32_t runtime_policy_lifecycle_retry_backoff_ms(uint32_t attempt);
|
|
||||||
bool runtime_policy_is_retryable_error(esp_err_t err);
|
|
||||||
|
|
||||||
uint32_t runtime_policy_printer_control_lock_timeout_ms(void);
|
|
||||||
uint32_t runtime_policy_printer_worker_queue_wait_ms(void);
|
|
||||||
uint32_t runtime_policy_printer_queue_retry_delay_ms(void);
|
|
||||||
uint32_t runtime_policy_printer_status_poll_interval_ms(void);
|
|
||||||
uint32_t runtime_policy_printer_stop_timeout_ms(void);
|
|
||||||
|
|
||||||
uint32_t runtime_policy_rest_printer_connect_timeout_ms(void);
|
|
||||||
uint32_t runtime_policy_rest_label_timeout_ms(void);
|
|
||||||
uint32_t runtime_policy_rest_ota_timeout_ms(void);
|
|
||||||
|
|
||||||
uint32_t runtime_policy_image_generation_timeout_default_ms(void);
|
|
||||||
uint32_t runtime_policy_image_generation_timeout_min_ms(void);
|
|
||||||
uint32_t runtime_policy_image_generation_timeout_max_ms(void);
|
|
||||||
|
|
||||||
uint32_t runtime_policy_image_download_timeout_default_ms(void);
|
|
||||||
uint32_t runtime_policy_image_download_timeout_min_ms(void);
|
|
||||||
uint32_t runtime_policy_image_download_timeout_max_ms(void);
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
|
|
||||||
#include "esp_err.h"
|
|
||||||
|
|
||||||
esp_err_t system_runtime_start(void);
|
|
||||||
esp_err_t system_runtime_shutdown(void);
|
|
||||||
esp_err_t system_runtime_bootstrap(void);
|
|
||||||
|
|
||||||
bool system_runtime_wifi_ready(void);
|
|
||||||
void system_runtime_get_ip(char *buf, size_t buf_len);
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#include "esp_err.h"
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
VOICE_DIALOG_STATE_IDLE = 0,
|
|
||||||
VOICE_DIALOG_STATE_LISTENING,
|
|
||||||
VOICE_DIALOG_STATE_THINKING,
|
|
||||||
VOICE_DIALOG_STATE_RESPONDING,
|
|
||||||
} voice_dialog_state_t;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
bool ready;
|
|
||||||
bool session_active;
|
|
||||||
bool ws_connected;
|
|
||||||
bool started;
|
|
||||||
bool tap_active;
|
|
||||||
voice_dialog_state_t dialog_state;
|
|
||||||
char task_id[40];
|
|
||||||
char dialog_id[40];
|
|
||||||
char last_error[128];
|
|
||||||
int64_t last_event_ms;
|
|
||||||
uint32_t upstream_packets;
|
|
||||||
uint32_t downstream_packets;
|
|
||||||
} voice_interaction_status_t;
|
|
||||||
|
|
||||||
esp_err_t voice_interaction_init(void);
|
|
||||||
esp_err_t voice_interaction_start(char *err, size_t err_len);
|
|
||||||
esp_err_t voice_interaction_stop(char *err, size_t err_len);
|
|
||||||
|
|
||||||
esp_err_t voice_interaction_tap_start(char *err, size_t err_len);
|
|
||||||
esp_err_t voice_interaction_tap_cancel(char *err, size_t err_len);
|
|
||||||
|
|
||||||
void voice_interaction_get_status(voice_interaction_status_t *out_status);
|
|
||||||
const char *voice_interaction_dialog_state_str(voice_dialog_state_t state);
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "printer_protocol.h"
|
#include "domain.h"
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/event_groups.h"
|
#include "freertos/event_groups.h"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/semphr.h"
|
#include "freertos/semphr.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
#include "voice_interaction.h"
|
#include "domain.h"
|
||||||
|
|
||||||
#define VOICE_STREAMING_MODE "duplex"
|
#define VOICE_STREAMING_MODE "duplex"
|
||||||
#define VOICE_TASK_GROUP "aigc"
|
#define VOICE_TASK_GROUP "aigc"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "image_generation.h"
|
#include "domain.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -11,8 +11,6 @@
|
|||||||
#include "esp_http_client.h"
|
#include "esp_http_client.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "esp_timer.h"
|
#include "esp_timer.h"
|
||||||
#include "runtime_diagnostics.h"
|
|
||||||
#include "runtime_policy.h"
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/semphr.h"
|
#include "freertos/semphr.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
#include "printer_protocol.h"
|
#include "domain.h"
|
||||||
#include "printer_protocol_internal.h"
|
#include "printer_protocol_internal.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "ble_printer_client.h"
|
|
||||||
#include "esp_heap_caps.h"
|
#include "esp_heap_caps.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "esp_timer.h"
|
#include "esp_timer.h"
|
||||||
#include "runtime_diagnostics.h"
|
|
||||||
#include "runtime_policy.h"
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
#include "printer_protocol.h"
|
#include "domain.h"
|
||||||
#include "printer_protocol_internal.h"
|
#include "printer_protocol_internal.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "ble_printer_client.h"
|
|
||||||
#include "runtime_policy.h"
|
|
||||||
|
|
||||||
esp_err_t printer_protocol_gap_move(uint32_t timeout_ms, char *err, size_t err_len) {
|
esp_err_t printer_protocol_gap_move(uint32_t timeout_ms, char *err, size_t err_len) {
|
||||||
if (!ble_printer_client_is_connected()) {
|
if (!ble_printer_client_is_connected()) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "printer_protocol.h"
|
#include "domain.h"
|
||||||
#include "printer_protocol_internal.h"
|
#include "printer_protocol_internal.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -7,8 +7,6 @@
|
|||||||
|
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "esp_timer.h"
|
#include "esp_timer.h"
|
||||||
#include "runtime_diagnostics.h"
|
|
||||||
#include "runtime_policy.h"
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
#include "printer_protocol.h"
|
#include "domain.h"
|
||||||
#include "printer_protocol_internal.h"
|
#include "printer_protocol_internal.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "ble_printer_client.h"
|
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "esp_timer.h"
|
#include "esp_timer.h"
|
||||||
#include "runtime_diagnostics.h"
|
|
||||||
#include "runtime_policy.h"
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "raster_tools.h"
|
#include "domain.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "raster_tools.h"
|
#include "domain.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
@@ -1,15 +1,6 @@
|
|||||||
#include "system_runtime.h"
|
#include "domain.h"
|
||||||
|
|
||||||
#include "platform_bootstrap.h"
|
|
||||||
#include "wifi_manager.h"
|
|
||||||
|
|
||||||
static bool s_runtime_started;
|
|
||||||
|
|
||||||
esp_err_t system_runtime_start(void) {
|
esp_err_t system_runtime_start(void) {
|
||||||
if (s_runtime_started) {
|
|
||||||
return ESP_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
esp_err_t err = platform_bootstrap_init();
|
esp_err_t err = platform_bootstrap_init();
|
||||||
if (err != ESP_OK) {
|
if (err != ESP_OK) {
|
||||||
return err;
|
return err;
|
||||||
@@ -17,21 +8,16 @@ esp_err_t system_runtime_start(void) {
|
|||||||
|
|
||||||
err = wifi_manager_start();
|
err = wifi_manager_start();
|
||||||
if (err != ESP_OK) {
|
if (err != ESP_OK) {
|
||||||
|
// Reset platform state so lifecycle retry runs from a clean baseline.
|
||||||
|
(void)wifi_manager_stop();
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
s_runtime_started = true;
|
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_err_t system_runtime_shutdown(void) {
|
esp_err_t system_runtime_shutdown(void) {
|
||||||
if (!s_runtime_started) {
|
return wifi_manager_stop();
|
||||||
return ESP_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
esp_err_t err = wifi_manager_stop();
|
|
||||||
s_runtime_started = false;
|
|
||||||
return err;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_err_t system_runtime_bootstrap(void) {
|
esp_err_t system_runtime_bootstrap(void) {
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
#include "esp_crt_bundle.h"
|
#include "esp_crt_bundle.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "voice_audio.h"
|
|
||||||
|
|
||||||
static const char *TAG = "voice_interaction";
|
static const char *TAG = "voice_interaction";
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
#include "esp_timer.h"
|
#include "esp_timer.h"
|
||||||
#include "freertos/idf_additions.h"
|
#include "freertos/idf_additions.h"
|
||||||
#include "voice_audio.h"
|
|
||||||
|
|
||||||
static const char *TAG = "voice_interaction";
|
static const char *TAG = "voice_interaction";
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "image_generation.h"
|
#include "domain.h"
|
||||||
#include "printer_protocol.h"
|
|
||||||
#include "raster_tools.h"
|
|
||||||
|
|
||||||
static const char *TAG = "voice_interaction";
|
static const char *TAG = "voice_interaction";
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
#include "esp_audio_enc.h"
|
#include "esp_audio_enc.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "voice_audio.h"
|
|
||||||
|
|
||||||
static const char *TAG = "voice_interaction";
|
static const char *TAG = "voice_interaction";
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "esp_audio_dec.h"
|
#include "esp_audio_dec.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "voice_audio.h"
|
|
||||||
|
|
||||||
static const char *TAG = "voice_interaction";
|
static const char *TAG = "voice_interaction";
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#include "esp_err.h"
|
|
||||||
|
|
||||||
typedef void (*ble_frame_rx_cb_t)(const uint8_t *data, size_t len);
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
bool connected;
|
|
||||||
bool notify_ready;
|
|
||||||
uint16_t mtu;
|
|
||||||
} ble_link_state_t;
|
|
||||||
|
|
||||||
esp_err_t ble_printer_client_init(ble_frame_rx_cb_t rx_cb);
|
|
||||||
|
|
||||||
esp_err_t ble_printer_client_connect(const char *target_name, uint32_t timeout_ms);
|
|
||||||
void ble_printer_client_disconnect(void);
|
|
||||||
|
|
||||||
bool ble_printer_client_is_connected(void);
|
|
||||||
void ble_printer_client_get_link_state(ble_link_state_t *out_state);
|
|
||||||
|
|
||||||
esp_err_t ble_printer_client_write(const uint8_t *data, size_t len);
|
|
||||||
141
components/platform/include/platform.h
Normal file
141
components/platform/include/platform.h
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "esp_err.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ---------- platform_bootstrap ----------
|
||||||
|
esp_err_t platform_bootstrap_init(void);
|
||||||
|
|
||||||
|
// ---------- wifi_manager ----------
|
||||||
|
esp_err_t wifi_manager_start(void);
|
||||||
|
esp_err_t wifi_manager_stop(void);
|
||||||
|
|
||||||
|
bool wifi_manager_is_ready(void);
|
||||||
|
void wifi_manager_get_ip(char *buf, size_t buf_len);
|
||||||
|
|
||||||
|
// ---------- ble_printer_client ----------
|
||||||
|
typedef void (*ble_frame_rx_cb_t)(const uint8_t *data, size_t len);
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
bool connected;
|
||||||
|
bool notify_ready;
|
||||||
|
uint16_t mtu;
|
||||||
|
} ble_link_state_t;
|
||||||
|
|
||||||
|
esp_err_t ble_printer_client_init(ble_frame_rx_cb_t rx_cb);
|
||||||
|
esp_err_t ble_printer_client_connect(const char *target_name, uint32_t timeout_ms);
|
||||||
|
void ble_printer_client_disconnect(void);
|
||||||
|
|
||||||
|
bool ble_printer_client_is_connected(void);
|
||||||
|
void ble_printer_client_get_link_state(ble_link_state_t *out_state);
|
||||||
|
esp_err_t ble_printer_client_write(const uint8_t *data, size_t len);
|
||||||
|
|
||||||
|
// ---------- voice_audio ----------
|
||||||
|
typedef struct {
|
||||||
|
uint32_t sample_rate;
|
||||||
|
uint8_t channels;
|
||||||
|
uint8_t bits_per_sample;
|
||||||
|
int output_volume;
|
||||||
|
float input_gain_db;
|
||||||
|
} voice_audio_open_config_t;
|
||||||
|
|
||||||
|
esp_err_t voice_audio_open(const voice_audio_open_config_t *cfg, char *err, size_t err_len);
|
||||||
|
void voice_audio_close(void);
|
||||||
|
|
||||||
|
bool voice_audio_is_open(void);
|
||||||
|
|
||||||
|
esp_err_t voice_audio_read_pcm(int16_t *pcm,
|
||||||
|
size_t samples,
|
||||||
|
uint32_t timeout_ms,
|
||||||
|
char *err,
|
||||||
|
size_t err_len);
|
||||||
|
esp_err_t voice_audio_write_pcm(const int16_t *pcm,
|
||||||
|
size_t samples,
|
||||||
|
uint32_t timeout_ms,
|
||||||
|
char *err,
|
||||||
|
size_t err_len);
|
||||||
|
|
||||||
|
// ---------- runtime_policy ----------
|
||||||
|
uint32_t runtime_policy_wifi_connect_timeout_ms(void);
|
||||||
|
|
||||||
|
uint32_t runtime_policy_lifecycle_start_retry_count(void);
|
||||||
|
uint32_t runtime_policy_lifecycle_retry_backoff_ms(uint32_t attempt);
|
||||||
|
bool runtime_policy_is_retryable_error(esp_err_t err);
|
||||||
|
|
||||||
|
uint32_t runtime_policy_printer_control_lock_timeout_ms(void);
|
||||||
|
uint32_t runtime_policy_printer_worker_queue_wait_ms(void);
|
||||||
|
uint32_t runtime_policy_printer_queue_retry_delay_ms(void);
|
||||||
|
uint32_t runtime_policy_printer_status_poll_interval_ms(void);
|
||||||
|
uint32_t runtime_policy_printer_stop_timeout_ms(void);
|
||||||
|
|
||||||
|
uint32_t runtime_policy_rest_printer_connect_timeout_ms(void);
|
||||||
|
uint32_t runtime_policy_rest_label_timeout_ms(void);
|
||||||
|
uint32_t runtime_policy_rest_ota_timeout_ms(void);
|
||||||
|
|
||||||
|
uint32_t runtime_policy_image_generation_timeout_default_ms(void);
|
||||||
|
uint32_t runtime_policy_image_generation_timeout_min_ms(void);
|
||||||
|
uint32_t runtime_policy_image_generation_timeout_max_ms(void);
|
||||||
|
|
||||||
|
uint32_t runtime_policy_image_download_timeout_default_ms(void);
|
||||||
|
uint32_t runtime_policy_image_download_timeout_min_ms(void);
|
||||||
|
uint32_t runtime_policy_image_download_timeout_max_ms(void);
|
||||||
|
|
||||||
|
// ---------- runtime_diagnostics ----------
|
||||||
|
typedef enum {
|
||||||
|
RUNTIME_DIAG_COUNTER_LIFECYCLE_START_ATTEMPT = 0,
|
||||||
|
RUNTIME_DIAG_COUNTER_LIFECYCLE_START_SUCCESS,
|
||||||
|
RUNTIME_DIAG_COUNTER_LIFECYCLE_START_FAILED,
|
||||||
|
RUNTIME_DIAG_COUNTER_LIFECYCLE_START_RETRY,
|
||||||
|
RUNTIME_DIAG_COUNTER_LIFECYCLE_STOP_ATTEMPT,
|
||||||
|
RUNTIME_DIAG_COUNTER_LIFECYCLE_STOP_SUCCESS,
|
||||||
|
RUNTIME_DIAG_COUNTER_LIFECYCLE_STOP_FAILED,
|
||||||
|
RUNTIME_DIAG_COUNTER_WIFI_CONNECT_SUCCESS,
|
||||||
|
RUNTIME_DIAG_COUNTER_WIFI_CONNECT_FAILED,
|
||||||
|
RUNTIME_DIAG_COUNTER_WIFI_CONNECT_TIMEOUT,
|
||||||
|
RUNTIME_DIAG_COUNTER_PRINTER_JOB_SUBMITTED,
|
||||||
|
RUNTIME_DIAG_COUNTER_PRINTER_JOB_SUCCESS,
|
||||||
|
RUNTIME_DIAG_COUNTER_PRINTER_JOB_FAILED,
|
||||||
|
RUNTIME_DIAG_COUNTER_PRINTER_JOB_CANCELED,
|
||||||
|
RUNTIME_DIAG_COUNTER_IMAGE_GENERATE_ATTEMPT,
|
||||||
|
RUNTIME_DIAG_COUNTER_IMAGE_GENERATE_SUCCESS,
|
||||||
|
RUNTIME_DIAG_COUNTER_IMAGE_GENERATE_FAILED,
|
||||||
|
RUNTIME_DIAG_COUNTER_IMAGE_GENERATE_TIMEOUT,
|
||||||
|
RUNTIME_DIAG_COUNTER_REST_RESPONSES_TOTAL,
|
||||||
|
RUNTIME_DIAG_COUNTER_REST_ERRORS_TOTAL,
|
||||||
|
RUNTIME_DIAG_COUNTER_MAX,
|
||||||
|
} runtime_diag_counter_t;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
RUNTIME_DIAG_GAUGE_LIFECYCLE_STATE = 0,
|
||||||
|
RUNTIME_DIAG_GAUGE_STATUS_POLL_PAUSE_DEPTH,
|
||||||
|
RUNTIME_DIAG_GAUGE_PRINTER_QUEUE_DEPTH,
|
||||||
|
RUNTIME_DIAG_GAUGE_MAX,
|
||||||
|
} runtime_diag_gauge_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint64_t counters[RUNTIME_DIAG_COUNTER_MAX];
|
||||||
|
int32_t gauges[RUNTIME_DIAG_GAUGE_MAX];
|
||||||
|
int64_t last_error_ms;
|
||||||
|
esp_err_t last_error_code;
|
||||||
|
char last_error_source[32];
|
||||||
|
char last_error_message[96];
|
||||||
|
} runtime_diag_snapshot_t;
|
||||||
|
|
||||||
|
void runtime_diag_counter_add(runtime_diag_counter_t counter, uint32_t delta);
|
||||||
|
void runtime_diag_set_gauge(runtime_diag_gauge_t gauge, int32_t value);
|
||||||
|
void runtime_diag_record_error(const char *source, esp_err_t code, const char *message);
|
||||||
|
void runtime_diag_get_snapshot(runtime_diag_snapshot_t *out_snapshot);
|
||||||
|
|
||||||
|
const char *runtime_diag_counter_name(runtime_diag_counter_t counter);
|
||||||
|
const char *runtime_diag_gauge_name(runtime_diag_gauge_t gauge);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "esp_err.h"
|
|
||||||
|
|
||||||
esp_err_t platform_bootstrap_init(void);
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#include "esp_err.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
RUNTIME_DIAG_COUNTER_LIFECYCLE_START_ATTEMPT = 0,
|
|
||||||
RUNTIME_DIAG_COUNTER_LIFECYCLE_START_SUCCESS,
|
|
||||||
RUNTIME_DIAG_COUNTER_LIFECYCLE_START_FAILED,
|
|
||||||
RUNTIME_DIAG_COUNTER_LIFECYCLE_START_RETRY,
|
|
||||||
RUNTIME_DIAG_COUNTER_LIFECYCLE_STOP_ATTEMPT,
|
|
||||||
RUNTIME_DIAG_COUNTER_LIFECYCLE_STOP_SUCCESS,
|
|
||||||
RUNTIME_DIAG_COUNTER_LIFECYCLE_STOP_FAILED,
|
|
||||||
RUNTIME_DIAG_COUNTER_WIFI_CONNECT_SUCCESS,
|
|
||||||
RUNTIME_DIAG_COUNTER_WIFI_CONNECT_FAILED,
|
|
||||||
RUNTIME_DIAG_COUNTER_WIFI_CONNECT_TIMEOUT,
|
|
||||||
RUNTIME_DIAG_COUNTER_PRINTER_JOB_SUBMITTED,
|
|
||||||
RUNTIME_DIAG_COUNTER_PRINTER_JOB_SUCCESS,
|
|
||||||
RUNTIME_DIAG_COUNTER_PRINTER_JOB_FAILED,
|
|
||||||
RUNTIME_DIAG_COUNTER_PRINTER_JOB_CANCELED,
|
|
||||||
RUNTIME_DIAG_COUNTER_IMAGE_GENERATE_ATTEMPT,
|
|
||||||
RUNTIME_DIAG_COUNTER_IMAGE_GENERATE_SUCCESS,
|
|
||||||
RUNTIME_DIAG_COUNTER_IMAGE_GENERATE_FAILED,
|
|
||||||
RUNTIME_DIAG_COUNTER_IMAGE_GENERATE_TIMEOUT,
|
|
||||||
RUNTIME_DIAG_COUNTER_REST_RESPONSES_TOTAL,
|
|
||||||
RUNTIME_DIAG_COUNTER_REST_ERRORS_TOTAL,
|
|
||||||
RUNTIME_DIAG_COUNTER_MAX,
|
|
||||||
} runtime_diag_counter_t;
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
RUNTIME_DIAG_GAUGE_LIFECYCLE_STATE = 0,
|
|
||||||
RUNTIME_DIAG_GAUGE_STATUS_POLL_PAUSE_DEPTH,
|
|
||||||
RUNTIME_DIAG_GAUGE_PRINTER_QUEUE_DEPTH,
|
|
||||||
RUNTIME_DIAG_GAUGE_MAX,
|
|
||||||
} runtime_diag_gauge_t;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
uint64_t counters[RUNTIME_DIAG_COUNTER_MAX];
|
|
||||||
int32_t gauges[RUNTIME_DIAG_GAUGE_MAX];
|
|
||||||
int64_t last_error_ms;
|
|
||||||
esp_err_t last_error_code;
|
|
||||||
char last_error_source[32];
|
|
||||||
char last_error_message[96];
|
|
||||||
} runtime_diag_snapshot_t;
|
|
||||||
|
|
||||||
void runtime_diag_counter_add(runtime_diag_counter_t counter, uint32_t delta);
|
|
||||||
void runtime_diag_set_gauge(runtime_diag_gauge_t gauge, int32_t value);
|
|
||||||
void runtime_diag_record_error(const char *source, esp_err_t code, const char *message);
|
|
||||||
void runtime_diag_get_snapshot(runtime_diag_snapshot_t *out_snapshot);
|
|
||||||
|
|
||||||
const char *runtime_diag_counter_name(runtime_diag_counter_t counter);
|
|
||||||
const char *runtime_diag_gauge_name(runtime_diag_gauge_t gauge);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#include "esp_err.h"
|
|
||||||
|
|
||||||
uint32_t runtime_policy_wifi_connect_timeout_ms(void);
|
|
||||||
|
|
||||||
uint32_t runtime_policy_lifecycle_start_retry_count(void);
|
|
||||||
uint32_t runtime_policy_lifecycle_retry_backoff_ms(uint32_t attempt);
|
|
||||||
bool runtime_policy_is_retryable_error(esp_err_t err);
|
|
||||||
|
|
||||||
uint32_t runtime_policy_printer_control_lock_timeout_ms(void);
|
|
||||||
uint32_t runtime_policy_printer_worker_queue_wait_ms(void);
|
|
||||||
uint32_t runtime_policy_printer_queue_retry_delay_ms(void);
|
|
||||||
uint32_t runtime_policy_printer_status_poll_interval_ms(void);
|
|
||||||
uint32_t runtime_policy_printer_stop_timeout_ms(void);
|
|
||||||
|
|
||||||
uint32_t runtime_policy_rest_printer_connect_timeout_ms(void);
|
|
||||||
uint32_t runtime_policy_rest_label_timeout_ms(void);
|
|
||||||
uint32_t runtime_policy_rest_ota_timeout_ms(void);
|
|
||||||
|
|
||||||
uint32_t runtime_policy_image_generation_timeout_default_ms(void);
|
|
||||||
uint32_t runtime_policy_image_generation_timeout_min_ms(void);
|
|
||||||
uint32_t runtime_policy_image_generation_timeout_max_ms(void);
|
|
||||||
|
|
||||||
uint32_t runtime_policy_image_download_timeout_default_ms(void);
|
|
||||||
uint32_t runtime_policy_image_download_timeout_min_ms(void);
|
|
||||||
uint32_t runtime_policy_image_download_timeout_max_ms(void);
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#include "esp_err.h"
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
uint32_t sample_rate;
|
|
||||||
uint8_t channels;
|
|
||||||
uint8_t bits_per_sample;
|
|
||||||
int output_volume;
|
|
||||||
float input_gain_db;
|
|
||||||
} voice_audio_open_config_t;
|
|
||||||
|
|
||||||
esp_err_t voice_audio_open(const voice_audio_open_config_t *cfg, char *err, size_t err_len);
|
|
||||||
void voice_audio_close(void);
|
|
||||||
|
|
||||||
bool voice_audio_is_open(void);
|
|
||||||
|
|
||||||
esp_err_t voice_audio_read_pcm(int16_t *pcm,
|
|
||||||
size_t samples,
|
|
||||||
uint32_t timeout_ms,
|
|
||||||
char *err,
|
|
||||||
size_t err_len);
|
|
||||||
esp_err_t voice_audio_write_pcm(const int16_t *pcm,
|
|
||||||
size_t samples,
|
|
||||||
uint32_t timeout_ms,
|
|
||||||
char *err,
|
|
||||||
size_t err_len);
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include "esp_err.h"
|
|
||||||
|
|
||||||
esp_err_t wifi_manager_start(void);
|
|
||||||
esp_err_t wifi_manager_stop(void);
|
|
||||||
|
|
||||||
bool wifi_manager_is_ready(void);
|
|
||||||
|
|
||||||
void wifi_manager_get_ip(char *buf, size_t buf_len);
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "ble_printer_client.h"
|
#include "platform.h"
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "platform_bootstrap.h"
|
#include "platform.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "runtime_diagnostics.h"
|
#include "platform.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "runtime_policy.h"
|
#include "platform.h"
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "voice_audio.h"
|
#include "platform.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "wifi_manager.h"
|
#include "platform.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -8,8 +8,6 @@
|
|||||||
#include "esp_netif.h"
|
#include "esp_netif.h"
|
||||||
#include "esp_wifi.h"
|
#include "esp_wifi.h"
|
||||||
#include "esp_wifi_default.h"
|
#include "esp_wifi_default.h"
|
||||||
#include "runtime_diagnostics.h"
|
|
||||||
#include "runtime_policy.h"
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/event_groups.h"
|
#include "freertos/event_groups.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,4 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
espressif/cmake_utilities:
|
|
||||||
component_hash: 351350613ceafba240b761b4ea991e0f231ac7a9f59a9ee901f751bddc0bb18f
|
|
||||||
dependencies:
|
|
||||||
- name: idf
|
|
||||||
require: private
|
|
||||||
version: '>=4.1'
|
|
||||||
source:
|
|
||||||
registry_url: https://components.espressif.com
|
|
||||||
type: service
|
|
||||||
version: 0.5.3
|
|
||||||
espressif/esp_audio_codec:
|
espressif/esp_audio_codec:
|
||||||
component_hash: af4663830bc73eca58febcc34a976d003465e78ed57458aa00a14b231e392ca1
|
component_hash: af4663830bc73eca58febcc34a976d003465e78ed57458aa00a14b231e392ca1
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -29,20 +19,6 @@ dependencies:
|
|||||||
registry_url: https://components.espressif.com/
|
registry_url: https://components.espressif.com/
|
||||||
type: service
|
type: service
|
||||||
version: 1.5.4
|
version: 1.5.4
|
||||||
espressif/esp_lcd_gc9a01:
|
|
||||||
component_hash: e60bc2b5649c7679bd010797a875ae64b2a57cf9cdbd6a2bf7a0ade66913edc0
|
|
||||||
dependencies:
|
|
||||||
- name: espressif/cmake_utilities
|
|
||||||
registry_url: https://components.espressif.com
|
|
||||||
require: private
|
|
||||||
version: 0.*
|
|
||||||
- name: idf
|
|
||||||
require: private
|
|
||||||
version: '>=4.4'
|
|
||||||
source:
|
|
||||||
registry_url: https://components.espressif.com/
|
|
||||||
type: service
|
|
||||||
version: 2.0.4
|
|
||||||
espressif/esp_websocket_client:
|
espressif/esp_websocket_client:
|
||||||
component_hash: c5a067a9fddea370c478017e66fac302f4b79c3d4027e9bdd42a019786cceb92
|
component_hash: c5a067a9fddea370c478017e66fac302f4b79c3d4027e9bdd42a019786cceb92
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -84,10 +60,9 @@ dependencies:
|
|||||||
direct_dependencies:
|
direct_dependencies:
|
||||||
- espressif/esp_audio_codec
|
- espressif/esp_audio_codec
|
||||||
- espressif/esp_codec_dev
|
- espressif/esp_codec_dev
|
||||||
- espressif/esp_lcd_gc9a01
|
|
||||||
- espressif/esp_websocket_client
|
- espressif/esp_websocket_client
|
||||||
- espressif/libpng
|
- espressif/libpng
|
||||||
- idf
|
- idf
|
||||||
manifest_hash: ee0dd489986ab012202f5537ca2249a0c4e3ca234a23194dddb81cc25075b54c
|
manifest_hash: 3274b53ce89a58abbad0a03dfaff3410e35deb81305a21289606c4d2177a111b
|
||||||
target: esp32s3
|
target: esp32s3
|
||||||
version: 2.0.0
|
version: 2.0.0
|
||||||
|
|||||||
@@ -18,4 +18,3 @@ dependencies:
|
|||||||
espressif/esp_codec_dev: ^1.5.4
|
espressif/esp_codec_dev: ^1.5.4
|
||||||
espressif/esp_audio_codec: ^2.4.1
|
espressif/esp_audio_codec: ^2.4.1
|
||||||
espressif/libpng: ^1.6.55
|
espressif/libpng: ^1.6.55
|
||||||
espressif/esp_lcd_gc9a01: ^2.0.4
|
|
||||||
|
|||||||
Reference in New Issue
Block a user