TS SD integration #1653

This commit is contained in:
rusefi 2020-08-02 22:31:11 -04:00
parent 7bd74d3c52
commit 10b8da525d
4 changed files with 40 additions and 9 deletions

View File

@ -777,6 +777,14 @@ int tunerStudioHandleCrcCommand(ts_channel_s *tsChannel, char *data, int incomin
case TS_GET_FIRMWARE_VERSION:
handleGetVersion(tsChannel, TS_CRC);
break;
#if EFI_FILE_LOGGING
case TS_SD_R_COMMAND:
handleTsR(data);
break;
case TS_SD_W_COMMAND:
handleTsW(data);
break;
#endif //EFI_FILE_LOGGING
case TS_GET_TEXT:
handleGetText(tsChannel);
break;

View File

@ -28,6 +28,7 @@ HW_LAYER_EMS_CPP = $(HW_LAYER_EGT_CPP) \
$(PROJECT_DIR)/hw_layer/smart_gpio.cpp \
$(PROJECT_DIR)/hw_layer/neo6m.cpp \
$(PROJECT_DIR)/hw_layer/mmc_card.cpp \
$(PROJECT_DIR)/hw_layer/mmc_card_access.cpp \
$(PROJECT_DIR)/hw_layer/lcd/lcd_HD44780.cpp \
$(PROJECT_DIR)/hw_layer/adc/adc_inputs.cpp \
$(PROJECT_DIR)/hw_layer/adc/adc_subscription.cpp \

View File

@ -9,18 +9,11 @@
#pragma once
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
void initMmcCard(void);
bool isSdCardAlive(void);
void appendToLog(const char *line, size_t length);
void readLogFileContent(char *buffer, short fileId, short offset, short length);
#ifdef __cplusplus
}
#endif /* __cplusplus */
void handleTsR(char *input);
void handleTsW(char *input);

View File

@ -0,0 +1,29 @@
/**
* @file mmc_card_access.cpp
*
*/
#include "global.h"
#if EFI_FILE_LOGGING
#include "mmc_card.h"
extern LoggingWithStorage sharedLogger;
static char *buffer[2048];
void handleTsR(char *input) {
if (input[1] == 0 && input[2] == 7) {
scheduleMsg(&sharedLogger, "TS_SD: RTC read command");
memset(buffer, 0, 9);
}
}
void handleTsW(char *input) {
}
#endif // EFI_FILE_LOGGING