Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:e77d69913c46, committed 2015-03-04
- Comitter:
- scachat
- Date:
- Wed Mar 04 13:09:54 2015 +0000
- Parent:
- 0:0ffb7046206a
- Commit message:
- bug in month handling
Changed in this revision
ds1338.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 0ffb7046206a -r e77d69913c46 ds1338.cpp --- a/ds1338.cpp Wed Mar 04 08:49:37 2015 +0000 +++ b/ds1338.cpp Wed Mar 04 13:09:54 2015 +0000 @@ -103,7 +103,7 @@ buffer[3]=(((time->tm_hour/10)<<4)+(time->tm_hour%10))&0x3F;//mode 24h buffer[4]=(time->tm_wday)&0x03; buffer[5]=(((time->tm_mday/10)<<4)+(time->tm_mday%10))&0x3F; - buffer[6]=(((time->tm_mon/10)<<4)+(time->tm_mon%10))&0x1F; + buffer[6]=((((time->tm_mon+1)/10)<<4)+((time->tm_mon+1)%10))&0x1F; buffer[7]=((((time->tm_year%100)/10)<<4)+(time->tm_year%10))&0xFF; buffer[8]=0x90;//1Hz, erase error cond buffer[9]=0xCA;