Skip to content

Commit

Permalink
Backtrack on some mutability changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Aug 27, 2024
1 parent 0bfce01 commit c6368af
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion esp-hal/src/rsa/esp32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl<'d, DM: crate::Mode> Rsa<'d, DM> {
}

/// Clears the RSA interrupt flag.
pub(super) fn clear_interrupt(&self) {
pub(super) fn clear_interrupt(&mut self) {
self.rsa.interrupt().write(|w| w.interrupt().set_bit());
}

Expand Down
2 changes: 1 addition & 1 deletion esp-hal/src/rsa/esp32cX.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl<'d, DM: crate::Mode> Rsa<'d, DM> {
}

/// Clears the RSA interrupt flag.
pub(super) fn clear_interrupt(&self) {
pub(super) fn clear_interrupt(&mut self) {
self.rsa.int_clr().write(|w| w.clear_interrupt().set_bit());
}

Expand Down
2 changes: 1 addition & 1 deletion esp-hal/src/rsa/esp32sX.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl<'d, DM: crate::Mode> Rsa<'d, DM> {
}

/// Clears the RSA interrupt flag.
pub(super) fn clear_interrupt(&self) {
pub(super) fn clear_interrupt(&mut self) {
self.rsa
.clear_interrupt()
.write(|w| w.clear_interrupt().set_bit());
Expand Down
4 changes: 2 additions & 2 deletions esp-hal/src/rsa/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ impl<'d, DM: crate::Mode> Rsa<'d, DM> {
}
}

fn wait_for_idle(&self) {
fn wait_for_idle(&mut self) {
while !self.is_idle() {}
self.clear_interrupt();
}

fn read_results<const N: usize>(&self, outbuf: &mut [u32; N]) {
fn read_results<const N: usize>(&mut self, outbuf: &mut [u32; N]) {
self.wait_for_idle();
self.read_out(outbuf);
}
Expand Down

0 comments on commit c6368af

Please sign in to comment.