Skip to content

Commit 1d3e59a

Browse files
authored
Merge pull request #6275 from marcuschangarm/fix-uart-init
NRF52: Customize STDIO pins from config system
2 parents e7fde46 + 812b9be commit 1d3e59a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/PeripheralNames.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,14 @@
4545
extern "C" {
4646
#endif
4747

48+
#ifndef STDIO_UART_TX
4849
#define STDIO_UART_TX TX_PIN_NUMBER
50+
#endif
51+
52+
#ifndef STDIO_UART_RX
4953
#define STDIO_UART_RX RX_PIN_NUMBER
54+
#endif
55+
5056
#define STDIO_UART UART_0
5157

5258
typedef enum {

targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52840/PeripheralNames.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,14 @@
4545
extern "C" {
4646
#endif
4747

48+
#ifndef STDIO_UART_TX
4849
#define STDIO_UART_TX TX_PIN_NUMBER
50+
#endif
51+
52+
#ifndef STDIO_UART_RX
4953
#define STDIO_UART_RX RX_PIN_NUMBER
54+
#endif
55+
5056
#define STDIO_UART UART_0
5157

5258
typedef enum

0 commit comments

Comments
 (0)