Adafruit_RTCLib

Fork of Adafruit_RTCLib by Neal Horman

Files at this revision

API Documentation at this revision

Comitter:
nkhorman
Date:
Wed Jul 18 01:28:21 2012 +0000
Parent:
0:7f90c8e04249
Commit message:
fix / add comments

Changed in this revision

DS1307.cpp Show annotated file Show diff for this revision Revisions of this file
DS1307.h Show annotated file Show diff for this revision Revisions of this file
--- a/DS1307.cpp	Tue Jul 17 05:49:20 2012 +0000
+++ b/DS1307.cpp	Wed Jul 18 01:28:21 2012 +0000
@@ -4,6 +4,8 @@
 /*
  * Taken from https://github.com/adafruit/RTClib
  * and modified for LPC1768 by Neal Horman July 2012
+ * Also add support for access to the 56 bytes of
+ * user accessible battery backed ram.
  */
 
 #include "mbed.h"
@@ -19,6 +21,7 @@
 
 RtcDs1307::RtcDs1307(I2C &i2c) : mI2c(i2c)
 {
+    // Read the RTC ram into the object RAM image
     mRam[0]=8;
     if(mI2c.write(DS1307_ADDRESS,(const char *)&mRam[0],1,true) == 0)
         mI2c.read(DS1307_ADDRESS,(char *)&mRam[1],sizeof(mRam)-1);
--- a/DS1307.h	Tue Jul 17 05:49:20 2012 +0000
+++ b/DS1307.h	Wed Jul 18 01:28:21 2012 +0000
@@ -14,7 +14,7 @@
 #include "mbed.h"
 #include "DateTime.h"
 
-// RTC based on the DS1307 chip connected via I2C and the Wire library
+// RTC based on the DS1307 chip connected via I2C
 class RtcDs1307
 {
 public: