Skip to content

Commit 466d37f

Browse files
committed
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 3b93a78 commit 466d37f

File tree

8 files changed

+537
-58
lines changed

8 files changed

+537
-58
lines changed

bsp/k230/.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ CONFIG_RT_USING_DEVICE_OPS=y
192192
# CONFIG_RT_USING_THREADSAFE_PRINTF is not set
193193
CONFIG_RT_USING_CONSOLE=y
194194
CONFIG_RT_CONSOLEBUF_SIZE=256
195-
CONFIG_RT_CONSOLE_DEVICE_NAME="uart"
195+
CONFIG_RT_CONSOLE_DEVICE_NAME="uart0"
196196
CONFIG_RT_VER_NUM=0x50201
197197
CONFIG_RT_USING_STDC_ATOMIC=y
198198
CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32
@@ -1594,6 +1594,7 @@ CONFIG_PKG_ZLIB_VER="latest"
15941594
# CONFIG_BSP_USING_ADC is not set
15951595
# CONFIG_BSP_USING_TS is not set
15961596
# CONFIG_BSP_USING_PWM is not set
1597+
# CONFIG_BSP_USING_UART is not set
15971598
CONFIG_BSP_USING_HARDLOCK=y
15981599
CONFIG_BSP_USING_SDIO=y
15991600
CONFIG_BSP_USING_SDIO0=y

bsp/k230/board/Kconfig

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,37 @@ menu "Drivers Configuration"
2525
default n
2626

2727
endif
28+
29+
menuconfig BSP_USING_UART
30+
bool "Enable UART"
31+
select RT_USING_UART
32+
default n
33+
34+
if BSP_USING_UART
35+
config BSP_UART_USING_DMA
36+
bool "Enable UART with DMA"
37+
default y
38+
39+
config BSP_USING_UART0
40+
bool "Enable UART0"
41+
default y
42+
43+
config BSP_USING_UART1
44+
bool "Enable UART1"
45+
default n
46+
47+
config BSP_USING_UART2
48+
bool "Enable UART2"
49+
default n
50+
51+
config BSP_USING_UART3
52+
bool "Enable UART3"
53+
default n
54+
55+
config BSP_USING_UART4
56+
bool "Enable UART4"
57+
default n
58+
endif
2859

2960
config BSP_USING_HARDLOCK
3061
bool "Enable Hard-Lock"

0 commit comments

Comments
 (0)