Skip to content

Commit e7c38a3

Browse files
committed
Tidy up DMA for STM32H735
1 parent a9bb85c commit e7c38a3

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

src/dma/bdma.rs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,7 @@ macro_rules! bdma_stream {
617617
};
618618
}
619619

620+
#[cfg(not(feature = "rm0468"))]
620621
bdma_stream!(
621622
// Note: the field names start from one, unlike the RM where they start from
622623
// zero. May need updating if it gets fixed upstream.
@@ -653,6 +654,42 @@ bdma_stream!(
653654
teif8, gif8
654655
),
655656
);
657+
#[cfg(feature = "rm0468")]
658+
bdma_stream!(
659+
// For this sub-familiy, the field names do match the RM.
660+
(
661+
Stream0, 0, ifcr, ctcif0, chtif0, cteif0, cgif0, isr, tcif0, htif0,
662+
teif0, gif0
663+
),
664+
(
665+
Stream1, 1, ifcr, ctcif1, chtif1, cteif1, cgif1, isr, tcif1, htif1,
666+
teif1, gif1
667+
),
668+
(
669+
Stream2, 2, ifcr, ctcif2, chtif2, cteif2, cgif2, isr, tcif2, htif2,
670+
teif2, gif2
671+
),
672+
(
673+
Stream3, 3, ifcr, ctcif3, chtif3, cteif3, cgif3, isr, tcif3, htif3,
674+
teif3, gif3
675+
),
676+
(
677+
Stream4, 4, ifcr, ctcif4, chtif4, cteif4, cgif4, isr, tcif4, htif4,
678+
teif4, gif4
679+
),
680+
(
681+
Stream5, 5, ifcr, ctcif5, chtif5, cteif5, cgif5, isr, tcif5, htif5,
682+
teif5, gif5
683+
),
684+
(
685+
Stream6, 6, ifcr, ctcif6, chtif6, cteif6, cgif6, isr, tcif6, htif6,
686+
teif6, gif6
687+
),
688+
(
689+
Stream7, 7, ifcr, ctcif7, chtif7, cteif7, cgif7, isr, tcif7, htif7,
690+
teif7, gif7
691+
),
692+
);
656693

657694
/// Type alias for the DMA Request Multiplexer
658695
///

src/dma/dma.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,10 +936,13 @@ peripheral_target_address!(
936936
peripheral_target_address!(
937937
(pac::SAI1, cha.dr, u32, M2P, DMAReq::SAI1A_DMA),
938938
(pac::SAI1, chb.dr, u32, P2M, DMAReq::SAI1B_DMA),
939+
);
940+
#[cfg(not(feature = "rm0468"))]
941+
peripheral_target_address!(
939942
(pac::SAI2, cha.dr, u32, M2P, DMAReq::SAI2A_DMA),
940943
(pac::SAI2, chb.dr, u32, P2M, DMAReq::SAI2B_DMA),
941944
);
942-
#[cfg(not(feature = "rm0455"))]
945+
#[cfg(any(feature = "rm0433", feature = "rm0399"))]
943946
peripheral_target_address!(
944947
(pac::SAI3, cha.dr, u32, M2P, DMAReq::SAI3_A_DMA),
945948
(pac::SAI3, chb.dr, u32, P2M, DMAReq::SAI3_B_DMA),

0 commit comments

Comments
 (0)