refactor(structure): move layered firmware modules from main to components
This commit is contained in:
36
components/domain/include/image_generation.h
Normal file
36
components/domain/include/image_generation.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#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);
|
||||
Reference in New Issue
Block a user