Pradeep Kotipalli
/
TFOX_CDMS_VR_1_0_WORKING
jnlj
Fork of TFOX_CDMS_VR_1_0_WORKING by
Diff: RTC.cpp
- Revision:
- 7:4f17f1afe95e
- Parent:
- 5:c77b49508927
--- a/RTC.cpp Tue Jun 16 16:16:12 2015 +0000 +++ b/RTC.cpp Tue Jun 16 20:14:03 2015 +0000 @@ -83,7 +83,7 @@ printf("\n\r rtc initalised \n"); } -void FUNC_CDMS_RD_RTC(uint8_t *time) +void FUNC_CDMS_RD_RTC(uint8_t Time_stamp[8]) { uint8_t response; @@ -136,9 +136,17 @@ uint8_t year = ((response&0xF0)>>4)*10+(response&0x0F)*1; rtc_cs=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, milliseconds}; + //Time_stamp[8] = {year, month, date, day, hours, minutes, seconds, milliseconds}; + Time_stamp[0] = year; + Time_stamp[1] = month; + Time_stamp[2] = date; + Time_stamp[3] = day; + Time_stamp[4] = hours; + Time_stamp[5] = minutes; + Time_stamp[6] = seconds; + Time_stamp[7] = milliseconds; for(int i= 0; i<8;i++) printf("%d\t",Time_stamp[i]); printf("read\r\n"); - time = Time_stamp; + //time = Time_stamp; } \ No newline at end of file