Skip to content

Commit 11aa9cc

Browse files
committed
dma: Improve documentation
1 parent 00cb758 commit 11aa9cc

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/dma.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
//!
33
//! Currently DMA is only supported for STM32F303 MCUs.
44
5+
// To learn about most of the ideas implemented here, check out the DMA section
6+
// of the Embedonomicon: https://docs.rust-embedded.org/embedonomicon/dma.html
7+
58
use crate::{
69
pac::{self, dma1::ch::cr},
710
rcc::AHB,
@@ -429,7 +432,14 @@ pub enum Event {
429432
pub trait Channel: private::Channel {
430433
/// Is the interrupt flag for the given event set?
431434
fn event_occurred(&self, event: Event) -> bool;
432-
/// Clear the interrupt flag for the given event
435+
436+
/// Clear the interrupt flag for the given event.
437+
///
438+
/// Passing `Event::Any` clears all interrupt flags.
439+
///
440+
/// Note that the the global interrupt flag is not automatically cleared
441+
/// even when all other flags are cleared. The only way to clear it is to
442+
/// call this method with `Event::Any`.
433443
fn clear_event(&mut self, event: Event);
434444

435445
/// Reset the control registers of this channel.

0 commit comments

Comments
 (0)