You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, first of all thanks for this library!
I think I found a small bug in function ds3231_set_time at line 217.
The result of bin2bcd() is masked with 0x0F and as a result tens are removed.
I fixed by changing raw_time[5] = bin2bcd(timeptr->tm_mon + DS3231_MONTHS_OFFSET) & DS3231_MONTHS_MASK;
to raw_time[5] = bin2bcd(timeptr->tm_mon + DS3231_MONTHS_OFFSET);
The text was updated successfully, but these errors were encountered:
Hi, first of all thanks for this library!
I think I found a small bug in function
ds3231_set_time
at line 217.The result of bin2bcd() is masked with 0x0F and as a result tens are removed.
I fixed by changing
raw_time[5] = bin2bcd(timeptr->tm_mon + DS3231_MONTHS_OFFSET) & DS3231_MONTHS_MASK;
to
raw_time[5] = bin2bcd(timeptr->tm_mon + DS3231_MONTHS_OFFSET);
The text was updated successfully, but these errors were encountered: