File tree Expand file tree Collapse file tree 3 files changed +59
-4
lines changed
TARGET_NUVOTON/TARGET_M261 Expand file tree Collapse file tree 3 files changed +59
-4
lines changed Original file line number Diff line number Diff line change 19
19
#define MBED_PERIPHERALNAMES_H
20
20
21
21
#include "cmsis.h"
22
+ #include "PinNames.h"
22
23
23
24
#ifdef __cplusplus
24
25
extern "C" {
@@ -80,7 +81,16 @@ typedef enum {
80
81
UART_4 = (int ) NU_MODNAME (UART4_BASE , 4 , 0 ),
81
82
UART_5 = (int ) NU_MODNAME (UART5_BASE , 5 , 0 ),
82
83
// NOTE: board-specific
83
- STDIO_UART = UART_0
84
+ #if defined(MBED_CONF_TARGET_USB_UART )
85
+ USB_UART = MBED_CONF_TARGET_USB_UART ,
86
+ #else
87
+ USB_UART = NC ,
88
+ #endif
89
+ #if defined(MBED_CONF_TARGET_STDIO_UART )
90
+ STDIO_UART = MBED_CONF_TARGET_STDIO_UART
91
+ #else
92
+ STDIO_UART = USB_UART
93
+ #endif
84
94
85
95
} UARTName ;
86
96
Original file line number Diff line number Diff line change @@ -113,10 +113,26 @@ typedef enum {
113
113
// Other board-specific naming
114
114
115
115
// UART naming
116
- USBTX = PB_13 ,
117
- USBRX = PB_12 ,
116
+ #if defined(MBED_CONF_TARGET_USB_UART_TX )
117
+ USBTX = MBED_CONF_TARGET_USB_UART_TX ,
118
+ #else
119
+ USBTX = NC ,
120
+ #endif
121
+ #if defined(MBED_CONF_TARGET_USB_UART_RX )
122
+ USBRX = MBED_CONF_TARGET_USB_UART_RX ,
123
+ #else
124
+ USBRX = NC ,
125
+ #endif
126
+ #if defined(MBED_CONF_TARGET_STDIO_UART_TX )
127
+ STDIO_UART_TX = MBED_CONF_TARGET_STDIO_UART_TX ,
128
+ #else
118
129
STDIO_UART_TX = USBTX ,
130
+ #endif
131
+ #if defined(MBED_CONF_TARGET_STDIO_UART_RX )
132
+ STDIO_UART_RX = MBED_CONF_TARGET_STDIO_UART_RX ,
133
+ #else
119
134
STDIO_UART_RX = USBRX ,
135
+ #endif
120
136
SERIAL_TX = D1 ,
121
137
SERIAL_RX = D0 ,
122
138
Original file line number Diff line number Diff line change 14732
14732
" IAR"
14733
14733
],
14734
14734
"config" : {
14735
+ "usb-uart" : {
14736
+ "help" : " Configure USB_UART. USB_UART and USB_UART_TX/USB_UART_RX must be consistent." ,
14737
+ "value" : null
14738
+ },
14739
+ "usb-uart-tx" : {
14740
+ "help" : " Configure USBTX. USB_UART and USBTX/USBRX must be consistent." ,
14741
+ "value" : null
14742
+ },
14743
+ "usb-uart-rx" : {
14744
+ "help" : " Configure USBRX. USB_UART and USBTX/USBRX must be consistent." ,
14745
+ "value" : null
14746
+ },
14747
+ "stdio-uart" : {
14748
+ "help" : " Configure STDIO_UART. STDIO_UART and STDIO_UART_TX/STDIO_UART_RX must be consistent. STDIO_UART defaults to USB_UART." ,
14749
+ "value" : null
14750
+ },
14751
+ "stdio-uart-tx" : {
14752
+ "help" : " Configure STDIO_UART_TX. STDIO_UART and STDIO_UART_TX/STDIO_UART_RX must be consistent. STDIO_UART_TX defaults to USBTX." ,
14753
+ "value" : null
14754
+ },
14755
+ "stdio-uart-rx" : {
14756
+ "help" : " Configure STDIO_UART_RX. STDIO_UART and STDIO_UART_TX/STDIO_UART_RX must be consistent. STDIO_UART_RX defaults to USBRX." ,
14757
+ "value" : null
14758
+ },
14735
14759
"gpio-irq-debounce-enable" : {
14736
14760
"help" : " Enable GPIO IRQ debounce" ,
14737
14761
"value" : 0
14799
14823
"device_name" : " M263KIAAE" ,
14800
14824
"detect_code" : [
14801
14825
" 1310"
14802
- ]
14826
+ ],
14827
+ "overrides" : {
14828
+ "usb-uart" : " UART_0" ,
14829
+ "usb-uart-tx" : " PB_13" ,
14830
+ "usb-uart-rx" : " PB_12"
14831
+ }
14803
14832
},
14804
14833
"NUCLEO_G071RB" : {
14805
14834
"inherits" : [
You can’t perform that action at this time.
0 commit comments