Skip to content

Commit 8b638d1

Browse files
committed
修复“multiple definition of `uart_init'”问题。
1 parent 695a586 commit 8b638d1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bsp/k210/driver/drv_uart.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ volatile uart_t* const _uart[3] =
7474
(volatile uart_t*)UART3_BASE_ADDR
7575
};
7676

77-
void uart_init(uart_device_number_t channel)
77+
void _uart_init(uart_device_number_t channel)
7878
{
7979
sysctl_clock_enable(SYSCTL_CLOCK_UART1 + channel);
8080
sysctl_reset(SYSCTL_RESET_UART1 + channel);
@@ -142,7 +142,7 @@ int rt_hw_uart_init(void)
142142
uart->hw_base = UART1_BASE_ADDR;
143143
uart->irqno = IRQN_UART1_INTERRUPT;
144144

145-
uart_init(UART_DEVICE_1);
145+
_uart_init(UART_DEVICE_1);
146146

147147
rt_hw_serial_register(serial,
148148
"uart1",
@@ -166,7 +166,7 @@ int rt_hw_uart_init(void)
166166
uart->hw_base = UART2_BASE_ADDR;
167167
uart->irqno = IRQN_UART2_INTERRUPT;
168168

169-
uart_init(UART_DEVICE_2);
169+
_uart_init(UART_DEVICE_2);
170170

171171
rt_hw_serial_register(serial,
172172
"uart2",
@@ -190,7 +190,7 @@ int rt_hw_uart_init(void)
190190
uart->hw_base = UART3_BASE_ADDR;
191191
uart->irqno = IRQN_UART3_INTERRUPT;
192192

193-
uart_init(UART_DEVICE_3);
193+
_uart_init(UART_DEVICE_3);
194194

195195
rt_hw_serial_register(serial,
196196
"uart3",

0 commit comments

Comments
 (0)