Skip to content

Commit

Permalink
Rename start fn, place async handler in RAM
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Dec 17, 2024
1 parent 773a752 commit 4e524ec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions esp-hal/src/spi/master.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -3310,6 +3310,7 @@ pub struct State {
waker: AtomicWaker,
}

#[cfg_attr(place_spi_driver_in_ram, ram)]
fn handle_async<I: Instance>(instance: I) {
let state = instance.state();
let info = instance.info();
Expand Down Expand Up @@ -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() })
}
Expand Down

0 comments on commit 4e524ec

Please sign in to comment.