From ef9e5980d98eb757ba2d70fe31de86486910f13a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Tue, 27 Aug 2024 11:52:03 +0200 Subject: [PATCH] Backtrack on some mutability changes --- esp-hal/src/rsa/esp32.rs | 2 +- esp-hal/src/rsa/esp32cX.rs | 2 +- esp-hal/src/rsa/esp32sX.rs | 2 +- esp-hal/src/rsa/mod.rs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/esp-hal/src/rsa/esp32.rs b/esp-hal/src/rsa/esp32.rs index a1fc04e2091..6d0c910ac8c 100644 --- a/esp-hal/src/rsa/esp32.rs +++ b/esp-hal/src/rsa/esp32.rs @@ -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()); } diff --git a/esp-hal/src/rsa/esp32cX.rs b/esp-hal/src/rsa/esp32cX.rs index d5643ed9c2c..ea6d79d44c2 100644 --- a/esp-hal/src/rsa/esp32cX.rs +++ b/esp-hal/src/rsa/esp32cX.rs @@ -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()); } diff --git a/esp-hal/src/rsa/esp32sX.rs b/esp-hal/src/rsa/esp32sX.rs index e9336d233aa..956ec3fe4e8 100644 --- a/esp-hal/src/rsa/esp32sX.rs +++ b/esp-hal/src/rsa/esp32sX.rs @@ -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()); diff --git a/esp-hal/src/rsa/mod.rs b/esp-hal/src/rsa/mod.rs index 50ba5b99330..31ae7f2e967 100644 --- a/esp-hal/src/rsa/mod.rs +++ b/esp-hal/src/rsa/mod.rs @@ -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(&self, outbuf: &mut [u32; N]) { + fn read_results(&mut self, outbuf: &mut [u32; N]) { self.wait_for_idle(); self.read_out(outbuf); }