fix ADD_XIZI_FETURES/ADD_NUTTX_FETURES/ADD_RTTHREAD_FETURES error

This commit is contained in:
Liu_Weichao
2023-06-20 13:20:41 +08:00
parent 5c08cae005
commit cf85c4b99c
71 changed files with 190 additions and 190 deletions

View File

@@ -6,7 +6,7 @@ ifeq ($(CONFIG_ADD_NUTTX_FETURES),y)
endif
ifeq ($(ADD_XIZI_FETURES),y)
ifeq ($(ADD_XIZI_FEATURES),y)
include $(APPDIR)/Make.defs
CSRCS += sensor.c
include $(APPDIR)/Application.mk

View File

@@ -12,7 +12,7 @@ config SENSOR_BMP180
string "BMP180 quantity name"
default "altitude_1"
if ADD_XIZI_FETURES
if ADD_XIZI_FEATURES
config SENSOR_DEVICE_BMP180_DEV
string "BMP180 device name"
default "/dev/i2c1_dev0"
@@ -22,11 +22,11 @@ config SENSOR_BMP180
default 0x77
endif
if ADD_NUTTX_FETURES
if ADD_NUTTX_FEATURES
endif
if ADD_RTTHREAD_FETURES
if ADD_RTTHREAD_FEATURES
endif
endif

View File

@@ -12,7 +12,7 @@ config SENSOR_AS830
string "as830 quantity name"
default "ch4_1"
if ADD_XIZI_FETURES
if ADD_XIZI_FEATURES
config SENSOR_AS830_DRIVER_EXTUART
bool "Using extra uart to support as830"
default y
@@ -33,7 +33,7 @@ config SENSOR_AS830
endif
endif
if ADD_NUTTX_FETURES
if ADD_NUTTX_FEATURES
config SENSOR_DEVICE_AS830_DEV
string "as830 device uart path"
default "/dev/ttyS1"
@@ -42,7 +42,7 @@ config SENSOR_AS830
endif
if ADD_RTTHREAD_FETURES
if ADD_RTTHREAD_FEATURES
config SENSOR_AS830_DRIVER_EXTUART
bool "Using extra uart to support as830"
default y

View File

@@ -12,7 +12,7 @@ config SENSOR_ZG09
string "zg09 quantity name"
default "co2_1"
if ADD_XIZI_FETURES
if ADD_XIZI_FEATURES
config SENSOR_ZG09_DRIVER_EXTUART
bool "Using extra uart to support zg09"
default y
@@ -33,7 +33,7 @@ config SENSOR_ZG09
endif
endif
if ADD_NUTTX_FETURES
if ADD_NUTTX_FEATURES
config SENSOR_DEVICE_ZG09_DEV
string "CO2 device name"
default "/dev/ttyS1"
@@ -42,7 +42,7 @@ config SENSOR_ZG09
endif
if ADD_RTTHREAD_FETURES
if ADD_RTTHREAD_FEATURES
config SENSOR_ZG09_DRIVER_EXTUART
bool "Using extra uart to support zg09"
default y
@@ -78,7 +78,7 @@ config SENSOR_G8S
string "g8-s quantity name"
default "co2_2"
if ADD_XIZI_FETURES
if ADD_XIZI_FEATURES
config SENSOR_G8S_DRIVER_EXTUART
bool "Using extra uart to support g8-s"
default n
@@ -99,7 +99,7 @@ config SENSOR_G8S
endif
endif
if ADD_NUTTX_FETURES
if ADD_NUTTX_FEATURES
config SENSOR_DEVICE_G8S_DEV
string "CO2 device name"
default "/dev/ttyS3"
@@ -107,7 +107,7 @@ config SENSOR_G8S
If USART1 is selected, then fill in /dev/ttyS1 here.
endif
if ADD_RTTHREAD_FETURES
if ADD_RTTHREAD_FEATURES
endif
endif

View File

@@ -12,7 +12,7 @@ config SENSOR_TB600B_WQ_HCHO1OS
string "tb600b wq_hcho1os quantity name"
default "hcho_1"
if ADD_XIZI_FETURES
if ADD_XIZI_FEATURES
config SENSOR_TB600B_WQ_HCHO1OS_DRIVER_EXTUART
bool "Using extra uart to support tb600b wq_hcho1os"
default y
@@ -33,7 +33,7 @@ config SENSOR_TB600B_WQ_HCHO1OS
endif
endif
if ADD_NUTTX_FETURES
if ADD_NUTTX_FEATURES
config SENSOR_DEVICE_TB600B_WQ_HCHO1OS_DEV
string "tb600b wq_hcho1os device uart path"
default "/dev/ttyS1"
@@ -42,7 +42,7 @@ config SENSOR_TB600B_WQ_HCHO1OS
endif
if ADD_RTTHREAD_FETURES
if ADD_RTTHREAD_FEATURES
config SENSOR_TB600B_WQ_HCHO1OS_DRIVER_EXTUART
bool "Using extra uart to support tb600b wq_hcho1os"
default y

View File

@@ -12,7 +12,7 @@ config SENSOR_HS300X_HUMIDITY
string "HS300x quantity name"
default "humidity_1"
if ADD_XIZI_FETURES
if ADD_XIZI_FEATURES
config SENSOR_DEVICE_HS300X_DEV
string "HS300x device name"
default "/dev/i2c1_dev0"
@@ -23,7 +23,7 @@ config SENSOR_HS300X_HUMIDITY
endif
if ADD_NUTTX_FETURES
if ADD_NUTTX_FEATURES
config SENSOR_DEVICE_HS300X_DEV
string "HS300x device name"
default "/dev/i2c1_dev0"
@@ -34,7 +34,7 @@ config SENSOR_HS300X_HUMIDITY
endif
if ADD_RTTHREAD_FETURES
if ADD_RTTHREAD_FEATURES
config SENSOR_DEVICE_HS300X_DEV
string "HS300x device name"
default "/dev/i2c1"

View File

@@ -12,7 +12,7 @@ config SENSOR_TB600B_IAQ10
string "tb600b iaq10 quantity name"
default "iaq_1"
if ADD_XIZI_FETURES
if ADD_XIZI_FEATURES
config SENSOR_TB600B_IAQ10_DRIVER_EXTUART
bool "Using extra uart to support tb600b iaq10"
default y
@@ -33,7 +33,7 @@ config SENSOR_TB600B_IAQ10
endif
endif
if ADD_NUTTX_FETURES
if ADD_NUTTX_FEATURES
config SENSOR_DEVICE_TB600B_IAQ10_DEV
string "tb600b iaq10 device uart path"
default "/dev/ttyS1"
@@ -42,7 +42,7 @@ config SENSOR_TB600B_IAQ10
endif
if ADD_RTTHREAD_FETURES
if ADD_RTTHREAD_FEATURES
endif
endif

View File

@@ -38,7 +38,7 @@ config SENSOR_PS5308
default "pm10_1"
endif
if ADD_XIZI_FETURES
if ADD_XIZI_FEATURES
config SENSOR_PS5308_DRIVER_EXTUART
bool "Using extra uart to support PS5308"
default y
@@ -59,7 +59,7 @@ config SENSOR_PS5308
endif
endif
if ADD_NUTTX_FETURES
if ADD_NUTTX_FEATURES
config SENSOR_DEVICE_PS5308_DEV
string "PS5308 device name"
default "/dev/ttyS1"
@@ -68,7 +68,7 @@ config SENSOR_PS5308
endif
if ADD_RTTHREAD_FETURES
if ADD_RTTHREAD_FEATURES
endif
endif

View File

@@ -12,7 +12,7 @@ config SENSOR_HS300X_TEMPERATURE
string "HS300x quantity name"
default "temperature_1"
if ADD_XIZI_FETURES
if ADD_XIZI_FEATURES
config SENSOR_DEVICE_HS300X_DEV
string "HS300x device name"
default "/dev/i2c1_dev0"
@@ -22,7 +22,7 @@ config SENSOR_HS300X_TEMPERATURE
default 0x44
endif
if ADD_NUTTX_FETURES
if ADD_NUTTX_FEATURES
config SENSOR_DEVICE_HS300X_DEV
string "HS300x device name"
default "/dev/i2c1_dev0"
@@ -33,7 +33,7 @@ config SENSOR_HS300X_TEMPERATURE
endif
if ADD_RTTHREAD_FETURES
if ADD_RTTHREAD_FEATURES
config SENSOR_DEVICE_HS300X_DEV
string "HS300x device name"
default "/dev/i2c1"

View File

@@ -12,7 +12,7 @@ config SENSOR_TB600B_TVOC10
string "tb600b tvoc10 quantity name"
default "tvoc_1"
if ADD_XIZI_FETURES
if ADD_XIZI_FEATURES
config SENSOR_TB600B_TVOC10_DRIVER_EXTUART
bool "Using extra uart to support tb600b tvoc10"
default y
@@ -33,7 +33,7 @@ config SENSOR_TB600B_TVOC10
endif
endif
if ADD_NUTTX_FETURES
if ADD_NUTTX_FEATURES
config SENSOR_DEVICE_TB600B_TVOC10_DEV
string "tb600b tvoc10 device uart path"
default "/dev/ttyS1"
@@ -42,7 +42,7 @@ config SENSOR_TB600B_TVOC10
endif
if ADD_RTTHREAD_FETURES
if ADD_RTTHREAD_FEATURES
endif
endif

View File

@@ -12,7 +12,7 @@ config SENSOR_D124
string "D124 quantity voice name"
default "voice_1"
if ADD_XIZI_FETURES
if ADD_XIZI_FEATURES
config SENSOR_D124_DRIVER_EXTUART
bool "Using extra uart to support D124"
default y
@@ -33,7 +33,7 @@ config SENSOR_D124
endif
endif
if ADD_NUTTX_FETURES
if ADD_NUTTX_FEATURES
config SENSOR_DEVICE_D124_DEV
string "D124 device name"
default "/dev/ttyS1"
@@ -42,7 +42,7 @@ config SENSOR_D124
endif
if ADD_RTTHREAD_FETURES
if ADD_RTTHREAD_FEATURES
config SENSOR_D124_DRIVER_EXTUART
bool "Using extra uart to support D124"
default y

View File

@@ -51,7 +51,7 @@ static void *ReadTask(void *parameter)
* @param sdev - sensor device pointer
* @return success: 1 , failure: other
*/
#ifdef ADD_NUTTX_FETURES
#ifdef ADD_NUTTX_FEATURES
static int SensorDeviceOpen(struct SensorDevice *sdev)
{
int result = 0;

View File

@@ -12,7 +12,7 @@ config SENSOR_QS_FX
string "qs-fx quantity name"
default "winddirection_1"
if ADD_XIZI_FETURES
if ADD_XIZI_FEATURES
config SENSOR_QS_FX_DRIVER_EXTUART
bool "Using extra uart to support qs-fx"
default y
@@ -41,7 +41,7 @@ config SENSOR_QS_FX
endif
endif
if ADD_NUTTX_FETURES
if ADD_NUTTX_FEATURES
config SENSOR_DEVICE_QS_FX_DEV
string "qs-fx device name"
default "/dev/ttyS1"
@@ -50,7 +50,7 @@ config SENSOR_QS_FX
endif
if ADD_RTTHREAD_FETURES
if ADD_RTTHREAD_FEATURES
endif
endif

View File

@@ -69,7 +69,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
return result;
}
#ifdef ADD_XIZI_FETURES
#ifdef ADD_XIZI_FEATURES
static int PinOpen(void){
int pin_fd = PrivOpen(SENSOR_DEVICE_QS_FX_PIN_DEV, O_RDWR);
if (pin_fd < 0) {
@@ -106,7 +106,7 @@ static int PinOpen(void){
*/
static int SensorDeviceRead(struct SensorDevice *sdev, size_t len)
{
#ifdef ADD_XIZI_FETURES
#ifdef ADD_XIZI_FEATURES
int pin_fd=PinOpen();
struct PinStat pin_dir;
pin_dir.pin = SENSOR_DEVICE_QS_FX_PIN_NUMBER;
@@ -120,7 +120,7 @@ static int SensorDeviceRead(struct SensorDevice *sdev, size_t len)
return -1;
PrivTaskDelay(20);
#ifdef ADD_XIZI_FETURES
#ifdef ADD_XIZI_FEATURES
pin_dir.val = GPIO_LOW;
if (PrivWrite(pin_fd,&pin_dir,0) < 0) // pull-down pin to configure as rx mode
return -1;

View File

@@ -12,7 +12,7 @@ config SENSOR_QS_FS
string "qs-fs quantity name"
default "windspeed_1"
if ADD_XIZI_FETURES
if ADD_XIZI_FEATURES
config SENSOR_QS_FS_DRIVER_EXTUART
bool "Using extra uart to support qs-fx"
default y
@@ -41,7 +41,7 @@ config SENSOR_QS_FS
endif
endif
if ADD_NUTTX_FETURES
if ADD_NUTTX_FEATURES
config SENSOR_DEVICE_QS_FS_DEV
string "qs-fx device name"
default "/dev/ttyS1"
@@ -50,7 +50,7 @@ config SENSOR_QS_FS
endif
if ADD_RTTHREAD_FETURES
if ADD_RTTHREAD_FEATURES
endif
endif

View File

@@ -68,7 +68,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
return result;
}
#ifdef ADD_XIZI_FETURES
#ifdef ADD_XIZI_FEATURES
static int PinOpen(void){
int pin_fd = PrivOpen(SENSOR_DEVICE_QS_FS_PIN_DEV, O_RDWR);
if (pin_fd < 0) {
@@ -106,7 +106,7 @@ static int PinOpen(void){
*/
static int SensorDeviceRead(struct SensorDevice *sdev, size_t len)
{
#ifdef ADD_XIZI_FETURES
#ifdef ADD_XIZI_FEATURES
int pin_fd=PinOpen();
struct PinStat pin_dir;
pin_dir.pin = SENSOR_DEVICE_QS_FS_PIN_NUMBER;
@@ -121,7 +121,7 @@ static int SensorDeviceRead(struct SensorDevice *sdev, size_t len)
return -1;
PrivTaskDelay(20);
#ifdef ADD_XIZI_FETURES
#ifdef ADD_XIZI_FEATURES
pin_dir.val = GPIO_LOW;
if (PrivWrite(pin_fd,&pin_dir,0) < 0) // pull-down pin to configure as rx mode
return -1;