diff options
| author | Ha Thach <[email protected]> | 2020-04-11 15:49:34 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-04-11 15:49:34 +0700 |
| commit | 04a06ec40147f1f44cfee0567667cc97bbe900ee (patch) | |
| tree | e1efa890fa3ceb93e15244ba6e6df3e61c701910 /examples/device/board_test/src | |
| parent | 4748b349a2812fb2e08f7dfd04866afd50acb98f (diff) | |
| parent | 13a3081d308828ae6e4b9a40bb8ac7bf5b0e424c (diff) | |
Merge branch 'master' into refactor-irqhandler
Diffstat (limited to 'examples/device/board_test/src')
| -rw-r--r-- | examples/device/board_test/src/CMakeLists.txt | 15 | ||||
| -rw-r--r-- | examples/device/board_test/src/main.c | 7 | ||||
| -rw-r--r-- | examples/device/board_test/src/tusb_config.h | 5 |
3 files changed, 26 insertions, 1 deletions
diff --git a/examples/device/board_test/src/CMakeLists.txt b/examples/device/board_test/src/CMakeLists.txt new file mode 100644 index 000000000..29ae46a33 --- /dev/null +++ b/examples/device/board_test/src/CMakeLists.txt @@ -0,0 +1,15 @@ +idf_component_register(SRCS "main.c" + INCLUDE_DIRS "." + REQUIRES freertos soc) + +target_compile_options(${COMPONENT_TARGET} PUBLIC + "-DCFG_TUSB_MCU=OPT_MCU_ESP32S2" + "-DCFG_TUSB_OS=OPT_OS_FREERTOS" +) + +idf_component_get_property( FREERTOS_ORIG_INCLUDE_PATH freertos ORIG_INCLUDE_PATH) +target_include_directories(${COMPONENT_TARGET} PUBLIC + "${FREERTOS_ORIG_INCLUDE_PATH}" + "${TOP}/hw" + "${TOP}/src" +) diff --git a/examples/device/board_test/src/main.c b/examples/device/board_test/src/main.c index 584ff799d..71665550f 100644 --- a/examples/device/board_test/src/main.c +++ b/examples/device/board_test/src/main.c @@ -73,3 +73,10 @@ int main(void) return 0; } + +#if CFG_TUSB_MCU == OPT_MCU_ESP32S2 +void app_main(void) +{ + main(); +} +#endif diff --git a/examples/device/board_test/src/tusb_config.h b/examples/device/board_test/src/tusb_config.h index 1a52cc348..0587d48e3 100644 --- a/examples/device/board_test/src/tusb_config.h +++ b/examples/device/board_test/src/tusb_config.h @@ -39,8 +39,11 @@ #error CFG_TUSB_MCU must be defined #endif +#ifndef CFG_TUSB_OS + #define CFG_TUSB_OS OPT_OS_NONE +#endif + #define CFG_TUSB_RHPORT0_MODE OPT_MODE_NONE -#define CFG_TUSB_OS OPT_OS_NONE // CFG_TUSB_DEBUG is defined by compiler in DEBUG build // #define CFG_TUSB_DEBUG 0 |
