Skip to content

Commit

Permalink
eic: replace modify with write. prevent losing interrupts in intflag (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mattthebaker authored Jun 5, 2024
1 parent 4027f8a commit 02dbad6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions hal/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- Allow configuring USB clock with `GenericClockController` on atsamd11
- fix samd51j not having i2s support
- remove i2s functionality for samd51g since it does not have it
- Fix EIC issue leading to lost interrupts

# v0.17.0

Expand Down
6 changes: 3 additions & 3 deletions hal/src/peripherals/eic/d11/pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ crate::paste::item! {
}

pub fn enable_interrupt(&mut self, eic: &mut EIC) {
eic.eic.intenset.modify(|_, w| {
eic.eic.intenset.write(|w| {
w.[<extint $num>]().set_bit()
});
}
Expand All @@ -92,7 +92,7 @@ crate::paste::item! {
}

pub fn disable_interrupt(&mut self, eic: &mut EIC) {
eic.eic.intenclr.modify(|_, w| {
eic.eic.intenclr.write(|w| {
w.[<extint $num>]().set_bit()
});
}
Expand All @@ -102,7 +102,7 @@ crate::paste::item! {
}

pub fn clear_interrupt(&mut self) {
unsafe { &(*pac::EIC::ptr()) }.intflag.modify(|_, w| {
unsafe { &(*pac::EIC::ptr()) }.intflag.write(|w| {
w.[<extint $num>]().set_bit()
});
}
Expand Down

0 comments on commit 02dbad6

Please sign in to comment.