Skip to content

Commit

Permalink
Merge pull request #199 from KyleChenjh/lab_serial
Browse files Browse the repository at this point in the history
commit the serial branch [serial & usart]
  • Loading branch information
Guozhanxin authored Apr 30, 2021
2 parents 1f2df62 + 4d0a0f0 commit 450fb40
Show file tree
Hide file tree
Showing 16 changed files with 3,614 additions and 1,877 deletions.
107 changes: 107 additions & 0 deletions libraries/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,113 @@ menu "Onboard Peripheral"
select BSP_USING_UART4
default n

menuconfig BSP_USING_UART
bool "Enable UART"
default y
select RT_USING_SERIAL
if BSP_USING_UART
menuconfig BSP_USING_UART1
bool "Enable UART1"
default n
if BSP_USING_UART1
config BSP_UART1_RX_USING_DMA
bool "Enable UART1 RX DMA"
depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA
default n

config BSP_UART1_TX_USING_DMA
bool "Enable UART1 TX DMA"
depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA
default n

config BSP_UART1_RX_BUFSIZE
int "Set UART1 RX buffer size"
range 0 65535
default 256

config BSP_UART1_TX_BUFSIZE
int "Set UART1 TX buffer size"
range 0 65535
default 256
endif

menuconfig BSP_USING_UART2
bool "Enable UART2"
default n
if BSP_USING_UART2
config BSP_UART2_RX_USING_DMA
bool "Enable UART2 RX DMA"
depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA
default n

config BSP_UART2_TX_USING_DMA
bool "Enable UART2 TX DMA"
depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA
default n

config BSP_UART2_RX_BUFSIZE
int "Set UART2 RX buffer size"
range 64 65535
default 256

config BSP_UART2_TX_BUFSIZE
int "Set UART2 TX buffer size"
range 0 65535
default 256
endif

menuconfig BSP_USING_UART3
bool "Enable UART3"
default n
if BSP_USING_UART3
config BSP_UART3_RX_USING_DMA
bool "Enable UART3 RX DMA"
depends on BSP_USING_UART3 && RT_SERIAL_USING_DMA
default n

config BSP_UART3_TX_USING_DMA
bool "Enable UART3 TX DMA"
depends on BSP_USING_UART3 && RT_SERIAL_USING_DMA
default n

config BSP_UART3_RX_BUFSIZE
int "Set UART3 RX buffer size"
range 64 65535
default 256

config BSP_UART3_TX_BUFSIZE
int "Set UART3 TX buffer size"
range 0 65535
default 256
endif

menuconfig BSP_USING_UART4
bool "Enable UART4"
default y
if BSP_USING_UART4
config BSP_UART4_RX_USING_DMA
bool "Enable UART4 RX DMA"
depends on BSP_USING_UART4 && RT_SERIAL_USING_DMA
default n

config BSP_UART4_TX_USING_DMA
bool "Enable UART4 TX DMA"
depends on BSP_USING_UART4 && RT_SERIAL_USING_DMA
default n

config BSP_UART4_RX_BUFSIZE
int "Set UART4 RX buffer size"
range 64 65535
default 256

config BSP_UART4_TX_BUFSIZE
int "Set UART4 TX buffer size"
range 0 65535
default 0
endif

endif

config BSP_USING_SPI_FLASH
bool "Enable SPI FLASH (spi1)"
select BSP_USING_SPI
Expand Down
Loading

0 comments on commit 450fb40

Please sign in to comment.