forked from xuos/xiuos
Merge branch 'prepare_for_master' of https://gitlink.org.cn/xuos/xiuos into prepare_for_master
This commit is contained in:
commit
057a6d6bb4
|
@ -4,12 +4,12 @@
|
|||
[submodule "Ubiquitous/RT_Thread/aiit_board/k210/kendryte-sdk/kendryte-sdk-source"]
|
||||
path = Ubiquitous/RT_Thread/aiit_board/k210/kendryte-sdk/kendryte-sdk-source
|
||||
url = https://code.gitlink.org.cn/chunyexixiaoyu/kendryte-sdk-source.git
|
||||
[submodule "Ubiquitous/Nuttx/apps"]
|
||||
path = Ubiquitous/Nuttx/apps
|
||||
url = https://gitlink.org.cn/wgzAIIT/incubator-nuttx-apps.git
|
||||
[submodule "Ubiquitous/Nuttx/nuttx"]
|
||||
path = Ubiquitous/Nuttx/nuttx
|
||||
url = https://gitlink.org.cn/wgzAIIT/incubator-nuttx.git
|
||||
[submodule "Ubiquitous/RT_Thread/aiit_board/aiit-riscv64-board/kendryte-sdk/kendryte-sdk-source"]
|
||||
path = Ubiquitous/RT_Thread/aiit_board/aiit-riscv64-board/kendryte-sdk/kendryte-sdk-source
|
||||
url = https://code.gitlink.org.cn/chunyexixiaoyu/kendryte-sdk-source.git
|
||||
[submodule "Ubiquitous/Nuttx_Fusion_XiUOS/apps"]
|
||||
path = Ubiquitous/Nuttx_Fusion_XiUOS/apps
|
||||
url = https://code.gitlink.org.cn/wgzAIIT/incubator-nuttx-apps.git
|
||||
[submodule "Ubiquitous/Nuttx_Fusion_XiUOS/nuttx"]
|
||||
path = Ubiquitous/Nuttx_Fusion_XiUOS/nuttx
|
||||
url = https://code.gitlink.org.cn/wgzAIIT/incubator-nuttx.git
|
||||
|
|
|
@ -1,21 +1,7 @@
|
|||
/*
|
||||
* File : spi_flash_sfud.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2006 - 2016, RT-Thread Development Team
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
|
|
|
@ -47,6 +47,14 @@ ifeq ($(CONFIG_ADD_NUTTX_FETURES),y)
|
|||
CSRCS += temperature_hs300x.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_APPLICATION_SENSOR_WINDDIRECTION_QS_FX), y)
|
||||
CSRCS += winddirection_qs_fx.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_APPLICATION_SENSOR_WINDSPEED_QS_FS), y)
|
||||
CSRCS += windspeed_qs_fs.c
|
||||
endif
|
||||
|
||||
include $(APPDIR)/Application.mk
|
||||
|
||||
endif
|
||||
|
|
|
@ -15,6 +15,10 @@ if GetDepend(['APPLICATION_SENSOR_HUMIDITY_HS300X']):
|
|||
SOURCES = ['humidity_hs300x.c'] + SOURCES
|
||||
if GetDepend(['APPLICATION_SENSOR_TEMPERATURE_HS300X']):
|
||||
SOURCES = ['temperature_hs300x.c'] + SOURCES
|
||||
if GetDepend(['APPLICATION_SENSOR_CH4_AS830']):
|
||||
SOURCES = ['ch4_as830.c'] + SOURCES
|
||||
if GetDepend(['APPLICATION_SENSOR_HCHO']):
|
||||
SOURCES = ['hcho_tb600b_wq_hcho1os.c'] + SOURCES
|
||||
path = [cwd]
|
||||
objs = DefineGroup('sensor_app', src = SOURCES, depend = DEPENDS,CPPPATH = path)
|
||||
Return("objs")
|
|
@ -34,5 +34,7 @@ void WindDirectionQsFx(void)
|
|||
printf("wind direction : %d degree\n", result);
|
||||
SensorQuantityClose(wind_direction);
|
||||
}
|
||||
#ifdef ADD_XIZI_FETURES
|
||||
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0)|SHELL_CMD_DISABLE_RETURN, WindDirectionQsFx, WindDirectionQsFx, WindDirectionQsFx function);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -34,5 +34,7 @@ void WindSpeedQsFs(void)
|
|||
printf("wind speed : %d.%d m/s\n", result/10, result%10);
|
||||
SensorQuantityClose(wind_speed);
|
||||
}
|
||||
#ifdef ADD_XIZI_FETURES
|
||||
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0)|SHELL_CMD_DISABLE_RETURN, WindSpeedQsFs, WindSpeedQsFs, WindSpeedQsFs function);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -43,6 +43,23 @@ config SENSOR_AS830
|
|||
endif
|
||||
|
||||
if ADD_RTTHREAD_FETURES
|
||||
config SENSOR_AS830_DRIVER_EXTUART
|
||||
bool "Using extra uart to support as830"
|
||||
default y
|
||||
|
||||
config SENSOR_DEVICE_AS830_DEV
|
||||
string "as830 device uart path"
|
||||
default "/dev/uart2"
|
||||
depends on !SENSOR_AS830_DRIVER_EXTUART
|
||||
|
||||
if SENSOR_AS830_DRIVER_EXTUART
|
||||
config SENSOR_DEVICE_AS830_DEV
|
||||
string "as830 device extra uart path"
|
||||
default "/dev/extuart_dev4"
|
||||
|
||||
config SENSOR_DEVICE_AS830_DEV_EXT_PORT
|
||||
int "if AS830 device using extuart, choose port"
|
||||
default "4"
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
import os
|
||||
Import('RTT_ROOT')
|
||||
from building import *
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
objs = []
|
||||
list = os.listdir(cwd)
|
||||
|
||||
for d in list:
|
||||
path = os.path.join(cwd, d)
|
||||
if os.path.isfile(os.path.join(path, 'SConscript')):
|
||||
objs = objs + SConscript(os.path.join(path, 'SConscript'))
|
||||
|
||||
Return('objs')
|
|
@ -0,0 +1,10 @@
|
|||
from building import *
|
||||
import os
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
src = []
|
||||
if GetDepend(['SENSOR_AS830']):
|
||||
src += ['as830.c']
|
||||
group = DefineGroup('sensor ch4 as830', src, depend = [], CPPPATH = [cwd])
|
||||
|
||||
Return('group')
|
|
@ -43,7 +43,24 @@ config SENSOR_ZG09
|
|||
endif
|
||||
|
||||
if ADD_RTTHREAD_FETURES
|
||||
config SENSOR_ZG09_DRIVER_EXTUART
|
||||
bool "Using extra uart to support zg09"
|
||||
default y
|
||||
|
||||
config SENSOR_DEVICE_ZG09_DEV
|
||||
string "zg09 device uart path"
|
||||
default "/dev/uart2_dev2"
|
||||
depends on !SENSOR_ZG09_DRIVER_EXTUART
|
||||
|
||||
if SENSOR_ZG09_DRIVER_EXTUART
|
||||
config SENSOR_DEVICE_ZG09_DEV
|
||||
string "zg09 device extra uart path"
|
||||
default "/dev/extuart_dev4"
|
||||
|
||||
config SENSOR_DEVICE_ZG09_DEV_EXT_PORT
|
||||
int "if ZG09 device using extuart, choose port"
|
||||
default "4"
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
from building import *
|
||||
import os
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
src = []
|
||||
if GetDepend(['SENSOR_ZG09']):
|
||||
src += ['zg09.c']
|
||||
group = DefineGroup('sensor co2 zg09', src, depend = [], CPPPATH = [cwd])
|
||||
|
||||
Return('group')
|
|
@ -43,6 +43,23 @@ config SENSOR_TB600B_WQ_HCHO1OS
|
|||
endif
|
||||
|
||||
if ADD_RTTHREAD_FETURES
|
||||
config SENSOR_TB600B_WQ_HCHO1OS_DRIVER_EXTUART
|
||||
bool "Using extra uart to support tb600b wq_hcho1os"
|
||||
default y
|
||||
|
||||
config SENSOR_DEVICE_TB600B_WQ_HCHO1OS_DEV
|
||||
string "tb600b wq_hcho1os device uart path"
|
||||
default "/dev/uart2"
|
||||
depends on !SENSOR_TB600B_WQ_HCHO1OS_DRIVER_EXTUART
|
||||
|
||||
if SENSOR_TB600B_WQ_HCHO1OS_DRIVER_EXTUART
|
||||
config SENSOR_DEVICE_TB600B_WQ_HCHO1OS_DEV
|
||||
string "tb600b wq_hcho1os device extra uart path"
|
||||
default "/dev/extuart_dev1"
|
||||
|
||||
config SENSOR_DEVICE_TB600B_WQ_HCHO1OS_DEV_EXT_PORT
|
||||
int "if TB600B_WQ_HCHO1OS device using extuart, choose port"
|
||||
default "1"
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
import os
|
||||
Import('RTT_ROOT')
|
||||
from building import *
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
objs = []
|
||||
list = os.listdir(cwd)
|
||||
|
||||
for d in list:
|
||||
path = os.path.join(cwd, d)
|
||||
if os.path.isfile(os.path.join(path, 'SConscript')):
|
||||
objs = objs + SConscript(os.path.join(path, 'SConscript'))
|
||||
|
||||
Return('objs')
|
|
@ -0,0 +1,10 @@
|
|||
from building import *
|
||||
import os
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
src = []
|
||||
if GetDepend(['SENSOR_TB600B_WQ_HCHO1OS']):
|
||||
src += ['tb600b_wq_hcho1os.c']
|
||||
group = DefineGroup('sensor hcho', src, depend = [], CPPPATH = [cwd])
|
||||
|
||||
Return('group')
|
|
@ -43,6 +43,23 @@ config SENSOR_D124
|
|||
endif
|
||||
|
||||
if ADD_RTTHREAD_FETURES
|
||||
config SENSOR_D124_DRIVER_EXTUART
|
||||
bool "Using extra uart to support D124"
|
||||
default y
|
||||
|
||||
config SENSOR_DEVICE_D124_DEV
|
||||
string "D124 device name"
|
||||
default "/dev/uart2_dev2"
|
||||
depends on !SENSOR_D124_DRIVER_EXTUART
|
||||
|
||||
if SENSOR_D124_DRIVER_EXTUART
|
||||
config SENSOR_DEVICE_D124_DEV
|
||||
string "D124 device extra uart path"
|
||||
default "/dev/extuart_dev4"
|
||||
|
||||
config SENSOR_DEVICE_D124_DEV_EXT_PORT
|
||||
int "if D124 device using extuart, choose port"
|
||||
default "4"
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -34,6 +34,11 @@ config SENSOR_QS_FX
|
|||
endif
|
||||
|
||||
if ADD_NUTTX_FETURES
|
||||
config SENSOR_DEVICE_QS_FX_DEV
|
||||
string "qs-fx device name"
|
||||
default "/dev/ttyS1"
|
||||
---help---
|
||||
If USART1 is selected, then fill in /dev/ttyS1 here.
|
||||
|
||||
endif
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
############################################################################
|
||||
# APP_Framework/Framework/sensor/winddirection/Make.defs
|
||||
############################################################################
|
||||
include $(wildcard $(APPDIR)/../../../APP_Framework/Framework/sensor/winddirection/*/Make.defs)
|
|
@ -0,0 +1,6 @@
|
|||
############################################################################
|
||||
# APP_Framework/Framework/sensor/winddirection/qs-fx/Make.defs
|
||||
############################################################################
|
||||
ifneq ($(CONFIG_SENSOR_QS_FX),)
|
||||
CONFIGURED_APPS += $(APPDIR)/../../../APP_Framework/Framework/sensor/winddirection/qs-fx
|
||||
endif
|
|
@ -1,3 +1,11 @@
|
|||
SRC_FILES := qs-fx.c
|
||||
include $(KERNEL_ROOT)/.config
|
||||
ifeq ($(CONFIG_ADD_NUTTX_FETURES),y)
|
||||
include $(APPDIR)/Make.defs
|
||||
CSRCS += qs-fx.c
|
||||
include $(APPDIR)/Application.mk
|
||||
endif
|
||||
|
||||
include $(KERNEL_ROOT)/compiler.mk
|
||||
ifeq ($(CONFIG_ADD_XIZI_FETURES),y)
|
||||
SRC_FILES := qs-fx.c
|
||||
include $(KERNEL_ROOT)/compiler.mk
|
||||
endif
|
||||
|
|
|
@ -35,6 +35,18 @@ static struct SensorProductInfo info =
|
|||
* @param sdev - sensor device pointer
|
||||
* @return success: 1 , failure: other
|
||||
*/
|
||||
#ifdef ADD_NUTTX_FETURES
|
||||
static int SensorDeviceOpen(struct SensorDevice *sdev)
|
||||
{
|
||||
sdev->fd = PrivOpen(SENSOR_DEVICE_QS_FX_DEV, O_RDWR);
|
||||
if (sdev->fd < 0) {
|
||||
printf("open %s error\n", SENSOR_DEVICE_QS_FX_DEV);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return sdev->fd ;
|
||||
}
|
||||
#else
|
||||
static int SensorDeviceOpen(struct SensorDevice *sdev)
|
||||
{
|
||||
int result = 0;
|
||||
|
@ -64,7 +76,8 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
result = PrivIoctl(sdev->fd, OPE_INT, &ioctl_cfg);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @description: Read sensor device
|
||||
|
|
|
@ -34,6 +34,11 @@ config SENSOR_QS_FS
|
|||
endif
|
||||
|
||||
if ADD_NUTTX_FETURES
|
||||
config SENSOR_DEVICE_QS_FS_DEV
|
||||
string "qs-fx device name"
|
||||
default "/dev/ttyS1"
|
||||
---help---
|
||||
If USART1 is selected, then fill in /dev/ttyS1 here.
|
||||
|
||||
endif
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
############################################################################
|
||||
# APP_Framework/Framework/sensor/windspeed/Make.defs
|
||||
############################################################################
|
||||
include $(wildcard $(APPDIR)/../../../APP_Framework/Framework/sensor/windspeed/*/Make.defs)
|
|
@ -0,0 +1,6 @@
|
|||
############################################################################
|
||||
# APP_Framework/Framework/sensor/windspeed/qs-fs/Make.defs
|
||||
############################################################################
|
||||
ifneq ($(CONFIG_SENSOR_QS_FS),)
|
||||
CONFIGURED_APPS += $(APPDIR)/../../../APP_Framework/Framework/sensor/windspeed/qs-fs
|
||||
endif
|
|
@ -1,3 +1,11 @@
|
|||
SRC_FILES := qs-fs.c
|
||||
include $(KERNEL_ROOT)/.config
|
||||
ifeq ($(CONFIG_ADD_NUTTX_FETURES),y)
|
||||
include $(APPDIR)/Make.defs
|
||||
CSRCS += qs-fs.c
|
||||
include $(APPDIR)/Application.mk
|
||||
endif
|
||||
|
||||
include $(KERNEL_ROOT)/compiler.mk
|
||||
ifeq ($(CONFIG_ADD_XIZI_FETURES),y)
|
||||
SRC_FILES := qs-fs.c
|
||||
include $(KERNEL_ROOT)/compiler.mk
|
||||
endif
|
||||
|
|
|
@ -35,6 +35,17 @@ static struct SensorProductInfo info =
|
|||
* @param sdev - sensor device pointer
|
||||
* @return success: 1 , failure: other
|
||||
*/
|
||||
#ifdef ADD_NUTTX_FETURES
|
||||
static int SensorDeviceOpen(struct SensorDevice *sdev)
|
||||
{
|
||||
sdev->fd = PrivOpen(SENSOR_DEVICE_QS_FS_DEV, O_RDWR);
|
||||
if (sdev->fd < 0) {
|
||||
printf("open %s error\n", SENSOR_DEVICE_QS_FS_DEV);
|
||||
return -1;
|
||||
}
|
||||
return sdev->fd;
|
||||
}
|
||||
#else
|
||||
static int SensorDeviceOpen(struct SensorDevice *sdev)
|
||||
{
|
||||
int result = 0;
|
||||
|
@ -65,6 +76,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @description: Read sensor device
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue