Skip to content

Commit

Permalink
Merge pull request #719 from SCingolani/main
Browse files Browse the repository at this point in the history
Make `Spi::free` also free up the pins
  • Loading branch information
ithinuel authored Nov 17, 2023
2 parents cb0d2e9 + bcb7683 commit aecf366
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rp2040-hal/src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ impl<S: State, D: SpiDevice, P: ValidSpiPinout<D>, const DS: u8> Spi<S, D, P, DS
}
}

/// Releases the underlying device.
pub fn free(self) -> 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
Expand Down

0 comments on commit aecf366

Please sign in to comment.