aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Common
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-07-28 12:31:49 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-07-28 12:31:49 +0300
commita3f1ec8389cde87fff45dced9380f85d1b2424c6 (patch)
tree06e551c58a42fb4c9657febdd490105348d57acf /Software/Embedded_SW/Embedded/Common
parent6bb733f95cbcabc67115674f5cc91ec67196eeed (diff)
downloadTango-a3f1ec8389cde87fff45dced9380f85d1b2424c6.tar.gz
Tango-a3f1ec8389cde87fff45dced9380f85d1b2424c6.zip
for version 1.4.2.7 : syc file system with semaphore (needs testing!). add secondary pump and activation on init and after 8 hours.now config parameters, improved thread load
Diffstat (limited to 'Software/Embedded_SW/Embedded/Common')
-rw-r--r--Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c8
-rw-r--r--Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.h2
-rw-r--r--Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c2
3 files changed, 8 insertions, 4 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
index f4c52f000..5cbc92285 100644
--- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
+++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
@@ -644,7 +644,7 @@ uint32_t GetFilesRequestFunc(MessageContainer* requestContainer)
}
return Fresult;
}
-FRESULT FileWrite(void * buffer, uint16_t size,char *path)
+FRESULT FileWrite(void * buffer, uint16_t size,char *path, uint32_t timeout)
{
FRESULT Fresult = FR_OK;
FIL *FileHandle = 0; //the system supports a single active file
@@ -657,7 +657,11 @@ FRESULT FileWrite(void * buffer, uint16_t size,char *path)
Fresult = FR_DENIED;
else
{
- Semaphore_pend(FFS_Sem, BIOS_WAIT_FOREVER);
+ if (Semaphore_pend(FFS_Sem, timeout) == false)
+ {
+ LOG_ERROR (false,"file system busy error");
+ return FR_TIMEOUT;
+ }
Fresult = f_open(FileHandle,path,FA_WRITE | FA_OPEN_ALWAYS);
if (Fresult == FR_OK)
diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.h b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.h
index 605b4a475..0f6fd9d5d 100644
--- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.h
+++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.h
@@ -22,7 +22,7 @@ uint32_t GetFilesRequestFunc(MessageContainer* requestContainer);
uint32_t FileDownloadRequestFunc(MessageContainer* requestContainer);
uint32_t FileChunkDownloadRequestFunc(MessageContainer* requestContainer);
-FRESULT FileWrite(void * buffer, uint16_t size,char *path);
+FRESULT FileWrite(void * buffer, uint16_t size,char *path, uint32_t timeout);
FRESULT FileRead(char *path, uint32_t *Size, void **Buffer);
FRESULT FileOpen(char *path, uint32_t *Size, FIL *FileHandle);
diff --git a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
index 5b0944ab9..2ef74c7b6 100644
--- a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
+++ b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
@@ -20,7 +20,7 @@ typedef struct
} TangoVersion_t;
-TangoVersion_t _gTangoVersion = {1,4,2,6};
+TangoVersion_t _gTangoVersion = {1,4,2,7};
#define BUILD_DATE __DATE__
char Dat[50] = BUILD_DATE;
char _gTangoName [MAX_STRING_LEN] = "Tango01 ";//d