diff options
| author | hathach <[email protected]> | 2023-06-27 15:45:38 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2023-06-27 15:45:38 +0700 |
| commit | e43387abaca2044f96017481ccb00b3b68dbdc2a (patch) | |
| tree | b68c583e2c1487e4c5f82723c0b76faf52a89224 /examples/typec | |
| parent | bc0d6c7e92f15ba696c795f9f50b308a2281a468 (diff) | |
rework cmake with rtos support add RTOS to family_configure_device/host/dual_example()
Diffstat (limited to 'examples/typec')
| -rw-r--r-- | examples/typec/power_delivery/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | examples/typec/power_delivery/src/tusb_config.h | 14 |
2 files changed, 12 insertions, 8 deletions
diff --git a/examples/typec/power_delivery/CMakeLists.txt b/examples/typec/power_delivery/CMakeLists.txt index 4ab8d5a65..012eff095 100644 --- a/examples/typec/power_delivery/CMakeLists.txt +++ b/examples/typec/power_delivery/CMakeLists.txt @@ -27,6 +27,6 @@ target_include_directories(${PROJECT} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src ) -# Configure compilation flags and libraries for the example... see the corresponding function -# in hw/bsp/FAMILY/family.cmake for details. -family_configure_device_example(${PROJECT}) +# Configure compilation flags and libraries for the example without RTOS. +# See the corresponding function in hw/bsp/FAMILY/family.cmake for details. +family_configure_device_example(${PROJECT} noos) diff --git a/examples/typec/power_delivery/src/tusb_config.h b/examples/typec/power_delivery/src/tusb_config.h index deddcbfa4..f7cb3cc04 100644 --- a/examples/typec/power_delivery/src/tusb_config.h +++ b/examples/typec/power_delivery/src/tusb_config.h @@ -30,11 +30,6 @@ extern "C" { #endif -// special example that doesn't enable device or host stack -// This can cause some TinyUSB API missing, this define hack to allow us to fill those API -// to pass the compilation process -#define tud_int_handler(x) - //-------------------------------------------------------------------- // COMMON CONFIGURATION //-------------------------------------------------------------------- @@ -54,6 +49,15 @@ // Enable TYPEC stack #define CFG_TUC_ENABLED 1 + +// special example that doesn't enable device or host stack +// This can cause some TinyUSB API missing, this define hack to allow us to fill those API +// to pass the compilation process +#if CFG_TUD_ENABLED == 0 +#define tud_int_handler(x) +#endif + + // CFG_TUSB_DEBUG is defined by compiler in DEBUG build // #define CFG_TUSB_DEBUG 0 |
