d
Fork of RTC-DS1307 by
Revision 10:710728228135, committed 2018-05-05
- Comitter:
- jclondonol
- Date:
- Sat May 05 14:23:53 2018 +0000
- Parent:
- 9:5627b407e097
- Commit message:
- ds1307 configvurado por serial
Changed in this revision
Rtc_Ds1307.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 5627b407e097 -r 710728228135 Rtc_Ds1307.cpp --- a/Rtc_Ds1307.cpp Wed Jun 26 21:05:46 2013 +0000 +++ b/Rtc_Ds1307.cpp Sat May 05 14:23:53 2018 +0000 @@ -38,14 +38,15 @@ if (start) { buffer[0] &= 0x7F; } else { buffer[0] |= 0x80; } buffer[0] = (buffer[0]&0x80) | (decimalToBcd(time.sec)& 0x7f); buffer[1] = decimalToBcd(time.min); - if (thm) { + /*if (thm) { // AM PM format buffer[2] = (buffer[2]& 196) | (time.hour>12 ? (0x20 | ((decimalToBcd(time.hour-12)))) : decimalToBcd(time.hour)); } else { // 24 hours format buffer[2] = (buffer[2]& 196) | (decimalToBcd(time.hour) & 0x3F); - } + }*/ + buffer[2] = decimalToBcd(time.hour); buffer[3] = time.wday; buffer[4] = decimalToBcd(time.date); buffer[5] = decimalToBcd(time.mon);