Skip to content

Commit 9470cf3

Browse files
authored
rtc: add is_wakeup_timer_en
1 parent 557a84a commit 9470cf3

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
### Added
99
- Added a `is_pending` method to the `gpio::Exti` trait.
1010
- Added alarm functionality to the RTC.
11+
- Added `Rtc.is_wakeup_timer_en`.
1112

1213
## [0.3.0] - 2021-12-20
1314
### Added

hal/src/rtc/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,12 @@ impl Rtc {
511511
self.rtc.cr.modify(|_, w| w.wute().set_bit());
512512
}
513513

514+
/// Returns `true` if the wakeup timer is enabled.
515+
#[inline]
516+
pub fn is_wakeup_timer_en(&self) -> bool {
517+
self.rtc.cr.read().wute().bit_is_set()
518+
}
519+
514520
/// Disable the wakeup timer.
515521
#[inline]
516522
pub fn disable_wakeup_timer(&mut self) {

0 commit comments

Comments
 (0)