From bcb7683512363d0bf17675217bbafe7b050b7dcb Mon Sep 17 00:00:00 2001 From: Santiago Cingolani Date: Mon, 13 Nov 2023 16:26:56 +0100 Subject: [PATCH] Make `Spi::free` also free up the pins --- rp2040-hal/src/spi.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rp2040-hal/src/spi.rs b/rp2040-hal/src/spi.rs index 6c5f345ae..f53173285 100644 --- a/rp2040-hal/src/spi.rs +++ b/rp2040-hal/src/spi.rs @@ -193,9 +193,9 @@ impl, const DS: u8> Spi D { - self.device + /// Releases the underlying device and pins. + pub fn free(self) -> (D, P) { + (self.device, self.pins) } /// Set device pre-scale and post-div properties to match the given baudrate as