mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #418 from lionleaf/master
Bugfix: Make redirected stdio write initialize UARTpull/423/head
commit
dd71fab893
|
@ -227,6 +227,7 @@ extern "C" int PREFIX(_read)(FILEHANDLE fh, unsigned char *buffer, unsigned int
|
||||||
if (fh < 3) {
|
if (fh < 3) {
|
||||||
// only read a character at a time from stdin
|
// only read a character at a time from stdin
|
||||||
#if DEVICE_SERIAL
|
#if DEVICE_SERIAL
|
||||||
|
if (!stdio_uart_inited) init_serial();
|
||||||
*buffer = serial_getc(&stdio_uart);
|
*buffer = serial_getc(&stdio_uart);
|
||||||
#endif
|
#endif
|
||||||
n = 1;
|
n = 1;
|
||||||
|
|
Loading…
Reference in New Issue