Skip to content

Commit a9d4b5a

Browse files
authored
rtc: fix a documentation bug
1 parent 997ecfe commit a9d4b5a

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
- Added `Rtc::calibrate_lp` to calibrate the RTC.
1111
- Added `Rtc::recalibration_pending`.
1212

13+
### Fixed
14+
- Fixed a documentation bug in `rtc::Alarm`. Values are masked if `true`, but the documentation indicated they are masked if `false`.
15+
1316
## [0.5.1] - 2022-05-14
1417
### Added
1518
- Added `Rtc::alarm_{a,b}` to get the alarm value.

hal/src/rtc/alarm.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ impl Alarm {
136136

137137
/// Set the alarm seconds mask.
138138
///
139-
/// * `true`: Alarm is set if the seconds match.
140-
/// * `false`: Seconds are "do not care" in the alarm comparison.
139+
/// * `false`: Alarm is set if the seconds match.
140+
/// * `true`: Seconds are "do not care" in the alarm comparison.
141141
///
142142
/// # Example
143143
///
@@ -209,8 +209,8 @@ impl Alarm {
209209

210210
/// Set the alarm minutes mask.
211211
///
212-
/// * `true`: Alarm is set if the minutes match.
213-
/// * `false`: Minutes are "do not care" in the alarm comparison.
212+
/// * `false`: Alarm is set if the minutes match.
213+
/// * `true`: Minutes are "do not care" in the alarm comparison.
214214
///
215215
/// # Example
216216
///
@@ -282,8 +282,8 @@ impl Alarm {
282282

283283
/// Set the alarm hours mask.
284284
///
285-
/// * `true`: Alarm is set if the hours match.
286-
/// * `false`: Hours are "do not care" in the alarm comparison.
285+
/// * `false`: Alarm is set if the hours match.
286+
/// * `true`: Hours are "do not care" in the alarm comparison.
287287
///
288288
/// # Example
289289
///
@@ -408,8 +408,8 @@ impl Alarm {
408408

409409
/// Set the alarm day / weekday mask.
410410
///
411-
/// * `true`: Alarm is set if the days / weekdays match.
412-
/// * `false`: Days / weekdays are "do not care" in the alarm comparison.
411+
/// * `false`: Alarm is set if the days / weekdays match.
412+
/// * `true`: Days / weekdays are "do not care" in the alarm comparison.
413413
///
414414
/// # Example
415415
///

0 commit comments

Comments
 (0)