We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Always I read 12:00:00 1/1/1980 using ffind. I did not find a function fs_set_time or fs_set_date, somebody know how can I set the date, time , timestamp,etc... when I use fs_arm_l.lib with lpc2468?
Antonio,
You need to write the function to set the RTC time. Then have the function call to bring in the time in these functions and set the variables from the values from your structure.
U32 fs_get_time (void) { /* Return Current Time for FAT File Time stamp. */ U32 h,m,s,tme; tSimTime time;
getSimTime(&time); h = time.hour; m = time.min; s = time.sec;
tme = (h << 16) | (m << 8) | s; return (tme); }
/*--------------------------- fs_get_date -----------------------------------*/
U32 fs_get_date (void) { /* Return Current Date for FAT File Time stamp. */ U32 d,m,y,date; tSimTime time; getSimTime(&time); d = time.date; m = time.month; y = time.year+2000; date = (y << 16) | (m << 8) | d; return (date); }
Something like this..
Gud luck, Sivaram.
Thank You guys, now its working fine