|
@@ -278,7 +278,7 @@ static int _DS3231_set_date_time(struct file *pf, const struct tm *ptm)
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
// read/write register 15 (Status Register), to clear the OSF flag.
|
|
|
|
|
|
- if((ret = TivaCmdGetI2C(pf, _I2C_SLV_ADDR_DS3231, 15, 1, ®, 1))) // read register 15
|
|
|
+ if(!(ret = TivaCmdGetI2C(pf, _I2C_SLV_ADDR_DS3231, 15, 1, ®, 1))) // read register 15
|
|
|
{
|
|
|
reg &= 0x7F; // clear OSF bit.
|
|
|
|