Add support ch376 usb fuction、lora e220 and wifi esp8285 for edu-riscv64 board on Nuttx
This commit is contained in:
parent
3988359eb9
commit
44ffb3af2a
|
@ -9,8 +9,8 @@
|
||||||
# CONFIG_STANDARD_SERIAL is not set
|
# CONFIG_STANDARD_SERIAL is not set
|
||||||
CONFIG_ADD_NUTTX_FETURES=y
|
CONFIG_ADD_NUTTX_FETURES=y
|
||||||
CONFIG_ARCH="risc-v"
|
CONFIG_ARCH="risc-v"
|
||||||
CONFIG_ARCH_BOARD="xidatong-riscv64"
|
CONFIG_ARCH_BOARD="edu-riscv64"
|
||||||
CONFIG_ARCH_BOARD_XIDATONG_RISCV64=y
|
CONFIG_ARCH_BOARD_EDU_RISCV64=y
|
||||||
CONFIG_ARCH_CHIP="k210"
|
CONFIG_ARCH_CHIP="k210"
|
||||||
CONFIG_ARCH_CHIP_K210=y
|
CONFIG_ARCH_CHIP_K210=y
|
||||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||||
|
@ -69,6 +69,7 @@ CONFIG_K210_UART2_BITS=8
|
||||||
CONFIG_K210_UART2_2STOP=0
|
CONFIG_K210_UART2_2STOP=0
|
||||||
CONFIG_K210_UART2_RXBUFSIZE=128
|
CONFIG_K210_UART2_RXBUFSIZE=128
|
||||||
CONFIG_K210_UART2_TXBUFSIZE=128
|
CONFIG_K210_UART2_TXBUFSIZE=128
|
||||||
|
CONFIG_SERIAL_TERMIOS=y
|
||||||
CONFIG_SUPPORT_CONNECTION_FRAMEWORK=y
|
CONFIG_SUPPORT_CONNECTION_FRAMEWORK=y
|
||||||
CONFIG_CONNECTION_FRAMEWORK_DEBUG=y
|
CONFIG_CONNECTION_FRAMEWORK_DEBUG=y
|
||||||
CONFIG_CONNECTION_ADAPTER_LORA=y
|
CONFIG_CONNECTION_ADAPTER_LORA=y
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
#
|
||||||
|
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||||
|
#
|
||||||
|
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||||
|
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||||
|
# modifications.
|
||||||
|
#
|
||||||
|
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||||
|
# CONFIG_STANDARD_SERIAL is not set
|
||||||
|
CONFIG_ADD_NUTTX_FETURES=y
|
||||||
|
CONFIG_ARCH="risc-v"
|
||||||
|
CONFIG_ARCH_BOARD="edu-riscv64"
|
||||||
|
CONFIG_ARCH_BOARD_EDU_RISCV64=y
|
||||||
|
CONFIG_ARCH_CHIP="k210"
|
||||||
|
CONFIG_ARCH_CHIP_K210=y
|
||||||
|
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||||
|
CONFIG_ARCH_RISCV=y
|
||||||
|
CONFIG_ARCH_STACKDUMP=y
|
||||||
|
CONFIG_BINFMT_DISABLE=y
|
||||||
|
CONFIG_BOARD_LOOPSPERMSEC=46000
|
||||||
|
CONFIG_BUILTIN=y
|
||||||
|
CONFIG_DEBUG_FULLOPT=y
|
||||||
|
CONFIG_DEBUG_SYMBOLS=y
|
||||||
|
CONFIG_EXAMPLES_HELLO=y
|
||||||
|
CONFIG_IDLETHREAD_STACKSIZE=2048
|
||||||
|
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||||
|
CONFIG_INIT_STACKSIZE=3072
|
||||||
|
CONFIG_INTELHEX_BINARY=y
|
||||||
|
CONFIG_LIBC_PERROR_STDOUT=y
|
||||||
|
CONFIG_LIBC_STRERROR=y
|
||||||
|
CONFIG_NSH_ARCHINIT=y
|
||||||
|
CONFIG_NSH_BUILTIN_APPS=y
|
||||||
|
CONFIG_NSH_DISABLE_IFUPDOWN=y
|
||||||
|
CONFIG_NSH_DISABLE_MKDIR=y
|
||||||
|
CONFIG_NSH_DISABLE_RM=y
|
||||||
|
CONFIG_NSH_DISABLE_RMDIR=y
|
||||||
|
CONFIG_NSH_DISABLE_UMOUNT=y
|
||||||
|
CONFIG_NSH_READLINE=y
|
||||||
|
CONFIG_NSH_STRERROR=y
|
||||||
|
CONFIG_PREALLOC_TIMERS=4
|
||||||
|
CONFIG_RAM_SIZE=2097152
|
||||||
|
CONFIG_RAM_START=0x80400000
|
||||||
|
CONFIG_RAW_BINARY=y
|
||||||
|
CONFIG_READLINE_CMD_HISTORY=y
|
||||||
|
CONFIG_READLINE_CMD_HISTORY_LEN=100
|
||||||
|
CONFIG_READLINE_CMD_HISTORY_LINELEN=120
|
||||||
|
CONFIG_RR_INTERVAL=200
|
||||||
|
CONFIG_SCHED_WAITPID=y
|
||||||
|
CONFIG_STACK_COLORATION=y
|
||||||
|
CONFIG_START_DAY=28
|
||||||
|
CONFIG_START_MONTH=12
|
||||||
|
CONFIG_START_YEAR=2019
|
||||||
|
CONFIG_SYSTEM_NSH=y
|
||||||
|
CONFIG_TASK_NAME_SIZE=20
|
||||||
|
CONFIG_TESTING_GETPRIME=y
|
||||||
|
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||||
|
CONFIG_READLINE_TABCOMPLETION=y
|
||||||
|
CONFIG_SCHED_HPWORK=y
|
||||||
|
CONFIG_DEV_GPIO=y
|
||||||
|
CONFIG_BOARDCTL_RESET=y
|
||||||
|
CONFIG_BSP_USING_CH376=y
|
|
@ -0,0 +1,77 @@
|
||||||
|
#
|
||||||
|
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||||
|
#
|
||||||
|
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||||
|
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||||
|
# modifications.
|
||||||
|
#
|
||||||
|
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||||
|
# CONFIG_STANDARD_SERIAL is not set
|
||||||
|
CONFIG_ADD_NUTTX_FETURES=y
|
||||||
|
CONFIG_ARCH="risc-v"
|
||||||
|
CONFIG_ARCH_BOARD="edu-riscv64"
|
||||||
|
CONFIG_ARCH_BOARD_EDU_RISCV64=y
|
||||||
|
CONFIG_ARCH_CHIP="k210"
|
||||||
|
CONFIG_ARCH_CHIP_K210=y
|
||||||
|
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||||
|
CONFIG_ARCH_RISCV=y
|
||||||
|
CONFIG_ARCH_STACKDUMP=y
|
||||||
|
CONFIG_BINFMT_DISABLE=y
|
||||||
|
CONFIG_BOARD_LOOPSPERMSEC=46000
|
||||||
|
CONFIG_BUILTIN=y
|
||||||
|
CONFIG_DEBUG_FULLOPT=y
|
||||||
|
CONFIG_DEBUG_SYMBOLS=y
|
||||||
|
CONFIG_EXAMPLES_HELLO=y
|
||||||
|
CONFIG_IDLETHREAD_STACKSIZE=2048
|
||||||
|
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||||
|
CONFIG_INIT_STACKSIZE=3072
|
||||||
|
CONFIG_INTELHEX_BINARY=y
|
||||||
|
CONFIG_LIBC_PERROR_STDOUT=y
|
||||||
|
CONFIG_LIBC_STRERROR=y
|
||||||
|
CONFIG_NSH_ARCHINIT=y
|
||||||
|
CONFIG_NSH_BUILTIN_APPS=y
|
||||||
|
CONFIG_NSH_DISABLE_IFUPDOWN=y
|
||||||
|
CONFIG_NSH_DISABLE_MKDIR=y
|
||||||
|
CONFIG_NSH_DISABLE_RM=y
|
||||||
|
CONFIG_NSH_DISABLE_RMDIR=y
|
||||||
|
CONFIG_NSH_DISABLE_UMOUNT=y
|
||||||
|
CONFIG_NSH_READLINE=y
|
||||||
|
CONFIG_NSH_STRERROR=y
|
||||||
|
CONFIG_PREALLOC_TIMERS=4
|
||||||
|
CONFIG_RAM_SIZE=2097152
|
||||||
|
CONFIG_RAM_START=0x80400000
|
||||||
|
CONFIG_RAW_BINARY=y
|
||||||
|
CONFIG_READLINE_CMD_HISTORY=y
|
||||||
|
CONFIG_READLINE_CMD_HISTORY_LEN=100
|
||||||
|
CONFIG_READLINE_CMD_HISTORY_LINELEN=120
|
||||||
|
CONFIG_RR_INTERVAL=200
|
||||||
|
CONFIG_SCHED_WAITPID=y
|
||||||
|
CONFIG_STACK_COLORATION=y
|
||||||
|
CONFIG_START_DAY=28
|
||||||
|
CONFIG_START_MONTH=12
|
||||||
|
CONFIG_START_YEAR=2019
|
||||||
|
CONFIG_SYSTEM_NSH=y
|
||||||
|
CONFIG_TASK_NAME_SIZE=20
|
||||||
|
CONFIG_TESTING_GETPRIME=y
|
||||||
|
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||||
|
CONFIG_READLINE_TABCOMPLETION=y
|
||||||
|
CONFIG_SCHED_HPWORK=y
|
||||||
|
CONFIG_DEV_GPIO=y
|
||||||
|
CONFIG_BOARDCTL_RESET=y
|
||||||
|
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
|
||||||
|
CONFIG_ADAPTER_ESP8285_WIFI=y
|
||||||
|
CONFIG_ADAPTER_WIFI_ESP8285="esp8285_wifi"
|
||||||
|
CONFIG_ADAPTER_ESP8285_DRIVER="/dev/ttyS1"
|
|
@ -39,8 +39,6 @@
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Map pad 14 to gpiohs io 0 */
|
/* Map pad 14 to gpiohs io 0 */
|
||||||
#define BOARD_LED_IO_FUNC K210_IO_FUNC_GPIOHS0
|
#define BOARD_LED_IO_FUNC K210_IO_FUNC_GPIOHS0
|
||||||
|
|
||||||
|
@ -55,7 +53,7 @@
|
||||||
|
|
||||||
/* GPIO pins used by the GPIO Subsystem */
|
/* GPIO pins used by the GPIO Subsystem */
|
||||||
|
|
||||||
#define BOARD_NGPIOOUT 3 /* Amount of register GPIO Output pins */
|
#define BOARD_NGPIOOUT 2 /* Amount of register GPIO Output pins */
|
||||||
#define BOARD_NGPIOINT 0 /* Amount of GPIO Input */
|
#define BOARD_NGPIOINT 0 /* Amount of GPIO Input */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -84,8 +82,8 @@ extern "C"
|
||||||
#define GPIO_WIFI_TXD 6
|
#define GPIO_WIFI_TXD 6
|
||||||
#define GPIO_E220_RXD 21
|
#define GPIO_E220_RXD 21
|
||||||
#define GPIO_E220_TXD 20
|
#define GPIO_E220_TXD 20
|
||||||
#define GPIO_CH376T_RXD 22
|
#define GPIO_CH376T_RXD 23
|
||||||
#define GPIO_CH376T_TXD 23
|
#define GPIO_CH376T_TXD 22
|
||||||
|
|
||||||
/* w5500 IO */
|
/* w5500 IO */
|
||||||
#define BSP_ENET_SCLK 9
|
#define BSP_ENET_SCLK 9
|
||||||
|
@ -95,14 +93,6 @@ extern "C"
|
||||||
#define BSP_ENET_NRST 13
|
#define BSP_ENET_NRST 13
|
||||||
#define BSP_ENET_NINT 14
|
#define BSP_ENET_NINT 14
|
||||||
|
|
||||||
/* LCD IO */
|
|
||||||
#define BSP_LCD_NRST 37
|
|
||||||
#define BSP_LCD_SCLK 38
|
|
||||||
#define BSP_LCD_MOSI 39
|
|
||||||
#define BSP_LCD_MISO 40
|
|
||||||
#define BSP_LCD_NCS 41
|
|
||||||
#define BSP_LCD_BL_PIN 47
|
|
||||||
|
|
||||||
/* I2C */
|
/* I2C */
|
||||||
#define BSP_IIC_SDA 15
|
#define BSP_IIC_SDA 15
|
||||||
#define BSP_IIC_SCL 17
|
#define BSP_IIC_SCL 17
|
||||||
|
@ -110,9 +100,7 @@ extern "C"
|
||||||
/* other mode io */
|
/* other mode io */
|
||||||
#define GPIO_E220_M0 32
|
#define GPIO_E220_M0 32
|
||||||
#define GPIO_E220_M1 33
|
#define GPIO_E220_M1 33
|
||||||
#define GPIO_E18_MODE 46
|
|
||||||
#define GPIO_WIFI_EN 8
|
#define GPIO_WIFI_EN 8
|
||||||
#define GPIO_CAN_CFG 43
|
|
||||||
|
|
||||||
/************************** end GPIO define **************************/
|
/************************** end GPIO define **************************/
|
||||||
|
|
||||||
|
@ -135,14 +123,6 @@ extern "C"
|
||||||
#define FPIOA_ENET_MOSI 23
|
#define FPIOA_ENET_MOSI 23
|
||||||
#define FPIOA_ENET_NCS 31
|
#define FPIOA_ENET_NCS 31
|
||||||
|
|
||||||
/* LCD FPIOA */
|
|
||||||
#define FPIOA_LCD_NRST 0
|
|
||||||
#define FPIOA_LCD_BL 9
|
|
||||||
#define FPIOA_LCD_SCLK 28
|
|
||||||
#define FPIOA_LCD_MOSI 29
|
|
||||||
#define FPIOA_LCD_MISO 23
|
|
||||||
#define FPIOA_LCD_NCS 31
|
|
||||||
|
|
||||||
/* I2C */
|
/* I2C */
|
||||||
#define FPIOA_IIC_SDA 7
|
#define FPIOA_IIC_SDA 7
|
||||||
#define FPIOA_IIC_SCL 8
|
#define FPIOA_IIC_SCL 8
|
||||||
|
@ -150,9 +130,7 @@ extern "C"
|
||||||
/* other mode FPIOA */
|
/* other mode FPIOA */
|
||||||
#define FPIOA_E220_M0 1
|
#define FPIOA_E220_M0 1
|
||||||
#define FPIOA_E220_M1 2
|
#define FPIOA_E220_M1 2
|
||||||
#define FPIOA_E18_MODE 3
|
#define FPIOA_WIFI_EN 3
|
||||||
#define FPIOA_WIFI_EN 4
|
|
||||||
#define FPIOA_CAN_NCFG 5
|
|
||||||
|
|
||||||
/************************** end FPIOA define **************************/
|
/************************** end FPIOA define **************************/
|
||||||
|
|
||||||
|
|
|
@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_LEDS),y)
|
||||||
CSRCS += k210_leds.c
|
CSRCS += k210_leds.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_K210_LCD),y)
|
|
||||||
CSRCS += k210_lcd.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEV_GPIO),y)
|
ifeq ($(CONFIG_DEV_GPIO),y)
|
||||||
CSRCS += k210_gpio.c
|
CSRCS += k210_gpio.c
|
||||||
endif
|
endif
|
||||||
|
@ -54,4 +50,8 @@ ifeq ($(CONFIG_BSP_USING_TOUCH),y)
|
||||||
CSRCS += k210_touch.c
|
CSRCS += k210_touch.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_K210_UART2),y)
|
||||||
|
CSRCS += test_loraE220.c
|
||||||
|
endif
|
||||||
|
|
||||||
include $(TOPDIR)/boards/Board.mk
|
include $(TOPDIR)/boards/Board.mk
|
||||||
|
|
|
@ -31,13 +31,11 @@ void CH376Demo(void)
|
||||||
s = mInitCH376Host();
|
s = mInitCH376Host();
|
||||||
printf ("ch376 init stat=0x%02x\n",(uint16_t)s);
|
printf ("ch376 init stat=0x%02x\n",(uint16_t)s);
|
||||||
|
|
||||||
#ifdef CONFIG_CH376_USB_FUNCTION
|
|
||||||
printf( "Wait Udisk/SD\n" );
|
printf( "Wait Udisk/SD\n" );
|
||||||
while ( CH376DiskConnect( ) != USB_INT_SUCCESS )
|
while ( CH376DiskConnect( ) != USB_INT_SUCCESS )
|
||||||
{
|
{
|
||||||
up_mdelay( 100 );
|
up_mdelay( 100 );
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
for ( s = 0; s < 10; s ++ )
|
for ( s = 0; s < 10; s ++ )
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,10 +43,6 @@
|
||||||
#include "k210_gpiohs.h"
|
#include "k210_gpiohs.h"
|
||||||
#include "k210_gpio_common.h"
|
#include "k210_gpio_common.h"
|
||||||
|
|
||||||
#ifdef CONFIG_BSP_USING_CH438
|
|
||||||
# include "k210_ch438.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_BSP_USING_TOUCH
|
#ifdef CONFIG_BSP_USING_TOUCH
|
||||||
# include "k210_touch.h"
|
# include "k210_touch.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -82,11 +78,6 @@ int k210_bringup(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_K210_LCD
|
|
||||||
k210_sysctl_init();
|
|
||||||
board_lcd_initialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_BSP_USING_TOUCH
|
#ifdef CONFIG_BSP_USING_TOUCH
|
||||||
board_touch_initialize();
|
board_touch_initialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -107,7 +107,7 @@ UINT8 mInitCH376Host(void)
|
||||||
if ( res != 0x9A ) return( ERR_USB_UNKNOWN );
|
if ( res != 0x9A ) return( ERR_USB_UNKNOWN );
|
||||||
|
|
||||||
xWriteCH376Cmd(CMD11_SET_USB_MODE); /* SET USB MODE */
|
xWriteCH376Cmd(CMD11_SET_USB_MODE); /* SET USB MODE */
|
||||||
xWriteCH376Data(CONFIG_CH376_WORK_MODE);
|
xWriteCH376Data(0x06);
|
||||||
up_udelay(20);
|
up_udelay(20);
|
||||||
res = xReadCH376Data();
|
res = xReadCH376Data();
|
||||||
xEndCH376Cmd();
|
xEndCH376Cmd();
|
||||||
|
|
|
@ -87,15 +87,13 @@ static const struct gpio_operations_s gpout_ops =
|
||||||
static const uint32_t g_gpiooutputs[BOARD_NGPIOOUT] =
|
static const uint32_t g_gpiooutputs[BOARD_NGPIOOUT] =
|
||||||
{
|
{
|
||||||
GPIO_E220_M0,
|
GPIO_E220_M0,
|
||||||
GPIO_E220_M1,
|
GPIO_E220_M1
|
||||||
GPIO_E18_MODE
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint32_t g_fpioa[BOARD_NGPIOOUT] =
|
static const uint32_t g_fpioa[BOARD_NGPIOOUT] =
|
||||||
{
|
{
|
||||||
FPIOA_E220_M0,
|
FPIOA_E220_M0,
|
||||||
FPIOA_E220_M1,
|
FPIOA_E220_M1
|
||||||
FPIOA_E18_MODE
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct k210gpio_dev_s g_gpout[BOARD_NGPIOOUT];
|
static struct k210gpio_dev_s g_gpout[BOARD_NGPIOOUT];
|
||||||
|
|
|
@ -1,353 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2022 AIIT XUOS Lab
|
|
||||||
* XiUOS is licensed under Mulan PSL v2.
|
|
||||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
||||||
* You may obtain a copy of Mulan PSL v2 at:
|
|
||||||
* http://license.coscl.org.cn/MulanPSL2
|
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
||||||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
||||||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
||||||
* See the Mulan PSL v2 for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @file k210_lcd.c
|
|
||||||
* @brief LCD relative driver
|
|
||||||
* @version 1.0
|
|
||||||
* @author AIIT XUOS Lab
|
|
||||||
* @date 2022.7.21
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Included Files
|
|
||||||
****************************************************************************/
|
|
||||||
#include <nuttx/config.h>
|
|
||||||
#include "k210_fpioa.h"
|
|
||||||
#include "k210_gpiohs.h"
|
|
||||||
#include "nuttx/arch.h"
|
|
||||||
#include "nuttx/lcd/lt768.h"
|
|
||||||
#include "nuttx/lcd/lt768_lib.h"
|
|
||||||
#include "nuttx/lcd/if_port.h"
|
|
||||||
#include "nuttx/lcd/lt768_learn.h"
|
|
||||||
#include <nuttx/board.h>
|
|
||||||
#include <arch/board/board.h>
|
|
||||||
#include <nuttx/fs/fs.h>
|
|
||||||
#include <nuttx/fs/ioctl.h>
|
|
||||||
#ifdef CONFIG_LCD_LCDDRV_SPIIF
|
|
||||||
#include "nuttx/lcd/lcddrv_spiif.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Function Prototypes
|
|
||||||
****************************************************************************/
|
|
||||||
#define NCS_H() k210_gpiohs_set_value(FPIOA_LCD_NCS, GPIO_PV_HIGH); up_udelay(20)
|
|
||||||
#define NCS_L() k210_gpiohs_set_value(FPIOA_LCD_NCS, GPIO_PV_LOW); up_udelay(20)
|
|
||||||
#define CLK_H() k210_gpiohs_set_value(FPIOA_LCD_SCLK, GPIO_PV_HIGH); up_udelay(20)
|
|
||||||
#define CLK_L() k210_gpiohs_set_value(FPIOA_LCD_SCLK, GPIO_PV_LOW); up_udelay(20)
|
|
||||||
#define MOSI_H() k210_gpiohs_set_value(FPIOA_LCD_MOSI, GPIO_PV_HIGH)
|
|
||||||
#define MOSI_L() k210_gpiohs_set_value(FPIOA_LCD_MOSI, GPIO_PV_LOW)
|
|
||||||
|
|
||||||
static int lcd_open(FAR struct file *filep);
|
|
||||||
static int lcd_close(FAR struct file *filep);
|
|
||||||
static ssize_t lcd_read(FAR struct file *filep, FAR char *buffer, size_t buflen);
|
|
||||||
static ssize_t lcd_write(FAR struct file *filep, FAR const char *buffer, size_t buflen);
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Data
|
|
||||||
****************************************************************************/
|
|
||||||
/* LCD POSIX interface */
|
|
||||||
static const struct file_operations g_lcdfops =
|
|
||||||
{
|
|
||||||
lcd_open,
|
|
||||||
lcd_close,
|
|
||||||
lcd_read,
|
|
||||||
lcd_write,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
/****************************************************************************
|
|
||||||
* Public Functions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void lcd_pin_init(void)
|
|
||||||
{
|
|
||||||
k210_fpioa_config(BSP_LCD_NRST, HS_GPIO(FPIOA_LCD_NRST) | K210_IOFLAG_GPIOHS);
|
|
||||||
k210_fpioa_config(BSP_LCD_SCLK, HS_GPIO(FPIOA_LCD_SCLK) | K210_IOFLAG_GPIOHS);
|
|
||||||
k210_fpioa_config(BSP_LCD_MOSI, HS_GPIO(FPIOA_LCD_MOSI) | K210_IOFLAG_GPIOHS);
|
|
||||||
k210_fpioa_config(BSP_LCD_MISO, HS_GPIO(FPIOA_LCD_MISO) | K210_IOFLAG_GPIOHS);
|
|
||||||
k210_fpioa_config(BSP_LCD_NCS, HS_GPIO(FPIOA_LCD_NCS) | K210_IOFLAG_GPIOHS);
|
|
||||||
|
|
||||||
k210_gpiohs_set_direction(FPIOA_LCD_MISO, GPIO_DM_INPUT);
|
|
||||||
k210_gpiohs_set_direction(FPIOA_LCD_NRST, GPIO_DM_OUTPUT);
|
|
||||||
k210_gpiohs_set_direction(FPIOA_LCD_SCLK, GPIO_DM_OUTPUT);
|
|
||||||
k210_gpiohs_set_direction(FPIOA_LCD_MOSI, GPIO_DM_OUTPUT);
|
|
||||||
k210_gpiohs_set_direction(FPIOA_LCD_NCS, GPIO_DM_OUTPUT);
|
|
||||||
|
|
||||||
k210_gpiohs_set_value(FPIOA_LCD_SCLK, GPIO_PV_HIGH);
|
|
||||||
k210_gpiohs_set_value(FPIOA_LCD_NCS, GPIO_PV_HIGH);
|
|
||||||
k210_gpiohs_set_value(FPIOA_LCD_NRST, GPIO_PV_HIGH);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lcd_backlight_init(bool enable)
|
|
||||||
{
|
|
||||||
k210_fpioa_config(BSP_LCD_BL_PIN, HS_GPIO(FPIOA_LCD_BL) | K210_IOFLAG_GPIOHS);
|
|
||||||
k210_gpiohs_set_direction(FPIOA_LCD_BL, GPIO_DM_OUTPUT);
|
|
||||||
k210_gpiohs_set_value(FPIOA_LCD_BL, enable);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_LCD_LCDDRV_SPIIF
|
|
||||||
int spiif_backlight(FAR struct lcddrv_lcd_s *lcd, int level)
|
|
||||||
{
|
|
||||||
lcd_backlight_init(true);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
uint8_t lcd_transfer_byte(uint8_t dat)
|
|
||||||
{
|
|
||||||
uint8_t i, rx_data = 0;
|
|
||||||
|
|
||||||
for(i = 0; i < 8; i++)
|
|
||||||
{
|
|
||||||
CLK_H();
|
|
||||||
|
|
||||||
// MOSI during falling edge
|
|
||||||
if((dat << i) & 0x80)
|
|
||||||
{
|
|
||||||
MOSI_H();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MOSI_L();
|
|
||||||
}
|
|
||||||
|
|
||||||
CLK_L();
|
|
||||||
|
|
||||||
// MISO during rising edge
|
|
||||||
rx_data <<= 1;
|
|
||||||
if(k210_gpiohs_get_value(FPIOA_LCD_MISO))
|
|
||||||
rx_data ++;
|
|
||||||
}
|
|
||||||
CLK_H();
|
|
||||||
return rx_data;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LCD_CmdWrite(uint8_t cmd)
|
|
||||||
{
|
|
||||||
NCS_L();
|
|
||||||
lcd_transfer_byte(0x00);
|
|
||||||
lcd_transfer_byte(cmd);
|
|
||||||
NCS_H();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LCD_DataWrite(uint8_t data)
|
|
||||||
{
|
|
||||||
NCS_L();
|
|
||||||
lcd_transfer_byte(0x80);
|
|
||||||
lcd_transfer_byte(data);
|
|
||||||
NCS_H();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LCD_DataWrite_Pixel(uint8_t data)
|
|
||||||
{
|
|
||||||
NCS_L();
|
|
||||||
lcd_transfer_byte(0x80);
|
|
||||||
lcd_transfer_byte(data);
|
|
||||||
NCS_H();
|
|
||||||
NCS_L();
|
|
||||||
lcd_transfer_byte(0x80);
|
|
||||||
lcd_transfer_byte(data >> 8);
|
|
||||||
NCS_H();
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t LCD_StatusRead(void)
|
|
||||||
{
|
|
||||||
uint8_t temp = 0;
|
|
||||||
NCS_L();
|
|
||||||
lcd_transfer_byte(0x40);
|
|
||||||
temp = lcd_transfer_byte(0xff);
|
|
||||||
NCS_H();
|
|
||||||
return temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t LCD_DataRead(void)
|
|
||||||
{
|
|
||||||
uint8_t temp = 0;
|
|
||||||
NCS_L();
|
|
||||||
lcd_transfer_byte(0xc0);
|
|
||||||
temp = lcd_transfer_byte(0xff);
|
|
||||||
NCS_H();
|
|
||||||
return temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
void lcd_drv_init(void)
|
|
||||||
{
|
|
||||||
uint8_t PwmControl = 100;
|
|
||||||
|
|
||||||
lcd_pin_init();
|
|
||||||
lt768_init();
|
|
||||||
Select_SFI_Dual_Mode0();
|
|
||||||
|
|
||||||
// PWM1 enable backlight
|
|
||||||
LT768_PWM1_Init(1, 0, 200, 100, PwmControl);
|
|
||||||
|
|
||||||
// enable RGB output
|
|
||||||
Display_ON();
|
|
||||||
|
|
||||||
Main_Image_Start_Address(LCD_START_ADDR);
|
|
||||||
Main_Image_Width(LCD_XSIZE_TFT);
|
|
||||||
Main_Window_Start_XY(0, 0);
|
|
||||||
Canvas_Image_Start_address(LCD_START_ADDR);
|
|
||||||
Canvas_image_width(LCD_XSIZE_TFT);
|
|
||||||
Active_Window_XY(0, 0);
|
|
||||||
Active_Window_WH(LCD_XSIZE_TFT, LCD_YSIZE_TFT);
|
|
||||||
up_mdelay(10);
|
|
||||||
Canvas_Image_Start_address(LCD_START_ADDR);
|
|
||||||
|
|
||||||
//fill blue background
|
|
||||||
LT768_DrawSquare_Fill(0, 0, LCD_XSIZE_TFT, LCD_YSIZE_TFT, WHITE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: k210_backlight
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* If CONFIG_K210_LCD_BACKLIGHT is defined, then the board-specific
|
|
||||||
* logic must provide this interface to turn the backlight on and off.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_K210_LCD_BACKLIGHT
|
|
||||||
void k210_backlight(bool blon)
|
|
||||||
{
|
|
||||||
lcd_backlight_init(blon);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: lcd_open
|
|
||||||
****************************************************************************/
|
|
||||||
static int lcd_open(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: lcd_close
|
|
||||||
****************************************************************************/
|
|
||||||
static int lcd_close(FAR struct file *filep)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: lcd_read
|
|
||||||
****************************************************************************/
|
|
||||||
static ssize_t lcd_read(FAR struct file *filep, FAR char *buffer, size_t buflen)
|
|
||||||
{
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: ch438_write
|
|
||||||
****************************************************************************/
|
|
||||||
static ssize_t lcd_write(FAR struct file *filep, FAR const char *buffer, size_t buflen)
|
|
||||||
{
|
|
||||||
ssize_t ret = buflen;
|
|
||||||
if (buffer == NULL)
|
|
||||||
{
|
|
||||||
return -ERROR;
|
|
||||||
}
|
|
||||||
LcdWriteParam * show = (LcdWriteParam *)buffer;
|
|
||||||
|
|
||||||
/* output string */
|
|
||||||
switch (show->type)
|
|
||||||
{
|
|
||||||
|
|
||||||
/* output string */
|
|
||||||
case SHOW_STRING:
|
|
||||||
LT768_DrawSquare_Fill(0, 0, LCD_XSIZE_TFT, LCD_YSIZE_TFT, WHITE);
|
|
||||||
LT768_Select_Internal_Font_Init(show->string_info.height, 1, 1, 1, 1);
|
|
||||||
LT768_Print_Internal_Font_String(show->string_info.x_pos, show->string_info.y_pos, show->string_info.font_color,show->string_info.back_color,show->string_info.addr);
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* output dot */
|
|
||||||
case SHOW_WDOT:
|
|
||||||
LT768_DrawSquare_Fill(0, 0, LCD_XSIZE_TFT, LCD_YSIZE_TFT, WHITE);
|
|
||||||
LT768_DrawSquare_Fill(show->pixel_info.x_startpos,show->pixel_info.y_startpos, show->pixel_info.x_endpos, show->pixel_info.y_endpos, *(uint32_t *)(show->pixel_info.pixel_color));
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* output rgb */
|
|
||||||
case SHOW_RGB:
|
|
||||||
LT768_DrawSquare_Fill(0, 0, LCD_XSIZE_TFT, LCD_YSIZE_TFT, WHITE);
|
|
||||||
Display_RGB();
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* output pip */
|
|
||||||
case SHOW_PIP:
|
|
||||||
LT768_DrawSquare_Fill(0, 0, LCD_XSIZE_TFT, LCD_YSIZE_TFT, WHITE);
|
|
||||||
Display_PIP();
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* output Internal Font */
|
|
||||||
case SHOW_INTERNAL_FONT:
|
|
||||||
LT768_DrawSquare_Fill(0, 0, LCD_XSIZE_TFT, LCD_YSIZE_TFT, WHITE);
|
|
||||||
Display_Internal_Font();
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* output Outside Font */
|
|
||||||
case SHOW_OUTSIDE_FONT:
|
|
||||||
LT768_DrawSquare_Fill(0, 0, LCD_XSIZE_TFT, LCD_YSIZE_TFT, WHITE);
|
|
||||||
Display_Outside_Font();
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* output Triangle */
|
|
||||||
case SHOW_TRIANGLE:
|
|
||||||
LT768_DrawSquare_Fill(0, 0, LCD_XSIZE_TFT, LCD_YSIZE_TFT, WHITE);
|
|
||||||
Display_Triangle();
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* output picture */
|
|
||||||
case SHOW_PICTURE:
|
|
||||||
LT768_DrawSquare_Fill(0, 0, LCD_XSIZE_TFT, LCD_YSIZE_TFT, WHITE);
|
|
||||||
Display_Picture();
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
ret = -ERROR;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: k210_lcd_initialize
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Initialize the LCD. Setup backlight (initially off)
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
int board_lcd_initialize(void)
|
|
||||||
{
|
|
||||||
/* Configure the LCD backlight (and turn the backlight off) */
|
|
||||||
lcd_backlight_init(true);
|
|
||||||
lcd_drv_init();
|
|
||||||
up_mdelay(10);
|
|
||||||
Main_Image_Start_Address(LCD_START_ADDR);
|
|
||||||
Main_Image_Width(LCD_XSIZE_TFT);
|
|
||||||
Main_Window_Start_XY(0, 0);
|
|
||||||
Canvas_Image_Start_address(LCD_START_ADDR);
|
|
||||||
Canvas_image_width(LCD_XSIZE_TFT);
|
|
||||||
Active_Window_XY(0, 0);
|
|
||||||
Active_Window_WH(LCD_XSIZE_TFT, LCD_YSIZE_TFT);
|
|
||||||
up_mdelay(10);
|
|
||||||
Canvas_Image_Start_address(LCD_START_ADDR);
|
|
||||||
/* register device */
|
|
||||||
register_driver("/dev/lcd_dev", &g_lcdfops, 0666, NULL);
|
|
||||||
return OK;
|
|
||||||
}
|
|
|
@ -0,0 +1,96 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020 AIIT XUOS Lab
|
||||||
|
* XiUOS is licensed under Mulan PSL v2.
|
||||||
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the Mulan PSL v2 for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file test_loraE220.c
|
||||||
|
* @brief edu-riscv64 test_loraE220.c
|
||||||
|
* @version 1.0
|
||||||
|
* @author AIIT XUOS Lab
|
||||||
|
* @date 2022.12.13
|
||||||
|
*/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <nuttx/fs/fs.h>
|
||||||
|
#include <nuttx/fs/ioctl.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <termios.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <nuttx/time.h>
|
||||||
|
#include <nuttx/ioexpander/gpio.h>
|
||||||
|
|
||||||
|
void TestLora(void)
|
||||||
|
{
|
||||||
|
int fd, m0fd, m1fd;
|
||||||
|
int i;
|
||||||
|
char sendbuffer1[4] = {0xC0,0x04,0x01,0x09};
|
||||||
|
char sendbuffer2[6] = {0xC0,0x00,0x03,0x12,0x34,0x61};
|
||||||
|
char sendbuffer3[3] = {0xC1,0x04,0x01};
|
||||||
|
char sendbuffer4[3] = {0xC1,0x00,0x03};
|
||||||
|
char buffer[256];
|
||||||
|
int readlen;
|
||||||
|
struct termios term;
|
||||||
|
|
||||||
|
fd = open("/dev/ttyS2", O_RDWR);
|
||||||
|
tcgetattr(fd, &term);
|
||||||
|
cfsetspeed(&term, 9600);
|
||||||
|
tcsetattr(fd, TCSANOW, &term);
|
||||||
|
|
||||||
|
m0fd = open("/dev/gpio0", O_RDWR);
|
||||||
|
m1fd = open("/dev/gpio1", O_RDWR);
|
||||||
|
ioctl(m0fd, GPIOC_WRITE, (unsigned long)1);
|
||||||
|
ioctl(m1fd, GPIOC_WRITE, (unsigned long)1);
|
||||||
|
sleep(1);
|
||||||
|
|
||||||
|
write(fd, sendbuffer1,4);
|
||||||
|
sleep(1);
|
||||||
|
readlen = read(fd, buffer, 256);
|
||||||
|
printf("readlen1 = %d\n", readlen);
|
||||||
|
for(i = 0;i< readlen; ++i)
|
||||||
|
{
|
||||||
|
printf("0x%x\n", buffer[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
write(fd, sendbuffer2,6);
|
||||||
|
sleep(1);
|
||||||
|
readlen = read(fd, buffer, 256);
|
||||||
|
printf("readlen1 = %d\n", readlen);
|
||||||
|
for(i = 0;i< readlen; ++i)
|
||||||
|
{
|
||||||
|
printf("0x%x\n", buffer[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
write(fd, sendbuffer3,3);
|
||||||
|
sleep(1);
|
||||||
|
readlen = read(fd, buffer, 256);
|
||||||
|
printf("readlen1 = %d\n", readlen);
|
||||||
|
for(i = 0;i< readlen; ++i)
|
||||||
|
{
|
||||||
|
printf("0x%x\n", buffer[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
write(fd, sendbuffer4,3);
|
||||||
|
sleep(1);
|
||||||
|
readlen = read(fd, buffer, 256);
|
||||||
|
printf("readlen1 = %d\n", readlen);
|
||||||
|
for(i = 0;i< readlen; ++i)
|
||||||
|
{
|
||||||
|
printf("0x%x\n", buffer[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
close(fd);
|
||||||
|
}
|
|
@ -1555,6 +1555,10 @@ int nsh_foreach_var(FAR struct nsh_vtbl_s *vtbl, nsh_foreach_var_t cb,
|
||||||
int cmd_AdapterLoraTest(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
int cmd_AdapterLoraTest(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_ARCH_BOARD_EDU_RISCV64) && defined(CONFIG_K210_UART2)
|
||||||
|
int cmd_TestLora(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_ADAPTER_4G_EC200T) && !defined(CONFIG_NSH_DISABLE_ADAPTER_4GTEST)
|
#if defined(CONFIG_ADAPTER_4G_EC200T) && !defined(CONFIG_NSH_DISABLE_ADAPTER_4GTEST)
|
||||||
int cmd_Adapter4GTest(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
int cmd_Adapter4GTest(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -425,6 +425,16 @@ int cmd_AdapterLoraTest(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_ARCH_BOARD_EDU_RISCV64) && defined(CONFIG_K210_UART2)
|
||||||
|
extern void TestLora(void);
|
||||||
|
int cmd_TestLora(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||||
|
{
|
||||||
|
nsh_output(vtbl, "Hello, world!\n");
|
||||||
|
TestLora();
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_ADAPTER_4G_EC200T) && !defined(CONFIG_NSH_DISABLE_ADAPTER_4GTEST)
|
#if defined(CONFIG_ADAPTER_4G_EC200T) && !defined(CONFIG_NSH_DISABLE_ADAPTER_4GTEST)
|
||||||
extern int Adapter4GTest(void);
|
extern int Adapter4GTest(void);
|
||||||
int cmd_Adapter4GTest(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
int cmd_Adapter4GTest(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||||
|
|
|
@ -700,6 +700,10 @@ static const struct cmdmap_s g_cmdmap[] =
|
||||||
{ "AdapterLoraTest", cmd_AdapterLoraTest, 1, 1, "[Lora test.]" },
|
{ "AdapterLoraTest", cmd_AdapterLoraTest, 1, 1, "[Lora test.]" },
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_ARCH_BOARD_EDU_RISCV64) && defined(CONFIG_K210_UART2)
|
||||||
|
{ "TestLora", cmd_TestLora, 1, 1, "[e220 Lora test.]" },
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_ADAPTER_4G_EC200T) && !defined(CONFIG_NSH_DISABLE_ADAPTER_4GTEST)
|
#if defined(CONFIG_ADAPTER_4G_EC200T) && !defined(CONFIG_NSH_DISABLE_ADAPTER_4GTEST)
|
||||||
{ "Adapter4GTest", cmd_Adapter4GTest, 1, 1, "[4G ec200t test.]" },
|
{ "Adapter4GTest", cmd_Adapter4GTest, 1, 1, "[4G ec200t test.]" },
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue