From 812b9be6d326385cdd2ca9223e41df21a8e5df4d Mon Sep 17 00:00:00 2001 From: Marcus Chang Date: Mon, 5 Mar 2018 10:12:18 -0800 Subject: [PATCH] NRF5: Customize STDIO pins from config system --- .../TARGET_NRF5/TARGET_MCU_NRF52832/PeripheralNames.h | 6 ++++++ .../TARGET_NRF5/TARGET_MCU_NRF52840/PeripheralNames.h | 6 ++++++ 2 files changed, 12 insertions(+) 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