blob: 956716606ca96d26c0ab420e68379d268156291d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
diff --git a/hw/bsp/rp2040/family.c b/hw/bsp/rp2040/family.c
index 90e2192c0..6a2735eaf 100644
--- a/hw/bsp/rp2040/family.c
+++ b/hw/bsp/rp2040/family.c
@@ -118,7 +118,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
@@ -188,7 +188,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)
for(int i=0;i<len;i++) {
buf[i] = uart_getc(uart_inst);
}
@@ -201,7 +201,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]);
|