only enable uart for debug mode
This commit is contained in:
parent
d6ea24685b
commit
44a00db6b9
1 changed files with 7 additions and 2 deletions
|
@ -12,8 +12,13 @@ add_executable(${CMAKE_PROJECT_NAME} ${SOURCES})
|
||||||
pico_set_program_name(${CMAKE_PROJECT_NAME} "gbmanager")
|
pico_set_program_name(${CMAKE_PROJECT_NAME} "gbmanager")
|
||||||
pico_set_program_version(${CMAKE_PROJECT_NAME} ${PROJECT_VERSION})
|
pico_set_program_version(${CMAKE_PROJECT_NAME} ${PROJECT_VERSION})
|
||||||
|
|
||||||
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
pico_enable_stdio_uart(${CMAKE_PROJECT_NAME} 1)
|
pico_enable_stdio_uart(${CMAKE_PROJECT_NAME} 1)
|
||||||
pico_enable_stdio_usb(${CMAKE_PROJECT_NAME} 0)
|
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)
|
pico_generate_pio_header(${CMAKE_PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/ds18b20.pio)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue