refactor(jpeg): move sleep retention config into driver layer

Move per-target JPEG regdma retention descriptors out of esp_hal_jpeg
and into
esp_driver_jpeg so the codec driver owns its backup scope and restore
flow.
This commit is contained in:
morris
2026-07-07 19:03:05 +08:00
parent 05250d7dd1
commit 47f4e5d412
8 changed files with 97 additions and 57 deletions
+14
View File
@@ -19,6 +19,10 @@
#include "esp_intr_types.h"
#include "esp_pm.h"
#include "sdkconfig.h"
#if SOC_PAU_SUPPORTED
#include "soc/regdma.h"
#include "soc/retention_periph_defs.h"
#endif
#ifdef __cplusplus
extern "C" {
@@ -72,6 +76,16 @@ struct jpeg_codec_t {
bool retention_link_created; // mark if the retention link is created.
};
#if SOC_PAU_SUPPORTED
typedef struct {
const regdma_entries_config_t *entry_array;
uint32_t array_size;
periph_retention_module_t module_id;
} jpeg_reg_retention_info_t;
extern const jpeg_reg_retention_info_t jpeg_reg_retention_info;
#endif
typedef enum {
JPEG_DEC_DIRECT_OUTPUT_HB = 0, /*!< Direct output */
JPEG_DEC_YUV444_HB = 1, /*!< output YUV444 format */