Skip to content

Commit 3ae2e0e

Browse files
committed
fix: Use DMA1_STREAM4 instead DMA2_STREAM4
1 parent 6e7240d commit 3ae2e0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/spi-dma.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fn main() -> ! {
8484
cortex_m::interrupt::free(|cs| *G_TRANSFER.borrow(cs).borrow_mut() = Some(transfer));
8585
// Enable interrupt
8686
unsafe {
87-
cortex_m::peripheral::NVIC::unmask(pac::Interrupt::DMA2_STREAM4);
87+
cortex_m::peripheral::NVIC::unmask(pac::Interrupt::DMA1_STREAM4);
8888
}
8989
}
9090

@@ -94,7 +94,7 @@ fn main() -> ! {
9494
}
9595

9696
#[interrupt]
97-
fn DMA2_STREAM4() {
97+
fn DMA1_STREAM4() {
9898
static mut TRANSFER: Option<SpiDma> = None;
9999

100100
let transfer = TRANSFER.get_or_insert_with(|| {

0 commit comments

Comments
 (0)