Skip to content

Commit

Permalink
Add Qspi::free() to release consumed pins (atsamd-rs#667)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross35 authored and benvonhandorf committed Nov 29, 2023
1 parent dd6a0eb commit e7638b6
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions hal/src/thumbv7em/qspi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,25 @@ impl Qspi<OneShot> {
_mode: PhantomData,
}
}

/// Return the consumed pins and the QSPI peripheral
///
/// Order: `(qspi, sck, cs, io0, io1, io2, io3)`
pub fn free(
self,
) -> (
QSPI,
Pin<PB10, AlternateH>,
Pin<PB11, AlternateH>,
Pin<PA08, AlternateH>,
Pin<PA09, AlternateH>,
Pin<PA10, AlternateH>,
Pin<PA11, AlternateH>,
) {
(
self.qspi, self._sck, self._cs, self._io0, self._io1, self._io2, self._io3,
)
}
}

/// Operations available in XIP mode
Expand Down

0 comments on commit e7638b6

Please sign in to comment.