From a9d4b5a77d7d4fc6d5da3402328196d980d4b680 Mon Sep 17 00:00:00 2001 From: Alex Martens Date: Mon, 23 May 2022 15:46:44 -0700 Subject: [PATCH] rtc: fix a documentation bug --- CHANGELOG.md | 3 +++ hal/src/rtc/alarm.rs | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af040fb3b5..58847cbf3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added `Rtc::calibrate_lp` to calibrate the RTC. - Added `Rtc::recalibration_pending`. +### Fixed +- Fixed a documentation bug in `rtc::Alarm`. Values are masked if `true`, but the documentation indicated they are masked if `false`. + ## [0.5.1] - 2022-05-14 ### Added - Added `Rtc::alarm_{a,b}` to get the alarm value. diff --git a/hal/src/rtc/alarm.rs b/hal/src/rtc/alarm.rs index 0d119c0a88..4ba62c8a58 100644 --- a/hal/src/rtc/alarm.rs +++ b/hal/src/rtc/alarm.rs @@ -136,8 +136,8 @@ impl Alarm { /// Set the alarm seconds mask. /// - /// * `true`: Alarm is set if the seconds match. - /// * `false`: Seconds are "do not care" in the alarm comparison. + /// * `false`: Alarm is set if the seconds match. + /// * `true`: Seconds are "do not care" in the alarm comparison. /// /// # Example /// @@ -209,8 +209,8 @@ impl Alarm { /// Set the alarm minutes mask. /// - /// * `true`: Alarm is set if the minutes match. - /// * `false`: Minutes are "do not care" in the alarm comparison. + /// * `false`: Alarm is set if the minutes match. + /// * `true`: Minutes are "do not care" in the alarm comparison. /// /// # Example /// @@ -282,8 +282,8 @@ impl Alarm { /// Set the alarm hours mask. /// - /// * `true`: Alarm is set if the hours match. - /// * `false`: Hours are "do not care" in the alarm comparison. + /// * `false`: Alarm is set if the hours match. + /// * `true`: Hours are "do not care" in the alarm comparison. /// /// # Example /// @@ -408,8 +408,8 @@ impl Alarm { /// Set the alarm day / weekday mask. /// - /// * `true`: Alarm is set if the days / weekdays match. - /// * `false`: Days / weekdays are "do not care" in the alarm comparison. + /// * `false`: Alarm is set if the days / weekdays match. + /// * `true`: Days / weekdays are "do not care" in the alarm comparison. /// /// # Example ///