Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147884571
D33497.1784678873.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
952 B
Referenced Files
None
Subscribers
None
D33497.1784678873.diff
View Options
diff --git a/sys/dev/iicbus/rtc/pcf85063.c b/sys/dev/iicbus/rtc/pcf85063.c
--- a/sys/dev/iicbus/rtc/pcf85063.c
+++ b/sys/dev/iicbus/rtc/pcf85063.c
@@ -183,7 +183,7 @@
sizeof(uint8_t), IIC_WAIT);
ts->tv_sec -= utc_offset();
- clock_ts_to_bcd(ts, &bcd, ctrl_reg & PCF85063_CTRL1_TIME_FORMAT);
+ clock_ts_to_bcd(ts, &bcd, false);
clock_dbgprint_bcd(dev, CLOCK_DBG_WRITE, &bcd);
data.sec = bcd.sec;
@@ -194,11 +194,6 @@
data.mon = bcd.mon;
data.year = bcd.year;
- /* Set this bit in case of 12-hour mode and pm hour. */
- if (!(ctrl_reg & PCF85063_CTRL1_TIME_FORMAT))
- if (bcd.ispm)
- data.hour |= 0x20;
-
if (ts->tv_nsec > PCF85063_HALF_OF_SEC_NS)
data.sec++;
@@ -209,6 +204,8 @@
return (error);
ctrl_reg |= PCF85063_CTRL1_RTC_CLK_STOP;
+ /* Explicitly set 24-hour mode. */
+ ctrl_reg &= ~PCF85063_CTRL1_TIME_FORMAT;
error = iicdev_writeto(dev, PCF85063_CTRL1_REG, &ctrl_reg,
sizeof(uint8_t), IIC_WAIT);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 22, 12:07 AM (3 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29212225
Default Alt Text
D33497.1784678873.diff (952 B)
Attached To
Mode
D33497: pcf85063: Set RTC device to work in 24h mode
Attached
Detach File
Event Timeline
Log In to Comment