We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9a06854 + b6dfee0 commit 498bedbCopy full SHA for 498bedb
source/retarget.cpp
@@ -23,6 +23,7 @@
23
#include <errno.h>
24
#include "minar/minar.h"
25
#include "mbed-hal/init_api.h"
26
+#include "mbed-hal/serial_api.h"
27
#include "core_generic.h"
28
29
#if defined(__ARMCC_VERSION)
@@ -101,15 +102,16 @@ FileHandle::~FileHandle() {
101
102
}
103
104
#if DEVICE_SERIAL
-extern int stdio_uart_inited;
105
-extern serial_t stdio_uart;
+static int stdio_uart_inited;
106
+static serial_t stdio_uart;
107
#endif
108
109
static void init_serial() {
110
111
if (stdio_uart_inited) return;
112
serial_init(&stdio_uart, STDIO_UART_TX, STDIO_UART_RX);
113
serial_baud(&stdio_uart, STDIO_DEFAULT_BAUD);
114
+ stdio_uart_inited = 1;
115
116
117
0 commit comments