added file system test

This commit is contained in:
Robin Müller 2021-06-30 16:15:46 +02:00
parent 21e740258e
commit 13b50e8721
No known key found for this signature in database
GPG Key ID: 9C287E88FED11DF3
6 changed files with 48 additions and 1 deletions

View File

@ -2,12 +2,13 @@ target_sources(${TARGET_NAME} PUBLIC
main.cpp
)
add_subdirectory(boardtest)
if(Q7S_SIMPLE_MODE)
add_subdirectory(simple)
else()
add_subdirectory(boardconfig)
add_subdirectory(comIF)
add_subdirectory(boardtest)
add_subdirectory(gpio)
add_subdirectory(core)
endif()

View File

@ -11,4 +11,6 @@
#define Q7S_ADD_SPI_TEST 0
#endif
#define Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST 0
#endif /* BSP_Q7S_BOARDCONFIG_Q7S_CONFIG_H_ */

View File

@ -1,4 +1,5 @@
target_sources(${TARGET_NAME} PRIVATE
FileSystemTest.cpp
)

View File

@ -0,0 +1,14 @@
#include "FileSystemTest.h"
#include <iostream>
#include <cstdlib>
FileSystemTest::FileSystemTest() {
using namespace std;
SdCard sdCard = SdCard::SDC0;
cout << "SD Card Test for SD card " << static_cast<int>(sdCard) << std::endl;
//std::system("echo Hello World");
}
FileSystemTest::~FileSystemTest() {
}

View File

@ -0,0 +1,18 @@
#ifndef BSP_Q7S_BOARDTEST_FILESYSTEMTEST_H_
#define BSP_Q7S_BOARDTEST_FILESYSTEMTEST_H_
enum SdCard {
SDC0,
SDC1
};
class FileSystemTest {
public:
FileSystemTest();
virtual~ FileSystemTest();
private:
};
#endif /* BSP_Q7S_BOARDTEST_FILESYSTEMTEST_H_ */

View File

@ -1,5 +1,16 @@
#include "simple.h"
#include "q7sConfig.h"
#if Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST == 1
#include "../boardtest/FileSystemTest.h"
#endif
int simple::simple() {
#if Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST == 1
{
FileSystemTest fileSystemTest;
}
#endif
return 0;
}