diff --git a/bsp_q7s/CMakeLists.txt b/bsp_q7s/CMakeLists.txt index bc027af0..d0ee0800 100644 --- a/bsp_q7s/CMakeLists.txt +++ b/bsp_q7s/CMakeLists.txt @@ -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() diff --git a/bsp_q7s/boardconfig/q7sConfig.h.in b/bsp_q7s/boardconfig/q7sConfig.h.in index 6ee84821..bf509f0d 100644 --- a/bsp_q7s/boardconfig/q7sConfig.h.in +++ b/bsp_q7s/boardconfig/q7sConfig.h.in @@ -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_ */ diff --git a/bsp_q7s/boardtest/CMakeLists.txt b/bsp_q7s/boardtest/CMakeLists.txt index 0599b73f..9a5c0a0a 100644 --- a/bsp_q7s/boardtest/CMakeLists.txt +++ b/bsp_q7s/boardtest/CMakeLists.txt @@ -1,4 +1,5 @@ target_sources(${TARGET_NAME} PRIVATE + FileSystemTest.cpp ) diff --git a/bsp_q7s/boardtest/FileSystemTest.cpp b/bsp_q7s/boardtest/FileSystemTest.cpp new file mode 100644 index 00000000..fa504b0c --- /dev/null +++ b/bsp_q7s/boardtest/FileSystemTest.cpp @@ -0,0 +1,14 @@ +#include "FileSystemTest.h" + +#include +#include + +FileSystemTest::FileSystemTest() { + using namespace std; + SdCard sdCard = SdCard::SDC0; + cout << "SD Card Test for SD card " << static_cast(sdCard) << std::endl; + //std::system("echo Hello World"); +} + +FileSystemTest::~FileSystemTest() { +} diff --git a/bsp_q7s/boardtest/FileSystemTest.h b/bsp_q7s/boardtest/FileSystemTest.h new file mode 100644 index 00000000..907c86ca --- /dev/null +++ b/bsp_q7s/boardtest/FileSystemTest.h @@ -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_ */ diff --git a/bsp_q7s/simple/simple.cpp b/bsp_q7s/simple/simple.cpp index 6261bfe3..cc85c04f 100644 --- a/bsp_q7s/simple/simple.cpp +++ b/bsp_q7s/simple/simple.cpp @@ -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; } +