Author: ian
Date: Sun Jul 19 18:53:19 2020
New Revision: 363330
URL: https://svnweb.freebsd.org/changeset/base/363330

Log:
  The ds3231 RTC chip bitmask values for 12- versus 24-hour mode were reversed,
  flip them so that times in the 20:00:00 to 23:59:59 range read correctly.
  
  Reported by:  Dr. Rolf Jansen <[email protected]>
  Pointy hat:   ian@

Modified:
  head/sys/dev/iicbus/ds3231reg.h

Modified: head/sys/dev/iicbus/ds3231reg.h
==============================================================================
--- head/sys/dev/iicbus/ds3231reg.h     Sun Jul 19 17:47:55 2020        
(r363329)
+++ head/sys/dev/iicbus/ds3231reg.h     Sun Jul 19 18:53:19 2020        
(r363330)
@@ -38,8 +38,8 @@
 #define        DS3231_MINS             0x01
 #define        DS3231_MINS_MASK                0x7f
 #define        DS3231_HOUR             0x02
-#define        DS3231_HOUR_MASK_12HR           0x3f
-#define        DS3231_HOUR_MASK_24HR           0x1f
+#define        DS3231_HOUR_MASK_12HR           0x1f
+#define        DS3231_HOUR_MASK_24HR           0x3f
 #define        DS3231_HOUR_IS_PM               0x20
 #define        DS3231_HOUR_USE_AMPM            0x40
 #define        DS3231_WEEKDAY          0x03
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to