add psram to heap allocator

This commit is contained in:
2026-09-27 13:40:56 +02:00
parent bee2883e10
commit 00e23d4090
+2
View File
@@ -9,6 +9,7 @@
use alloc::boxed::Box; use alloc::boxed::Box;
use alloc::sync::Arc; use alloc::sync::Arc;
use core::mem::MaybeUninit;
use creaturedex::Mutex; use creaturedex::Mutex;
use creaturedex::background_tasks; use creaturedex::background_tasks;
use creaturedex::drivers::i2c_bus::I2cBusPinConfiguration; use creaturedex::drivers::i2c_bus::I2cBusPinConfiguration;
@@ -67,6 +68,7 @@ async fn main(spawner: Spawner) {
let esp_peripherals = esp_hal::init(config); let esp_peripherals = esp_hal::init(config);
esp_alloc::heap_allocator!(#[esp_hal::ram(reclaimed)] size: HEAP_SIZE); esp_alloc::heap_allocator!(#[esp_hal::ram(reclaimed)] size: HEAP_SIZE);
esp_alloc::psram_allocator!(esp_peripherals.PSRAM, esp_hal::psram);
let sw_interrupt = let sw_interrupt =
esp_hal::interrupt::software::SoftwareInterruptControl::new(esp_peripherals.SW_INTERRUPT); esp_hal::interrupt::software::SoftwareInterruptControl::new(esp_peripherals.SW_INTERRUPT);