Skip to content

Commit e3532f0

Browse files
Marek Matejsylvioalves
authored andcommitted
zephyr: port: esp_heap_adapter fix
Fix build issues on ESP32-S2,C6 platforms introduced by included file. Signed-off-by: Marek Matej <[email protected]>
1 parent 3400dc9 commit e3532f0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

zephyr/port/include/esp_heap_adapter.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
#pragma once
88

9-
#include <soc.h>
109
#include <string.h>
1110
#include <zephyr/multi_heap/shared_multi_heap.h>
1211

@@ -24,7 +23,7 @@
2423

2524
#elif defined(CONFIG_ESP_WIFI_HEAP_SPIRAM)
2625

27-
#define IS_DRAM(addr) ((uint32_t)addr >= SOC_DRAM_LOW && (uint32_t)addr < SOC_DRAM_HIGH)
26+
#include <esp_memory_utils.h>
2827

2928
static inline void* esp_wifi_malloc_func(size_t _size)
3029
{
@@ -42,7 +41,7 @@ static inline void* esp_wifi_calloc_func(size_t _nmemb, size_t _size)
4241

4342
static inline void esp_wifi_free_func(void *_mem)
4443
{
45-
if (IS_DRAM(_mem)) {
44+
if (esp_ptr_in_dram(_mem)) {
4645
k_free(_mem);
4746
} else {
4847
shared_multi_heap_free(_mem);

0 commit comments

Comments
 (0)