Skip to content

Commit 6153d23

Browse files
committed
Fix build with no psram
these are conditionally-defined identifiers so have to use if defined.
1 parent 5e26862 commit 6153d23

File tree

1 file changed

+2
-2
lines changed
  • ports/espressif/supervisor

1 file changed

+2
-2
lines changed

ports/espressif/supervisor/port.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ safe_mode_t port_heap_init(safe_mode_t sm) {
325325
common_hal_espidf_set_reserved_psram(reserved);
326326
}
327327

328-
#ifdef CONFIG_SPIRAM_USE_MEMMAP
328+
#if defined(CONFIG_SPIRAM_USE_MEMMAP)
329329
{
330330
intptr_t heap_start = common_hal_espidf_get_psram_start();
331331
intptr_t heap_end = common_hal_espidf_get_psram_end();
@@ -338,7 +338,7 @@ safe_mode_t port_heap_init(safe_mode_t sm) {
338338
ESP_LOGE(TAG, "CONFIG_SPIRAM_USE_MMAP enabled but no spiram heap available");
339339
}
340340
}
341-
#elif CONFIG_SPIRAM_USE_CAPS_ALLOC
341+
#elif defined(CONFIG_SPIRAM_USE_CAPS_ALLOC)
342342
{
343343
intptr_t psram_start = common_hal_espidf_get_psram_start();
344344
intptr_t psram_end = common_hal_espidf_get_psram_end();

0 commit comments

Comments
 (0)