Skip to content

Commit

Permalink
Rename configure_intterupt to configure_interrupt
Browse files Browse the repository at this point in the history
Resolves #360
  • Loading branch information
sunsided committed Jun 29, 2024
1 parent 19ec071 commit f512263
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/dma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,14 @@ pub trait Channel: private::Channel {
}

/// Enable or disable the interrupt for the specified [`Event`].
#[deprecated(note = "Please use `configure_interrupt` instead.")]
#[inline(always)]
fn configure_intterupt(&mut self, event: Event, enable: bool) {
self.configure_interrupt(event, enable)
}

/// Enable or disable the interrupt for the specified [`Event`].
fn configure_interrupt(&mut self, event: Event, enable: bool) {
match event {
Event::HalfTransfer => self.ch().cr.modify(|_, w| w.htie().bit(enable)),
Event::TransferComplete => self.ch().cr.modify(|_, w| w.tcie().bit(enable)),
Expand All @@ -420,12 +427,12 @@ pub trait Channel: private::Channel {

/// Enable the interrupt for the given [`Event`].
fn enable_interrupt(&mut self, event: Event) {
self.configure_intterupt(event, true);
self.configure_interrupt(event, true);
}

/// Disable the interrupt for the given [`Event`].
fn disable_interrupt(&mut self, event: Event) {
self.configure_intterupt(event, false);
self.configure_interrupt(event, false);
}

/// Start a transfer
Expand Down

0 comments on commit f512263

Please sign in to comment.