Skip to content

Commit 120c9ad

Browse files
andreas.larssonAndreas Larsson
authored andcommitted
Moved STDIO_UART defines to targets.json for UBLOX_EVK_ODIN_W2 instead of hardcoded.
1 parent cc0b3d0 commit 120c9ad

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_UBLOX_EVK_ODIN_W2/PeripheralNames.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ typedef enum {
5757
UART_8 = (int)UART8_BASE
5858
} UARTName;
5959

60-
#define STDIO_UART_TX PA_9
61-
#define STDIO_UART_RX PA_10
62-
#define STDIO_UART UART_1
60+
#define STDIO_UART_TX USBTX
61+
#define STDIO_UART_RX USBRX
6362

6463
typedef enum {
6564
SPI_1 = (int)SPI1_BASE,

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_UBLOX_EVK_ODIN_W2/PinNames.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ typedef enum {
166166
BUTTON2 = SW1,
167167

168168
// ST-Link
169-
USBRX = PA_10,
170-
USBTX = PA_9,
169+
USBRX = MBED_CONF_TARGET_USB_RX,
170+
USBTX = MBED_CONF_TARGET_USB_TX,
171171
SWDIO = PA_15,
172172
SWCLK = PA_14,
173173
NTRST = PB_4,

targets/targets.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1701,7 +1701,22 @@
17011701
"features": ["LWIP"],
17021702
"release_versions": ["5"],
17031703
"device_name": "STM32F439ZI",
1704-
"bootloader_supported": true
1704+
"bootloader_supported": true,
1705+
"config": {
1706+
"usb_tx": {
1707+
"help": "Value: D8(default) or D1",
1708+
"value": "D8"
1709+
},
1710+
"usb_rx": {
1711+
"help": "Value: D2(default) or D0",
1712+
"value": "D2"
1713+
},
1714+
"stdio_uart": {
1715+
"help": "Value: UART_1(default) or UART_3",
1716+
"value": "UART_1",
1717+
"macro_name": "STDIO_UART"
1718+
}
1719+
}
17051720
},
17061721
"UBLOX_C030": {
17071722
"inherits": ["FAMILY_STM32"],

0 commit comments

Comments
 (0)