Skip to content

Commit

Permalink
Make it easier to configure default baud rate (#1648)
Browse files Browse the repository at this point in the history
To make stdio logging quicker it's probably a good idea to set the default
uart speed 921600, but it's only configurable by adding this define to
your project. Make it configurable from the cmake command line.
  • Loading branch information
peterharperuk authored Jun 21, 2024
1 parent 5118b4a commit 5d36c90
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/rp2_common/hardware_uart/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
pico_simple_hardware_target(uart)

pico_mirrored_target_link_libraries(hardware_uart INTERFACE hardware_resets hardware_clocks)
pico_mirrored_target_link_libraries(hardware_uart INTERFACE hardware_resets hardware_clocks)

# PICO_CONFIG: PICO_DEFAULT_UART_BAUD_RATE, Define the default UART baudrate, max=921600, default=115200, group=hardware_uart
if (PICO_DEFAULT_UART_BAUD_RATE)
target_compile_definitions(hardware_uart INTERFACE
PICO_DEFAULT_UART_BAUD_RATE=${PICO_DEFAULT_UART_BAUD_RATE})
endif()

0 comments on commit 5d36c90

Please sign in to comment.