Skip to content

Commit

Permalink
Fix USB stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc committed Dec 5, 2024
1 parent 55cbfc8 commit d5789b5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion examples/rpi_pico/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@ if(ZENOH_USB_UART)
tinyusb_device
tinyusb_board
)
set(USB_INCLUDE
${CMAKE_CURRENT_LIST_DIR}/include/tusb
)
else()
set(USB_LIBS "")
set(USB_INCLUDE "")
endif()

add_compile_definitions(LWIP_TIMEVAL_PRIVATE=0)
Expand Down Expand Up @@ -103,6 +107,7 @@ target_link_libraries(zenohpico_static
target_include_directories(zenohpico_static PRIVATE
${CMAKE_CURRENT_LIST_DIR}
${CMAKE_CURRENT_LIST_DIR}/include
${USB_INCLUDE}
)

add_library(main STATIC main.c)
Expand All @@ -116,7 +121,6 @@ target_link_libraries(main
pico_rand
FreeRTOS-Kernel-Heap4
${WIFI_LIB}
${USB_LIBS}
)

function(add_example name)
Expand All @@ -134,6 +138,7 @@ function(add_example name)
target_include_directories(${name} PRIVATE
${CMAKE_CURRENT_LIST_DIR}
${CMAKE_CURRENT_LIST_DIR}/include
${USB_INCLUDE}
)
if(ZENOH_USB_UART)
pico_enable_stdio_uart(${name} 1)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/rpi_pico/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void print_ip_address() {

void main_task(void *params) {
(void)params;

vTaskDelay(pdMS_TO_TICKS(1000));
#if WIFI_SUPPORT_ENABLED
if (cyw43_arch_init()) {
printf("Failed to initialise\n");
Expand Down

0 comments on commit d5789b5

Please sign in to comment.