PCF65263: Correct readback verification of seconds register
This commit is contained in:
parent
1e96a07346
commit
a696b807fb
2
arch
2
arch
@ -1 +1 @@
|
||||
Subproject commit f9a3a1463b24b8da63f2a7577d0b4ce0131a1069
|
||||
Subproject commit a8666b5bb6841d514d1fccedb0071df38d78217a
|
@ -408,6 +408,7 @@ int up_rtc_settime(FAR const struct timespec *tp)
|
||||
struct tm newtm;
|
||||
time_t newtime;
|
||||
uint8_t buffer[9];
|
||||
uint8_t cmd;
|
||||
uint8_t seconds;
|
||||
int ret;
|
||||
|
||||
@ -449,7 +450,7 @@ int up_rtc_settime(FAR const struct timespec *tp)
|
||||
rtc_dumptime(&tm, "New time");
|
||||
|
||||
/* Construct the message */
|
||||
/* Write starting with the seconds regiser */
|
||||
/* Write starting with the 100ths of seconds register */
|
||||
|
||||
buffer[0] = PCF85263_RTC_100TH_SECONDS;
|
||||
|
||||
@ -498,9 +499,11 @@ int up_rtc_settime(FAR const struct timespec *tp)
|
||||
|
||||
/* Read back the seconds register */
|
||||
|
||||
cmd = PCF85263_RTC_SECONDS;
|
||||
|
||||
msg[1].addr = PCF85263_I2C_ADDRESS;
|
||||
msg[1].flags = 0;
|
||||
msg[1].buffer = buffer;
|
||||
msg[1].buffer = &cmd;
|
||||
msg[1].length = 1;
|
||||
|
||||
msg[2].addr = PCF85263_I2C_ADDRESS;
|
||||
|
Loading…
Reference in New Issue
Block a user