hey

Dependencies:   SDFileSystem mbed-rtos mbed

Fork of CDMS_BAE by sakthi priya amirtharaj

Revision:
9:4c728c4fe2ce
Parent:
8:4acac3bf5e9b
--- a/hk.cpp	Fri Feb 06 18:12:16 2015 +0000
+++ b/hk.cpp	Fri Feb 06 18:41:13 2015 +0000
@@ -58,6 +58,7 @@
     spiwrite(0x84);           //write day of month to 01
     spiwrite(0x85);           //write month to 01
     spiwrite(0x86);           //write year to 01
+    printf("RTC initialized");
 }
 void storedata(char * data)
 {
@@ -69,7 +70,7 @@
     int seconds=spiread(0x00);     //read seconds
     int minutes =spiread(0x01);    //read minutes
     int hours =spiread(0x02);      //read hours
-    int day =spi.write(0x03);      //read day of the week
+    int day =spiread(0x03);      //read day of the week
     int date =spiread(0x04);       //read day of the month
     int month =spiread(0x05);      //read month
     int year =spiread(0x06);       //read year
@@ -108,6 +109,6 @@
     {
     fprintf(fp, "%s ", data);
     fclose(fp);
-    printf("%s",getname(year,month,date,day,hours,minutes,seconds));
+    printf("File created and data entered successfully");
     }
 }
\ No newline at end of file