Merge pull request #15457 from chrJost/Console_Pin_Checks

STM32: disable CONSOLE_* checks in for serial if no console available
pull/15459/head
Martin Kojtal 2023-10-18 11:48:44 +01:00 committed by GitHub
commit 1a036c29fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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};