File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 4040#define BUTTON_BOOTSEL
4141#define BUTTON_STATE_ACTIVE 0
4242
43- #if defined(PICO_DEFAULT_UART_TX_PIN ) && defined(PICO_DEFAULT_UART_RX_PIN ) && defined(PICO_DEFAULT_UART )
43+ #if defined(PICO_DEFAULT_UART_TX_PIN ) && defined(PICO_DEFAULT_UART_RX_PIN ) && \
44+ defined(PICO_DEFAULT_UART ) && defined(LIB_PICO_STDIO_UART )
4445#define UART_DEV PICO_DEFAULT_UART
4546#define UART_TX_PIN PICO_DEFAULT_UART_TX_PIN
4647#define UART_RX_PIN PICO_DEFAULT_UART_RX_PIN
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ void stdio_rtt_init(void)
115115
116116#endif
117117
118- #if defined(UART_DEV ) && defined( LIB_PICO_STDIO_UART )
118+ #if defined(UART_DEV )
119119static uart_inst_t * uart_inst ;
120120#endif
121121
@@ -148,7 +148,7 @@ void board_init(void)
148148#ifndef BUTTON_BOOTSEL
149149#endif
150150
151- #if defined(UART_DEV ) && defined( LIB_PICO_STDIO_UART )
151+ #if defined(UART_DEV )
152152 bi_decl (bi_2pins_with_func (UART_TX_PIN , UART_TX_PIN , GPIO_FUNC_UART ));
153153 uart_inst = uart_get_instance (UART_DEV );
154154 stdio_uart_init_full (uart_inst , CFG_BOARD_UART_BAUDRATE , UART_TX_PIN , UART_RX_PIN );
@@ -191,7 +191,7 @@ uint32_t board_button_read(void)
191191
192192int board_uart_read (uint8_t * buf , int len )
193193{
194- #if defined(UART_DEV ) && defined( LIB_PICO_STDIO_UART )
194+ #if defined(UART_DEV )
195195 int count = 0 ;
196196 while ( (count < len ) && uart_is_readable (uart_inst ) )
197197 {
@@ -207,7 +207,7 @@ int board_uart_read(uint8_t* buf, int len)
207207
208208int board_uart_write (void const * buf , int len )
209209{
210- #if defined(UART_DEV ) && defined( LIB_PICO_STDIO_UART )
210+ #if defined(UART_DEV )
211211 char const * bufch = (char const * ) buf ;
212212 for (int i = 0 ;i < len ;i ++ ) {
213213 uart_putc (uart_inst , bufch [i ]);
You can’t perform that action at this time.
0 commit comments