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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user