From 4e524ec6b486ada3685ae3a7784c1bd7e0f3e21f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Mon, 16 Dec 2024 10:31:52 +0100 Subject: [PATCH] Rename start fn, place async handler in RAM --- esp-hal/src/spi/master.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/esp-hal/src/spi/master.rs b/esp-hal/src/spi/master.rs index 4a5864a3ca..6972db4018 100644 --- a/esp-hal/src/spi/master.rs +++ b/esp-hal/src/spi/master.rs @@ -2919,7 +2919,7 @@ impl Driver { for chunk in words.chunks(FIFO_SIZE) { self.configure_datalen(0, chunk.len()); self.fill_fifo(chunk); - self.start_operation_async().await; + self.execute_operation_async().await; } Ok(()) } @@ -3076,7 +3076,7 @@ impl Driver { } /// Starts the operation and waits for it to complete. - async fn start_operation_async(&self) { + async fn execute_operation_async(&self) { self.clear_done_interrupt(); self.start_operation(); SpiFuture::new(self).await; @@ -3310,6 +3310,7 @@ pub struct State { waker: AtomicWaker, } +#[cfg_attr(place_spi_driver_in_ram, ram)] fn handle_async(instance: I) { let state = instance.state(); let info = instance.info(); @@ -3340,6 +3341,7 @@ macro_rules! master_instance { fn handler(&self) -> InterruptHandler { #[$crate::macros::handler] + #[cfg_attr(place_spi_driver_in_ram, ram)] fn handle() { handle_async(unsafe { $crate::peripherals::$peri::steal() }) }