diff options
| author | HiFiPhile <[email protected]> | 2026-03-06 15:23:32 +0100 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2026-03-06 15:23:32 +0100 |
| commit | 860f0e01f21891691185daf048f669ac9797a05a (patch) | |
| tree | 8e082381198b2fa97d518672ad34905b9575b4aa /examples/host/bare_api | |
| parent | 5e49aa8e4d44a8a99a73e8faded2099c82ca023d (diff) | |
| parent | 06a4c6d7190ef83f76b2a65496f2a48a54a8c134 (diff) | |
Merge remote-tracking branch 'tinyusb/master' into hcd_ip3516
Signed-off-by: HiFiPhile <[email protected]>
Diffstat (limited to 'examples/host/bare_api')
| -rw-r--r-- | examples/host/bare_api/CMakeLists.txt | 15 | ||||
| -rw-r--r-- | examples/host/bare_api/only.txt | 19 | ||||
| -rw-r--r-- | examples/host/bare_api/src/main.c | 4 |
3 files changed, 20 insertions, 18 deletions
diff --git a/examples/host/bare_api/CMakeLists.txt b/examples/host/bare_api/CMakeLists.txt index 0efe84b60..4993f93b9 100644 --- a/examples/host/bare_api/CMakeLists.txt +++ b/examples/host/bare_api/CMakeLists.txt @@ -2,31 +2,28 @@ cmake_minimum_required(VERSION 3.20) include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake) -# gets PROJECT name for the example -family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR}) - -project(${PROJECT} C CXX ASM) +project(bare_api C CXX ASM) # Checks this example is valid for the family and initializes the project -family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR}) +family_initialize_project(${PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}) # Espressif has its own cmake build system if(FAMILY STREQUAL "espressif") return() endif() -add_executable(${PROJECT}) +add_executable(${PROJECT_NAME}) # Example source -target_sources(${PROJECT} PUBLIC +target_sources(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/main.c ) # Example include -target_include_directories(${PROJECT} PUBLIC +target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src ) # Configure compilation flags and libraries for the example without RTOS. # See the corresponding function in hw/bsp/FAMILY/family.cmake for details. -family_configure_host_example(${PROJECT} noos) +family_configure_host_example(${PROJECT_NAME} noos) diff --git a/examples/host/bare_api/only.txt b/examples/host/bare_api/only.txt index 31b35f7b9..1ddfc2b5c 100644 --- a/examples/host/bare_api/only.txt +++ b/examples/host/bare_api/only.txt @@ -1,3 +1,6 @@ +family:hpmicro +family:samd21 +family:samd5x_e5x mcu:CH32V20X mcu:KINETIS_KL mcu:LPC175X_6X @@ -7,18 +10,22 @@ mcu:LPC40XX mcu:LPC43XX mcu:LPC54 mcu:LPC55 -mcu:MIMXRT1XXX +mcu:MAX3421 mcu:MIMXRT10XX mcu:MIMXRT11XX -mcu:RP2040 +mcu:MIMXRT1XXX mcu:MSP432E4 -mcu:RX65X mcu:RAXXX -mcu:MAX3421 +mcu:RP2040 +mcu:RW61X +mcu:RX65X +mcu:STM32C0 mcu:STM32F4 mcu:STM32F7 +mcu:STM32G0 +mcu:STM32H5 mcu:STM32H7 mcu:STM32H7RS mcu:STM32N6 -family:samd21 -family:samd5x_e5x +mcu:STM32U3 +mcu:STM32U5 diff --git a/examples/host/bare_api/src/main.c b/examples/host/bare_api/src/main.c index 5945b26fc..87f612588 100644 --- a/examples/host/bare_api/src/main.c +++ b/examples/host/bare_api/src/main.c @@ -76,8 +76,6 @@ int main(void) { tuh_task(); led_blinking_task(); } - - return 0; } /*------------- TinyUSB Callbacks -------------*/ @@ -335,7 +333,7 @@ void led_blinking_task(void) { static bool led_state = false; // Blink every interval ms - if (board_millis() - start_ms < interval_ms) { + if (tusb_time_millis_api() - start_ms < interval_ms) { return; // not enough time } start_ms += interval_ms; |
