Skip to content

Commit 075871f

Browse files
authored
Merge pull request #35 from almusil/add_dma_circular
dma: Add function to set circular mode
2 parents e0cbfe1 + 7558897 commit 075871f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/dma.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ pub trait Channel: private::Channel {
187187
self.ch().cr.modify(|_, w| w.dir().bit(dir));
188188
}
189189

190+
/// Set the circular mode of this channel
191+
fn set_circular_mode(&mut self, circular: bool) {
192+
self.ch().cr.modify(|_, w| w.circ().bit(circular));
193+
}
194+
190195
/// Enable the interrupt for the given event
191196
fn listen(&mut self, event: Event) {
192197
use Event::*;

0 commit comments

Comments
 (0)