Repository for CDMS code

Dependencies:   SimpleDMA mbed-rtos mbed eeprom

Fork of COM_MNG_TMTC_SIMPLE by Shreesha S

Revision:
96:4ca92f9775e0
Parent:
93:4d76de54a699
Child:
115:2e1144a41d76
diff -r 42d6747900cb -r 4ca92f9775e0 cdms_rtc.h
--- a/cdms_rtc.h	Mon Jan 25 06:22:29 2016 +0000
+++ b/cdms_rtc.h	Mon Jan 25 13:10:43 2016 +0000
@@ -74,7 +74,7 @@
     spi.write(0x87); 
     spi.write(0x01); //set year to 00(2000)
     gCS_RTC=1;
-    printf("\n\r rtc initalised \n");
+//    printf("\n\r rtc initalised \n");
     SPI_mutex.unlock();
 }
  
@@ -82,7 +82,7 @@
 {    
     SPI_mutex.lock();
     uint8_t response;
-    printf("\n\r Entered rtc\n");
+    //printf("\n\r Entered rtc\n");
     gCS_RTC=1;
     gCS_RTC=0;
     spi.write(0x00); //reading milliseconds register
@@ -132,9 +132,9 @@
     gCS_RTC=1;
     //sprintf(Time_stamp,"%02d%02d%02d%02d%02d%02d%02d%02d",year, month, date, day, hours, minutes, seconds, milliseconds );
     uint8_t Time_stamp[8] = {year, month, date, day, hours, minutes, seconds, centiseconds};
-    for(int i= 0; i<8;i++)
-        printf("%d\t",Time_stamp[i]);
-    printf("read\r\n");
+    for(int i= 0; i<8;i++);
+        //printf("%d\t",Time_stamp[i]);
+    //printf("read\r\n");
     uint64_t time;
     time = 0;
     time = time|(((uint64_t)(centiseconds&0x7F)));
@@ -146,7 +146,7 @@
     time = time|(((uint64_t)(year&0x03))<<33);
     time = (time&0x00000007FFFFFFFF);
     //printf("\n\r%x%x", (int)(time >> 32), (int)(time));
-    printf("\n\r0x%016llx\n\r", time);
+    //printf("\n\r0x%016llx\n\r", time);
    return time;
    SPI_mutex.unlock();
 }
\ No newline at end of file