diff --git a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/PeripheralNames.h b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/PeripheralNames.h index 0fe6da592e..a417d4cf63 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/PeripheralNames.h +++ b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/PeripheralNames.h @@ -45,8 +45,14 @@ extern "C" { #endif +#ifndef STDIO_UART_TX #define STDIO_UART_TX TX_PIN_NUMBER +#endif + +#ifndef STDIO_UART_RX #define STDIO_UART_RX RX_PIN_NUMBER +#endif + #define STDIO_UART UART_0 typedef enum { diff --git a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52840/PeripheralNames.h b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52840/PeripheralNames.h index 87d1983478..116c1e89d9 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52840/PeripheralNames.h +++ b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52840/PeripheralNames.h @@ -45,8 +45,14 @@ extern "C" { #endif +#ifndef STDIO_UART_TX #define STDIO_UART_TX TX_PIN_NUMBER +#endif + +#ifndef STDIO_UART_RX #define STDIO_UART_RX RX_PIN_NUMBER +#endif + #define STDIO_UART UART_0 typedef enum