Skip to content

Commit 500deb8

Browse files
DannyRay019Rbb666
authored andcommitted
bsp:k230:add pdma support for uart driver
Added pdma support for uart driver and a test file test_uart.c. The test uses pdma to improve uart send speed, to check if the driver works correctly. Signed-off-by: XU HU [email protected]
1 parent 5b88f59 commit 500deb8

File tree

7 files changed

+538
-67
lines changed

7 files changed

+538
-67
lines changed

bsp/k230/.config

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ CONFIG_RT_KLIBC_USING_VSNPRINTF_LOG10_TAYLOR_TERMS=4
114114
#
115115
# CONFIG_RT_KLIBC_USING_USER_STRNLEN is not set
116116
# end of rt_strnlen options
117-
118-
# CONFIG_RT_UTEST_TC_USING_KLIBC is not set
119117
# end of klibc options
120118

121119
CONFIG_RT_NAME_MAX=16
@@ -192,7 +190,7 @@ CONFIG_RT_USING_DEVICE_OPS=y
192190
# CONFIG_RT_USING_THREADSAFE_PRINTF is not set
193191
CONFIG_RT_USING_CONSOLE=y
194192
CONFIG_RT_CONSOLEBUF_SIZE=256
195-
CONFIG_RT_CONSOLE_DEVICE_NAME="uart"
193+
CONFIG_RT_CONSOLE_DEVICE_NAME="uart0"
196194
CONFIG_RT_VER_NUM=0x50201
197195
CONFIG_RT_USING_STDC_ATOMIC=y
198196
CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32
@@ -1593,6 +1591,13 @@ CONFIG_PKG_ZLIB_VER="latest"
15931591
#
15941592
# CONFIG_BSP_USING_ADC is not set
15951593
# CONFIG_BSP_USING_TS is not set
1594+
CONFIG_BSP_USING_UART=y
1595+
CONFIG_BSP_UART_USING_DMA=y
1596+
CONFIG_BSP_USING_UART0=y
1597+
# CONFIG_BSP_USING_UART1 is not set
1598+
# CONFIG_BSP_USING_UART2 is not set
1599+
# CONFIG_BSP_USING_UART3 is not set
1600+
# CONFIG_BSP_USING_UART4 is not set
15961601
# CONFIG_BSP_USING_PWM is not set
15971602
CONFIG_BSP_USING_HARDLOCK=y
15981603
CONFIG_BSP_USING_SDIO=y

bsp/k230/board/Kconfig

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,37 @@ menu "Drivers Configuration"
1010
select RT_USING_TS
1111
default n
1212

13+
menuconfig BSP_USING_UART
14+
bool "Enable UART"
15+
select RT_USING_UART
16+
default y
17+
18+
if BSP_USING_UART
19+
config BSP_UART_USING_DMA
20+
bool "Enable UART with DMA"
21+
default y
22+
23+
config BSP_USING_UART0
24+
bool "Enable UART0"
25+
default y
26+
27+
config BSP_USING_UART1
28+
bool "Enable UART1"
29+
default n
30+
31+
config BSP_USING_UART2
32+
bool "Enable UART2"
33+
default n
34+
35+
config BSP_USING_UART3
36+
bool "Enable UART3"
37+
default n
38+
39+
config BSP_USING_UART4
40+
bool "Enable UART4"
41+
default n
42+
endif
43+
1344
menuconfig BSP_USING_PWM
1445
bool "Enable PWM"
1546
select RT_USING_PWM

0 commit comments

Comments
 (0)