Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Jul 2020 18:53:19 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r363330 - head/sys/dev/iicbus
Message-ID:  <202007191853.06JIrJPP092276@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <freebsd-rj@obsigna.com>
  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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007191853.06JIrJPP092276>