mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-09 20:45:41 +08:00
!21 K210修复uart_init函数重复定义问题
Merge pull request !21 from asd7893361/master
This commit is contained in:
commit
96be278ff7
4 files changed
+164
-271
No files matched your search
+129
-54
File diff suppressed because it is too large.
Load diff
@@ -114,7 +114,7 @@ if BSP_USING_LCD
|
||||
int "CS pin number of 8080 interface"
|
||||
default 6
|
||||
config BSP_LCD_WR_PIN
|
||||
int "DC pin number of 8080 interface"
|
||||
int "WR pin number of 8080 interface"
|
||||
default 7
|
||||
config BSP_LCD_DC_PIN
|
||||
int "DC pin number of 8080 interface"
|
||||
|
||||
@@ -74,7 +74,7 @@ volatile uart_t* const _uart[3] =
|
||||
(volatile uart_t*)UART3_BASE_ADDR
|
||||
};
|
||||
|
||||
void uart_init(uart_device_number_t channel)
|
||||
void _uart_init(uart_device_number_t channel)
|
||||
{
|
||||
sysctl_clock_enable(SYSCTL_CLOCK_UART1 + channel);
|
||||
sysctl_reset(SYSCTL_RESET_UART1 + channel);
|
||||
@@ -142,7 +142,7 @@ int rt_hw_uart_init(void)
|
||||
uart->hw_base = UART1_BASE_ADDR;
|
||||
uart->irqno = IRQN_UART1_INTERRUPT;
|
||||
|
||||
uart_init(UART_DEVICE_1);
|
||||
_uart_init(UART_DEVICE_1);
|
||||
|
||||
rt_hw_serial_register(serial,
|
||||
"uart1",
|
||||
@@ -166,7 +166,7 @@ int rt_hw_uart_init(void)
|
||||
uart->hw_base = UART2_BASE_ADDR;
|
||||
uart->irqno = IRQN_UART2_INTERRUPT;
|
||||
|
||||
uart_init(UART_DEVICE_2);
|
||||
_uart_init(UART_DEVICE_2);
|
||||
|
||||
rt_hw_serial_register(serial,
|
||||
"uart2",
|
||||
@@ -190,7 +190,7 @@ int rt_hw_uart_init(void)
|
||||
uart->hw_base = UART3_BASE_ADDR;
|
||||
uart->irqno = IRQN_UART3_INTERRUPT;
|
||||
|
||||
uart_init(UART_DEVICE_3);
|
||||
_uart_init(UART_DEVICE_3);
|
||||
|
||||
rt_hw_serial_register(serial,
|
||||
"uart3",
|
||||
|
||||
+30
-212
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user