mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-29 10:20:57 +00:00
Fix ifdefs for disabled uart stdio in rp2040 family
This commit is contained in:
parent
f4f85bad54
commit
9e7e8908a3
@ -115,7 +115,7 @@ void stdio_rtt_init(void)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef UART_DEV
|
||||
#if defined(UART_DEV) && defined(LIB_PICO_STDIO_UART)
|
||||
static uart_inst_t *uart_inst;
|
||||
#endif
|
||||
|
||||
@ -191,7 +191,7 @@ uint32_t board_button_read(void)
|
||||
|
||||
int board_uart_read(uint8_t* buf, int len)
|
||||
{
|
||||
#ifdef UART_DEV
|
||||
#if defined(UART_DEV) && defined(LIB_PICO_STDIO_UART)
|
||||
int count = 0;
|
||||
while ( (count < len) && uart_is_readable(uart_inst) )
|
||||
{
|
||||
@ -207,7 +207,7 @@ int board_uart_read(uint8_t* buf, int len)
|
||||
|
||||
int board_uart_write(void const * buf, int len)
|
||||
{
|
||||
#ifdef UART_DEV
|
||||
#if defined(UART_DEV) && defined(LIB_PICO_STDIO_UART)
|
||||
char const* bufch = (char const*) buf;
|
||||
for(int i=0;i<len;i++) {
|
||||
uart_putc(uart_inst, bufch[i]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user