RTOS refactoring + more AVR removal

This commit is contained in:
Bertrand Songis
2018-08-05 12:06:48 +02:00
parent f60733b561
commit f3bfde242b
80 changed files with 1111 additions and 1054 deletions
+2 -2
View File
@@ -1250,10 +1250,10 @@ bool eeConvert()
const char *msg = NULL;
if (g_eeGeneral.version == 216) {
msg = PSTR("EEprom Data v216");
msg = "EEprom Data v216";
}
else if (g_eeGeneral.version == 217) {
msg = PSTR("EEprom Data v217");
msg = "EEprom Data v217";
}
else {
return false;
+2 -2
View File
@@ -305,7 +305,7 @@ void eepromWriteWait(EepromWriteState state/* = EEPROM_IDLE*/)
while (eepromWriteState != state) {
#if defined(STM32)
// Waits a little bit for CS transitions
CoTickDelay(1/*2ms*/);
RTOS_WAIT_MS(2);
#endif
eepromWriteProcess();
#ifdef SIMU
@@ -468,7 +468,7 @@ const pm_char * eeBackupModel(uint8_t i_fileSrc)
}
#if defined(PCBSKY9X)
strcpy(statusLineMsg, PSTR("File "));
strcpy(statusLineMsg, "File ");
strcpy(statusLineMsg+5, &buf[sizeof(MODELS_PATH)]);
#endif
+5 -5
View File
@@ -450,7 +450,7 @@ const pm_char * eeBackupModel(uint8_t i_fileSrc)
logsClose();
// check and create folder here
strcpy_P(buf, STR_MODELS_PATH);
strcpy(buf, STR_MODELS_PATH);
const char * error = sdCheckAndCreateDirectory(buf);
if (error) {
return error;
@@ -476,7 +476,7 @@ const pm_char * eeBackupModel(uint8_t i_fileSrc)
if (len == 0) {
uint8_t num = i_fileSrc + 1;
strcpy_P(&buf[sizeof(MODELS_PATH)], STR_MODEL);
strcpy(&buf[sizeof(MODELS_PATH)], STR_MODEL);
buf[sizeof(MODELS_PATH) + PSIZE(TR_MODEL)] = (char)((num / 10) + '0');
buf[sizeof(MODELS_PATH) + PSIZE(TR_MODEL) + 1] = (char)((num % 10) + '0');
len = sizeof(MODELS_PATH) + PSIZE(TR_MODEL) + 2;
@@ -487,7 +487,7 @@ const pm_char * eeBackupModel(uint8_t i_fileSrc)
len = tmp - buf;
#endif
strcpy_P(&buf[len], STR_MODELS_EXT);
strcpy(&buf[len], STR_MODELS_EXT);
#ifdef SIMU
TRACE("SD-card backup filename=%s", buf);
@@ -532,10 +532,10 @@ const pm_char * eeRestoreModel(uint8_t i_fileDst, char *model_name)
// we must close the logs as we reuse the same FIL structure
logsClose();
strcpy_P(buf, STR_MODELS_PATH);
strcpy(buf, STR_MODELS_PATH);
buf[sizeof(MODELS_PATH)-1] = '/';
strcpy(&buf[sizeof(MODELS_PATH)], model_name);
strcpy_P(&buf[strlen(buf)], STR_MODELS_EXT);
strcpy(&buf[strlen(buf)], STR_MODELS_EXT);
FRESULT result = f_open(&g_oLogFile, buf, FA_OPEN_EXISTING | FA_READ);
if (result != FR_OK) {