cdms n bae

Dependencies:   SDFileSystem mbed-rtos mbed

Fork of CDMS_RTOS by Pradeep Kotipalli

Revision:
9:d6623702495b
Parent:
8:4acac3bf5e9b
--- a/hk.cpp	Fri Feb 06 18:12:16 2015 +0000
+++ b/hk.cpp	Fri Feb 27 19:09:51 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("init rtc done");
 }
 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 stored");
     }
 }
\ No newline at end of file