feat(platform): migrate LCD assets to PNG and expand flash partitions

This commit is contained in:
chenjintao
2026-08-10 16:04:23 +08:00
parent 42187ba21d
commit d9660164a6
105 changed files with 10103 additions and 527 deletions
@@ -0,0 +1,32 @@
#include <stddef.h>
#include <stdlib.h>
#include "esp_heap_caps.h"
#include "soc/soc_caps.h"
void *lodepng_malloc(size_t size)
{
#if SOC_SPIRAM_SUPPORTED
void *ptr = heap_caps_malloc(size, MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT);
if (ptr != NULL) {
return ptr;
}
#endif
return malloc(size);
}
void *lodepng_realloc(void *ptr, size_t new_size)
{
#if SOC_SPIRAM_SUPPORTED
void *new_ptr = heap_caps_realloc(ptr, new_size, MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT);
if (new_ptr != NULL) {
return new_ptr;
}
#endif
return realloc(ptr, new_size);
}
void lodepng_free(void *ptr)
{
free(ptr);
}