mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
Merge pull request #1796 from Sinitax/master
Fix ifdefs for disabled uart stdio in rp2040 family
This commit is contained in:
commit
b66c2d5f0a
@ -40,7 +40,8 @@
|
|||||||
#define BUTTON_BOOTSEL
|
#define BUTTON_BOOTSEL
|
||||||
#define BUTTON_STATE_ACTIVE 0
|
#define BUTTON_STATE_ACTIVE 0
|
||||||
|
|
||||||
#if defined(PICO_DEFAULT_UART_TX_PIN) && defined(PICO_DEFAULT_UART_RX_PIN) && defined(PICO_DEFAULT_UART)
|
#if defined(PICO_DEFAULT_UART_TX_PIN) && defined(PICO_DEFAULT_UART_RX_PIN) && \
|
||||||
|
defined(PICO_DEFAULT_UART) && defined(LIB_PICO_STDIO_UART)
|
||||||
#define UART_DEV PICO_DEFAULT_UART
|
#define UART_DEV PICO_DEFAULT_UART
|
||||||
#define UART_TX_PIN PICO_DEFAULT_UART_TX_PIN
|
#define UART_TX_PIN PICO_DEFAULT_UART_TX_PIN
|
||||||
#define UART_RX_PIN PICO_DEFAULT_UART_RX_PIN
|
#define UART_RX_PIN PICO_DEFAULT_UART_RX_PIN
|
||||||
|
@ -148,7 +148,7 @@ void board_init(void)
|
|||||||
#ifndef BUTTON_BOOTSEL
|
#ifndef BUTTON_BOOTSEL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(UART_DEV) && defined(LIB_PICO_STDIO_UART)
|
#ifdef UART_DEV
|
||||||
bi_decl(bi_2pins_with_func(UART_TX_PIN, UART_TX_PIN, GPIO_FUNC_UART));
|
bi_decl(bi_2pins_with_func(UART_TX_PIN, UART_TX_PIN, GPIO_FUNC_UART));
|
||||||
uart_inst = uart_get_instance(UART_DEV);
|
uart_inst = uart_get_instance(UART_DEV);
|
||||||
stdio_uart_init_full(uart_inst, CFG_BOARD_UART_BAUDRATE, UART_TX_PIN, UART_RX_PIN);
|
stdio_uart_init_full(uart_inst, CFG_BOARD_UART_BAUDRATE, UART_TX_PIN, UART_RX_PIN);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user