mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #15457 from chrJost/Console_Pin_Checks
STM32: disable CONSOLE_* checks in for serial if no console availablepull/15459/head
commit
1a036c29fe
|
@ -205,6 +205,7 @@ void serial_init(serial_t *obj, PinName tx, PinName rx)
|
|||
|
||||
uint8_t stdio_config = false;
|
||||
|
||||
#if defined(MBED_CONF_TARGET_CONSOLE_UART)
|
||||
if ((tx == CONSOLE_TX) || (rx == CONSOLE_RX)) {
|
||||
stdio_config = true;
|
||||
} else {
|
||||
|
@ -212,6 +213,7 @@ void serial_init(serial_t *obj, PinName tx, PinName rx)
|
|||
error("Error: new serial object is using same UART as STDIO");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
const serial_pinmap_t explicit_uart_pinmap = {peripheral, tx, tx_function, rx, rx_function, stdio_config};
|
||||
|
||||
|
|
Loading…
Reference in New Issue