only enable uart for debug mode

This commit is contained in:
Martin Brodbeck 2022-06-01 21:36:10 +02:00
parent d6ea24685b
commit 44a00db6b9

View file

@ -12,8 +12,13 @@ add_executable(${CMAKE_PROJECT_NAME} ${SOURCES})
pico_set_program_name(${CMAKE_PROJECT_NAME} "gbmanager")
pico_set_program_version(${CMAKE_PROJECT_NAME} ${PROJECT_VERSION})
pico_enable_stdio_uart(${CMAKE_PROJECT_NAME} 1)
pico_enable_stdio_usb(${CMAKE_PROJECT_NAME} 0)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
pico_enable_stdio_uart(${CMAKE_PROJECT_NAME} 1)
pico_enable_stdio_usb(${CMAKE_PROJECT_NAME} 0)
else()
pico_enable_stdio_uart(${CMAKE_PROJECT_NAME} 0)
pico_enable_stdio_usb(${CMAKE_PROJECT_NAME} 0)
endif()
pico_generate_pio_header(${CMAKE_PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/ds18b20.pio)