mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #10328 from kjbracey-arm/stdio_serial_option
Add option to disable default UART consolepull/10053/head
commit
b419cfc3ed
|
@ -12,12 +12,12 @@
|
|||
},
|
||||
|
||||
"stdio-buffered-serial": {
|
||||
"help": "Use UARTSerial driver to obtain buffered serial I/O on stdin/stdout/stderr. If false, unbuffered serial_getc and serial_putc are used directly.",
|
||||
"help": "(Applies if target.console-uart is true.) Use UARTSerial driver to obtain buffered serial I/O on stdin/stdout/stderr. If false, unbuffered serial_getc and serial_putc are used directly.",
|
||||
"value": false
|
||||
},
|
||||
|
||||
"stdio-baud-rate": {
|
||||
"help": "Baud rate for stdio",
|
||||
"help": "(Applies if target.console-uart is true.) Baud rate for stdio",
|
||||
"value": 9600
|
||||
},
|
||||
|
||||
|
|
|
@ -261,7 +261,7 @@ MBED_WEAK FileHandle *mbed::mbed_override_console(int fd)
|
|||
|
||||
static FileHandle *default_console()
|
||||
{
|
||||
#if DEVICE_SERIAL
|
||||
#if MBED_CONF_TARGET_CONSOLE_UART && DEVICE_SERIAL
|
||||
# if MBED_CONF_PLATFORM_STDIO_BUFFERED_SERIAL
|
||||
static UARTSerial console(STDIO_UART_TX, STDIO_UART_RX, MBED_CONF_PLATFORM_STDIO_BAUD_RATE);
|
||||
# if CONSOLE_FLOWCONTROL == CONSOLE_FLOWCONTROL_RTS
|
||||
|
@ -274,7 +274,7 @@ static FileHandle *default_console()
|
|||
# else
|
||||
static DirectSerial console(STDIO_UART_TX, STDIO_UART_RX, MBED_CONF_PLATFORM_STDIO_BAUD_RATE);
|
||||
# endif
|
||||
#else // DEVICE_SERIAL
|
||||
#else // MBED_CONF_TARGET_CONSOLE_UART && DEVICE_SERIAL
|
||||
static Sink console;
|
||||
#endif
|
||||
return &console;
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
"bootloader_supported": false,
|
||||
"static_memory_defines": true,
|
||||
"config": {
|
||||
"console-uart": {
|
||||
"help": "Target has UART console on pins STDIO_UART_TX, STDIO_UART_RX. Value is only significant if target has SERIAL device.",
|
||||
"value": true
|
||||
},
|
||||
"console-uart-flow-control": {
|
||||
"help": "Console hardware flow control. Options: null, RTS, CTS, RTSCTS.",
|
||||
"value": null
|
||||
|
|
Loading…
Reference in New Issue