Skip to content

Commit 111531d

Browse files
committed
Add free() function to rtc
1 parent 9d17eb1 commit 111531d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
4949
This should make it easier to generically use the `Serial` peripheral. ([#253])
5050
- Greatly increase coverage of `Debug` and `defmt::Format` implementations.
5151
Almost all important types should now be supported. ([#265])
52+
- Add a `free()` function to the RTC implementation to retrieve the passed-in
53+
peripheral. ([#266])
5254

5355
[`enumset`]: https://crates.io/crates/enumset
5456

src/rtc.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ impl Rtc {
8484
self.regs.cr.read().fmt().bit()
8585
}
8686

87+
/// Release the RTC peripheral
88+
pub fn free(self) -> RTC {
89+
self.regs
90+
}
91+
8792
/// As described in Section 27.3.7 in RM0316,
8893
/// this function is used to disable write protection
8994
/// when modifying an RTC register

0 commit comments

Comments
 (0)