diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-11-18 16:25:27 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-11-18 16:25:27 +0200 |
| commit | a9d18c495bfb4232b61bf4b45f1ba3c626cdb61b (patch) | |
| tree | 78510475f28954dbc3348f36f815f0898fda8f21 /Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c | |
| parent | 2d453e76dbc75ed10c7e953f735d9aedcbfd3529 (diff) | |
| parent | ba0d5e816582df76b450e43621e93010cd74bf63 (diff) | |
| download | Tango-a9d18c495bfb4232b61bf4b45f1ba3c626cdb61b.tar.gz Tango-a9d18c495bfb4232b61bf4b45f1ba3c626cdb61b.zip | |
merge
Diffstat (limited to 'Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c index 76c2fe9f2..77efa1cfd 100644 --- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c +++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c @@ -653,7 +653,7 @@ uint32_t GetFilesRequestFunc(MessageContainer* requestContainer) GetFilesRequest* request = get_files_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); GetFilesResponse response = GET_FILES_RESPONSE__INIT; - + //struct tm RTC_time; #define MAX_NUM_OF_FILES 20 DIR dir; FILINFO* fno[MAX_NUM_OF_FILES]; @@ -727,6 +727,13 @@ uint32_t GetFilesRequestFunc(MessageContainer* requestContainer) else usnprintf(&FullPath[i], 50, "%s%s%s", request->path,"/", fno[i]->fname); Data[i].fullpath = &FullPath[i][0]; + /*RTC_time.tm_year=(fno[i]->fdate>>9)+1980;//populate the time struct (FAT start==1980, RTC.year==0) + RTC_time.tm_mon=(fno[i]->fdate>>5)&0x000F; + RTC_time.tm_mday=fno[i]->fdate&0x001F; + RTC_time.tm_hour=(fno[i]->ftime>>11)&0x001F; + RTC_time.tm_min=(fno[i]->ftime>>5)&0x003F; + RTC_time.tm_sec=(fno[i]->ftime<<1)&0x003E;*/ + } response.n_items = NumOfFiles; |
