From 73b897c73f93047e72d54ec544fa0f6aef972599 Mon Sep 17 00:00:00 2001 From: "andreas.larsson" Date: Mon, 25 Sep 2017 16:47:38 +0200 Subject: [PATCH] Moved STDIO_UART defines to targets.json for UBLOX_EVK_ODIN_W2 instead of hardcoded. --- .../PeripheralNames.h | 4 ---- targets/targets.json | 19 ++++++++++++++++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_UBLOX_EVK_ODIN_W2/PeripheralNames.h b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_UBLOX_EVK_ODIN_W2/PeripheralNames.h index fb1cdab06b6..3a7aa557b6d 100644 --- a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_UBLOX_EVK_ODIN_W2/PeripheralNames.h +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_UBLOX_EVK_ODIN_W2/PeripheralNames.h @@ -57,10 +57,6 @@ typedef enum { UART_8 = (int)UART8_BASE } UARTName; -#define STDIO_UART_TX PA_9 -#define STDIO_UART_RX PA_10 -#define STDIO_UART UART_1 - typedef enum { SPI_1 = (int)SPI1_BASE, SPI_2 = (int)SPI2_BASE, diff --git a/targets/targets.json b/targets/targets.json index c9ae0ea0a0a..952bf8b24a9 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -1700,7 +1700,24 @@ "features": ["LWIP"], "release_versions": ["5"], "device_name": "STM32F439ZI", - "bootloader_supported": true + "bootloader_supported": true, + "config": { + "stdio_uart_tx": { + "help": "Value: D8(default) or D1", + "value": "D8", + "macro_name": "STDIO_UART_TX" + }, + "stdio_uart_rx": { + "help": "Value: D2(default) or D0", + "value": "D2", + "macro_name": "STDIO_UART_RX" + }, + "stdio_uart": { + "help": "Value: UART_1(default) or UART_3", + "value": "UART_1", + "macro_name": "STDIO_UART" + } + } }, "UBLOX_C030": { "inherits": ["FAMILY_STM32"],