forked from xuos/xiuos
Optimize k210 serial port driver for nuttx
This commit is contained in:
@@ -8,8 +8,8 @@ if ARCH_BOARD_EDU_RISCV64
|
||||
menuconfig BSP_USING_CH376
|
||||
bool "Using CH376 device"
|
||||
default n
|
||||
select K210_16550_UART
|
||||
select K210_16550_UART3
|
||||
select K210_UART
|
||||
select K210_UART3
|
||||
|
||||
if BSP_USING_CH376
|
||||
|
||||
@@ -40,8 +40,8 @@ menuconfig BSP_USING_TOUCH
|
||||
default n
|
||||
|
||||
menuconfig BSP_USING_CAN
|
||||
select K210_16550_UART
|
||||
select K210_16550_UART1
|
||||
select K210_UART
|
||||
select K210_UART1
|
||||
bool "Using CAN device"
|
||||
default n
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <termios.h>
|
||||
#include <nuttx/ioexpander/gpio.h>
|
||||
#include "k210_uart_16550.h"
|
||||
#include "k210_uart.h"
|
||||
#include "k210_fpioa.h"
|
||||
#include "k210_gpiohs.h"
|
||||
#include "k210_gpio_common.h"
|
||||
|
||||
@@ -95,7 +95,7 @@ int k210_bringup(void)
|
||||
board_touch_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_K210_16550_UART1
|
||||
#ifdef CONFIG_K210_UART1
|
||||
#ifdef CONFIG_ADAPTER_ESP8285_WIFI
|
||||
sysctl_clock_enable(SYSCTL_CLOCK_UART1);
|
||||
sysctl_reset(SYSCTL_RESET_UART1);
|
||||
@@ -121,7 +121,7 @@ int k210_bringup(void)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_K210_16550_UART2
|
||||
#ifdef CONFIG_K210_UART2
|
||||
sysctl_clock_enable(SYSCTL_CLOCK_UART2);
|
||||
sysctl_reset(SYSCTL_RESET_UART2);
|
||||
|
||||
@@ -129,7 +129,7 @@ int k210_bringup(void)
|
||||
fpioa_set_function(GPIO_EC200T_TXD, FPOA_USART2_TX);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_K210_16550_UART3
|
||||
#ifdef CONFIG_K210_UART3
|
||||
sysctl_clock_enable(SYSCTL_CLOCK_UART3);
|
||||
sysctl_reset(SYSCTL_RESET_UART3);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <nuttx/ioexpander/gpio.h>
|
||||
#include "k210_uart_16550.h"
|
||||
#include "k210_uart.h"
|
||||
|
||||
#define ERR_USB_UNKNOWN 0xFA
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ if ARCH_BOARD_XIDATONG_RISCV64
|
||||
menuconfig BSP_USING_CH376
|
||||
bool "Using CH376 device"
|
||||
default n
|
||||
select K210_16550_UART
|
||||
select K210_16550_UART3
|
||||
select K210_UART
|
||||
select K210_UART3
|
||||
|
||||
if BSP_USING_CH376
|
||||
|
||||
@@ -40,8 +40,8 @@ menuconfig BSP_USING_TOUCH
|
||||
default n
|
||||
|
||||
menuconfig BSP_USING_CAN
|
||||
select K210_16550_UART
|
||||
select K210_16550_UART1
|
||||
select K210_UART
|
||||
select K210_UART1
|
||||
bool "Using CAN device"
|
||||
default n
|
||||
|
||||
|
||||
@@ -58,17 +58,17 @@ CONFIG_READLINE_TABCOMPLETION=y
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_DEV_GPIO=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_K210_16550_UART=y
|
||||
CONFIG_K210_16550_UART2=y
|
||||
CONFIG_K210_16550_UART2_BASE=0x50220000
|
||||
CONFIG_K210_16550_UART2_CLOCK=195000000
|
||||
CONFIG_K210_16550_UART2_IRQ=39
|
||||
CONFIG_K210_16550_UART2_BAUD=115200
|
||||
CONFIG_K210_16550_UART2_PARITY=0
|
||||
CONFIG_K210_16550_UART2_BITS=8
|
||||
CONFIG_K210_16550_UART2_2STOP=0
|
||||
CONFIG_K210_16550_UART2_RXBUFSIZE=128
|
||||
CONFIG_K210_16550_UART2_TXBUFSIZE=128
|
||||
CONFIG_K210_UART=y
|
||||
CONFIG_K210_UART2=y
|
||||
CONFIG_K210_UART2_BASE=0x50220000
|
||||
CONFIG_K210_UART2_CLOCK=195000000
|
||||
CONFIG_K210_UART2_IRQ=39
|
||||
CONFIG_K210_UART2_BAUD=115200
|
||||
CONFIG_K210_UART2_PARITY=0
|
||||
CONFIG_K210_UART2_BITS=8
|
||||
CONFIG_K210_UART2_2STOP=0
|
||||
CONFIG_K210_UART2_RXBUFSIZE=128
|
||||
CONFIG_K210_UART2_TXBUFSIZE=128
|
||||
CONFIG_SUPPORT_CONNECTION_FRAMEWORK=y
|
||||
CONFIG_CONNECTION_FRAMEWORK_DEBUG=y
|
||||
CONFIG_CONNECTION_ADAPTER_4G=y
|
||||
|
||||
+11
-11
@@ -58,16 +58,16 @@ CONFIG_READLINE_TABCOMPLETION=y
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_DEV_GPIO=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_K210_16550_UART=y
|
||||
CONFIG_K210_16550_UART1=y
|
||||
CONFIG_K210_16550_UART1_BASE=0x50210000
|
||||
CONFIG_K210_16550_UART1_CLOCK=195000000
|
||||
CONFIG_K210_16550_UART1_IRQ=38
|
||||
CONFIG_K210_16550_UART1_BAUD=115200
|
||||
CONFIG_K210_16550_UART1_PARITY=0
|
||||
CONFIG_K210_16550_UART1_BITS=8
|
||||
CONFIG_K210_16550_UART1_2STOP=0
|
||||
CONFIG_K210_16550_UART1_RXBUFSIZE=128
|
||||
CONFIG_K210_16550_UART1_TXBUFSIZE=128
|
||||
CONFIG_K210_UART=y
|
||||
CONFIG_K210_UART1=y
|
||||
CONFIG_K210_UART1_BASE=0x50210000
|
||||
CONFIG_K210_UART1_CLOCK=195000000
|
||||
CONFIG_K210_UART1_IRQ=38
|
||||
CONFIG_K210_UART1_BAUD=115200
|
||||
CONFIG_K210_UART1_PARITY=0
|
||||
CONFIG_K210_UART1_BITS=8
|
||||
CONFIG_K210_UART1_2STOP=0
|
||||
CONFIG_K210_UART1_RXBUFSIZE=128
|
||||
CONFIG_K210_UART1_TXBUFSIZE=128
|
||||
CONFIG_BSP_USING_CAN=y
|
||||
CONFIG_SERIAL_TERMIOS=y
|
||||
|
||||
+2
-2
@@ -58,6 +58,6 @@ CONFIG_READLINE_TABCOMPLETION=y
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_DEV_GPIO=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_K210_16550_UART=y
|
||||
CONFIG_K210_16550_UART3=y
|
||||
CONFIG_K210_UART=y
|
||||
CONFIG_K210_UART3=y
|
||||
CONFIG_BSP_USING_TOUCH=y
|
||||
|
||||
+11
-11
@@ -58,17 +58,17 @@ CONFIG_READLINE_TABCOMPLETION=y
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_DEV_GPIO=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_K210_16550_UART=y
|
||||
CONFIG_K210_16550_UART1=y
|
||||
CONFIG_K210_16550_UART1_BASE=0x50210000
|
||||
CONFIG_K210_16550_UART1_CLOCK=195000000
|
||||
CONFIG_K210_16550_UART1_IRQ=38
|
||||
CONFIG_K210_16550_UART1_BAUD=115200
|
||||
CONFIG_K210_16550_UART1_PARITY=0
|
||||
CONFIG_K210_16550_UART1_BITS=8
|
||||
CONFIG_K210_16550_UART1_2STOP=0
|
||||
CONFIG_K210_16550_UART1_RXBUFSIZE=128
|
||||
CONFIG_K210_16550_UART1_TXBUFSIZE=128
|
||||
CONFIG_K210_UART=y
|
||||
CONFIG_K210_UART1=y
|
||||
CONFIG_K210_UART1_BASE=0x50210000
|
||||
CONFIG_K210_UART1_CLOCK=195000000
|
||||
CONFIG_K210_UART1_IRQ=38
|
||||
CONFIG_K210_UART1_BAUD=115200
|
||||
CONFIG_K210_UART1_PARITY=0
|
||||
CONFIG_K210_UART1_BITS=8
|
||||
CONFIG_K210_UART1_2STOP=0
|
||||
CONFIG_K210_UART1_RXBUFSIZE=128
|
||||
CONFIG_K210_UART1_TXBUFSIZE=128
|
||||
CONFIG_SUPPORT_CONNECTION_FRAMEWORK=y
|
||||
CONFIG_CONNECTION_FRAMEWORK_DEBUG=y
|
||||
CONFIG_CONNECTION_ADAPTER_WIFI=y
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <termios.h>
|
||||
#include <nuttx/ioexpander/gpio.h>
|
||||
#include "k210_uart_16550.h"
|
||||
#include "k210_uart.h"
|
||||
#include "k210_fpioa.h"
|
||||
#include "k210_gpiohs.h"
|
||||
#include "k210_gpio_common.h"
|
||||
|
||||
@@ -95,7 +95,7 @@ int k210_bringup(void)
|
||||
board_touch_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_K210_16550_UART1
|
||||
#ifdef CONFIG_K210_UART1
|
||||
#ifdef CONFIG_ADAPTER_ESP8285_WIFI
|
||||
sysctl_clock_enable(SYSCTL_CLOCK_UART1);
|
||||
sysctl_reset(SYSCTL_RESET_UART1);
|
||||
@@ -121,7 +121,7 @@ int k210_bringup(void)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_K210_16550_UART2
|
||||
#ifdef CONFIG_K210_UART2
|
||||
sysctl_clock_enable(SYSCTL_CLOCK_UART2);
|
||||
sysctl_reset(SYSCTL_RESET_UART2);
|
||||
|
||||
@@ -129,7 +129,7 @@ int k210_bringup(void)
|
||||
fpioa_set_function(GPIO_EC200T_TXD, FPOA_USART2_TX);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_K210_16550_UART3
|
||||
#ifdef CONFIG_K210_UART3
|
||||
sysctl_clock_enable(SYSCTL_CLOCK_UART3);
|
||||
sysctl_reset(SYSCTL_RESET_UART3);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <nuttx/ioexpander/gpio.h>
|
||||
#include "k210_uart_16550.h"
|
||||
#include "k210_uart.h"
|
||||
|
||||
#define ERR_USB_UNKNOWN 0xFA
|
||||
|
||||
|
||||
Reference in New Issue
Block a user