From 00e23d4090b6535a01ce4f178b3156d0fd238922 Mon Sep 17 00:00:00 2001 From: rhetenor Date: Sun, 27 Sep 2026 13:40:56 +0200 Subject: [PATCH] add psram to heap allocator --- src/bin/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/main.rs b/src/bin/main.rs index c3b05a8..ceac271 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -9,6 +9,7 @@ use alloc::boxed::Box; use alloc::sync::Arc; +use core::mem::MaybeUninit; use creaturedex::Mutex; use creaturedex::background_tasks; use creaturedex::drivers::i2c_bus::I2cBusPinConfiguration; @@ -67,6 +68,7 @@ async fn main(spawner: Spawner) { let esp_peripherals = esp_hal::init(config); esp_alloc::heap_allocator!(#[esp_hal::ram(reclaimed)] size: HEAP_SIZE); + esp_alloc::psram_allocator!(esp_peripherals.PSRAM, esp_hal::psram); let sw_interrupt = esp_hal::interrupt::software::SoftwareInterruptControl::new(esp_peripherals.SW_INTERRUPT);