mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
feat(esp_psram): Add some helper APIs to get usable PSRAM memory size
This commit is contained in:
@@ -71,6 +71,17 @@ void esp_psram_bss_init(void);
|
||||
*/
|
||||
esp_err_t esp_psram_chip_init(void);
|
||||
|
||||
/**
|
||||
* @brief Calculates the effective PSRAM memory that would be / is added into the heap.
|
||||
*
|
||||
* @return The size of PSRAM memory that would be / is added into the heap in bytes, or 0 if PSRAM hardware isn't successfully initialized
|
||||
* @note The function pre-calculates the effective size of the PSRAM memory that would be added into the heap after performing the XIP or
|
||||
* ext bss and ext noinit considerations, thus, even if the function is called before esp_psram_init(), it will return the final
|
||||
* effective size of the PSRAM memory that would have been added into the heap after esp_psram_init() is performed
|
||||
* instead of the vanilla size of the PSRAM memory.
|
||||
*/
|
||||
size_t esp_psram_get_heap_size_to_protect(void);
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
/**
|
||||
* @brief Force a writeback of the data in the PSRAM cache. This is to be called whenever
|
||||
|
Reference in New Issue
Block a user