mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-07 12:06:58 +03:00
* Add lock for shared PSRAM memory, use it for the relevant round steps and the Alignment Mark Task * only allow taking a new image for the Alignment Mark while round got completed * show success/denial of Alignment Mark Update Request * . --------- Co-authored-by: CaCO3 <caco@ruinelli.ch>
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#pragma once
|
|
#ifndef PSRAM_h
|
|
#define PSRAM_h
|
|
|
|
#include "esp_heap_caps.h"
|
|
|
|
|
|
bool reserve_psram_shared_region(void);
|
|
|
|
|
|
/* Memory used in Take Image Step */
|
|
bool psram_init_shared_memory_for_take_image_step(void);
|
|
void psram_deinit_shared_memory_for_take_image_step(void);
|
|
void *psram_reserve_shared_stbi_memory(size_t size);
|
|
void *psram_reallocate_shared_stbi_memory(void *ptr, size_t newsize);
|
|
void psram_free_shared_stbi_memory(void *p);
|
|
|
|
|
|
/* Memory used in Aligning Step */
|
|
void *psram_reserve_shared_tmp_image_memory(void);
|
|
void psram_free_shared_temp_image_memory(void);
|
|
|
|
/* Memory used in Digitalization Steps */
|
|
void *psram_get_shared_tensor_arena_memory(void);
|
|
void *psram_get_shared_model_memory(void);
|
|
void psram_free_shared_tensor_arena_and_model_memory(void);
|
|
|
|
/* General */
|
|
void *malloc_psram_heap(std::string name, size_t size, uint32_t caps);
|
|
void *realloc_psram_heap(std::string name, void *ptr, size_t size, uint32_t caps);
|
|
void *calloc_psram_heap(std::string name, size_t n, size_t size, uint32_t caps);
|
|
|
|
void free_psram_heap(std::string name, void *ptr);
|
|
|
|
#endif // PSRAM_h
|