Browse Source

modify sensor framework kconfig function

master
Liu_Weichao 10 months ago
parent
commit
281482855d
  1. 28
      APP_Framework/Applications/framework_init.c
  2. 11
      APP_Framework/Applications/sensor_app/Kconfig
  3. 2
      APP_Framework/Framework/sensor/co2/zg09/zg09.c
  4. 4
      APP_Framework/Framework/sensor/humidity/Kconfig
  5. 2
      APP_Framework/Framework/sensor/humidity/hs300x_humi/hs300x_humi.c
  6. 2
      APP_Framework/Framework/sensor/pm/ps5308/ps5308.c
  7. 2
      APP_Framework/Framework/sensor/sensor.c
  8. 2
      APP_Framework/Framework/sensor/temperature/hs300x_temp/hs300x_temp.c
  9. 2
      APP_Framework/Framework/sensor/voice/d124/d124.c
  10. 5
      Ubiquitous/XiUOS/board/aiit-arm32-board/.defconfig
  11. 5
      Ubiquitous/XiUOS/board/aiit-riscv64-board/.defconfig
  12. 5
      Ubiquitous/XiUOS/board/cortex-m3-emulator/.defconfig
  13. 5
      Ubiquitous/XiUOS/board/hifive1-emulator/.defconfig
  14. 5
      Ubiquitous/XiUOS/board/hifive1-rev-B/.defconfig
  15. 5
      Ubiquitous/XiUOS/board/k210-emulator/.defconfig
  16. 5
      Ubiquitous/XiUOS/board/kd233/.defconfig
  17. 5
      Ubiquitous/XiUOS/board/maix-go/.defconfig
  18. 5
      Ubiquitous/XiUOS/board/stm32f407-st-discovery/.defconfig
  19. 5
      Ubiquitous/XiUOS/board/stm32f407zgt6/.defconfig
  20. 4
      Ubiquitous/XiUOS/path_kernel.mk

28
APP_Framework/Applications/framework_init.c

@ -49,7 +49,7 @@ static int AppInitDesc(struct InitDesc sub_desc[])
static struct InitDesc framework[] =
{
#ifdef SUPPORT_SENSOR_FRAMEWORK
{ "perception_framework", SensorFrameworkInit },
{ "sensor_framework", SensorFrameworkInit },
#endif
#ifdef SUPPORT_CONNECTION_FRAMEWORK
@ -59,13 +59,13 @@ static struct InitDesc framework[] =
{ "NULL", NULL },
};
static struct InitDesc perception_desc[] =
static struct InitDesc sensor_desc[] =
{
#ifdef PERCEPTION_D124
#ifdef SENSOR_DEVICE_ZG09
{ "d124_voice", D124VoiceInit },
#endif
#ifdef PERCEPTION_HS300X
#ifdef SENSOR_DEVICE_HS300X
#ifdef SENSOR_QUANTITY_HS300X_TEMPERATURE
{ "hs300x_temperature", Hs300xTemperatureInit },
#endif
@ -74,13 +74,13 @@ static struct InitDesc perception_desc[] =
#endif
#endif
#ifdef PERCEPTION_PS5308
#ifdef SENSOR_PS5308
#ifdef SENSOR_QUANTITY_PS5308_PM1_0
{ "ps5308_pm1_0", Ps5308Pm1_0Init },
#endif
#endif
#ifdef PERCEPTION_ZG09
#ifdef SENSOR_ZG09
{ "zg09_co2", Zg09Co2Init },
#endif
@ -99,24 +99,24 @@ static struct InitDesc connection_desc[] =
};
/**
* This function will init perception framework and all sub perception sensors
* This function will init sensor framework and all sub sensors
* @param sub_desc framework
*
*/
static int PerceptionFrameworkInit(struct InitDesc sub_desc[])
static int SensorDeviceFrameworkInit(struct InitDesc sub_desc[])
{
int i = 0;
int ret = 0;
for ( i = 0; sub_desc[i].fn != NULL; i++ ) {
if (0 == strncmp(sub_desc[i].fn_name, "perception_framework", strlen("perception_framework"))) {
if (0 == strncmp(sub_desc[i].fn_name, "sensor_framework", strlen("sensor_framework"))) {
ret = sub_desc[i].fn();
break;
}
}
if (0 == ret) {
printf("initialize perception_framework success.\n");
AppInitDesc(perception_desc);
printf("initialize sensor_framework success.\n");
AppInitDesc(sensor_desc);
}
return ret;
@ -127,7 +127,7 @@ static int PerceptionFrameworkInit(struct InitDesc sub_desc[])
* @param sub_desc framework
*
*/
static int ConnectionFrameworkInit(struct InitDesc sub_desc[])
static int ConnectionDeviceFrameworkInit(struct InitDesc sub_desc[])
{
int i = 0;
int ret = 0;
@ -153,11 +153,11 @@ static int ConnectionFrameworkInit(struct InitDesc sub_desc[])
int FrameworkInit()
{
#ifdef SUPPORT_SENSOR_FRAMEWORK
PerceptionFrameworkInit(framework);
SensorDeviceFrameworkInit(framework);
#endif
#ifdef SUPPORT_CONNECTION_FRAMEWORK
ConnectionFrameworkInit(framework);
ConnectionDeviceFrameworkInit(framework);
#endif
return 0;

11
APP_Framework/Applications/sensor_app/Kconfig

@ -3,67 +3,56 @@ menu "sensor app"
menuconfig APPLICATION_SENSOR
bool "Using sensor apps"
default n
select PERCEPTION_SENSORDEVICE
if APPLICATION_SENSOR
menuconfig APPLICATION_SENSOR_CO2
bool "Using sensor CO2 apps"
default n
select PERCEPTION_CO2
if APPLICATION_SENSOR_CO2
config APPLICATION_SENSOR_CO2_ZG09
bool "Using sensor ZG09 apps"
default n
select PERCEPTION_ZG09
endif
menuconfig APPLICATION_SENSOR_PM1_0
bool "Using sensor PM1.0 apps"
default n
select PERCEPTION_PM
if APPLICATION_SENSOR_PM1_0
config APPLICATION_SENSOR_PM1_0_PS5308
bool "Using sensor PS5308 apps"
default n
select PERCEPTION_PS5308
endif
menuconfig APPLICATION_SENSOR_VOICE
bool "Using sensor voice apps"
default n
select PERCEPTION_VOICE
if APPLICATION_SENSOR_VOICE
config APPLICATION_SENSOR_VOICE_D124
bool "Using sensor D124 apps"
default n
select PERCEPTION_D124
endif
menuconfig APPLICATION_SENSOR_HUMIDITY
bool "Using sensor humidity apps"
default n
select PERCEPTION_HUMIDITY
if APPLICATION_SENSOR_HUMIDITY
config APPLICATION_SENSOR_HUMIDITY_HS300X
bool "Using sensor HS300x apps"
default n
select PERCEPTION_HS300X
endif
menuconfig APPLICATION_SENSOR_TEMPERATURE
bool "Using sensor temperature apps"
default n
select PERCEPTION_TEMPERATURE
if APPLICATION_SENSOR_TEMPERATURE
config APPLICATION_SENSOR_TEMPERATURE_HS300X
bool "Using sensor HS300x apps"
default n
select PERCEPTION_HS300X
endif
endif

2
APP_Framework/Framework/sensor/co2/zg09/zg09.c

@ -12,7 +12,7 @@
/**
* @file zg09.c
* @brief ZG09 CO2 driver base perception
* @brief ZG09 CO2 driver base sensor
* @version 1.0
* @author AIIT XUOS Lab
* @date 2021.04.22

4
APP_Framework/Framework/sensor/humidity/Kconfig

@ -1,9 +1,9 @@
config PERCEPTION_HS300X
config SENSOR_HS300X
bool "Using HS300x"
default n
if PERCEPTION_HS300X
if SENSOR_HS300X
config SENSOR_DEVICE_HS300X
string "HS300x sensor name"
default "hs300x_1"

2
APP_Framework/Framework/sensor/humidity/hs300x_humi/hs300x_humi.c

@ -12,7 +12,7 @@
/**
* @file hs300x_humi.c
* @brief HS300x humidity driver base perception
* @brief HS300x humidity driver base sensor
* @version 1.0
* @author AIIT XUOS Lab
* @date 2021.04.22

2
APP_Framework/Framework/sensor/pm/ps5308/ps5308.c

@ -12,7 +12,7 @@
/**
* @file ps5308.c
* @brief PS5308 PM1.0, PM2.5, PM10, driver base perception
* @brief PS5308 PM1.0, PM2.5, PM10, driver base sensor
* @version 1.0
* @author AIIT XUOS Lab
* @date 2021.04.22

2
APP_Framework/Framework/sensor/sensor.c

@ -33,7 +33,7 @@ static pthread_mutex_t quant_table_lock;
static pthread_mutex_t sensor_device_list_lock;
/**
* @description: Init perception framework
* @description: Init sensor framework
* @return 0
*/
int SensorFrameworkInit(void)

2
APP_Framework/Framework/sensor/temperature/hs300x_temp/hs300x_temp.c

@ -12,7 +12,7 @@
/**
* @file hs300x_temp.c
* @brief HS300x temperature driver base perception
* @brief HS300x temperature driver base sensor
* @version 1.0
* @author AIIT XUOS Lab
* @date 2021.04.22

2
APP_Framework/Framework/sensor/voice/d124/d124.c

@ -12,7 +12,7 @@
/**
* @file d124.c
* @brief D124 voice driver base perception
* @brief D124 voice driver base sensor
* @version 1.0
* @author AIIT XUOS Lab
* @date 2021.04.22

5
Ubiquitous/XiUOS/board/aiit-arm32-board/.defconfig

@ -187,11 +187,6 @@ CONFIG_FS_VFS_DEVFS=y
# APP Framework
#
#
# Perception
#
# CONFIG_PERCEPTION_SENSORDEVICE is not set
#
# connection
#

5
Ubiquitous/XiUOS/board/aiit-riscv64-board/.defconfig

@ -235,11 +235,6 @@ CONFIG_FS_VFS_DEVFS=y
# APP Framework
#
#
# Perception
#
# CONFIG_PERCEPTION_SENSORDEVICE is not set
#
# connection
#

5
Ubiquitous/XiUOS/board/cortex-m3-emulator/.defconfig

@ -210,11 +210,6 @@ CONFIG_FS_DFS=n
# APP Framework
#
#
# Perception
#
# CONFIG_PERCEPTION_SENSORDEVICE is not set
#
# connection
#

5
Ubiquitous/XiUOS/board/hifive1-emulator/.defconfig

@ -208,11 +208,6 @@ CONFIG_FS_DFS=n
# APP Framework
#
#
# Perception
#
# CONFIG_PERCEPTION_SENSORDEVICE is not set
#
# connection
#

5
Ubiquitous/XiUOS/board/hifive1-rev-B/.defconfig

@ -208,11 +208,6 @@ CONFIG_FS_DFS=n
# APP Framework
#
#
# Perception
#
# CONFIG_PERCEPTION_SENSORDEVICE is not set
#
# connection
#

5
Ubiquitous/XiUOS/board/k210-emulator/.defconfig

@ -200,11 +200,6 @@ CONFIG_FS_VFS_DEVFS=y
# APP Framework
#
#
# Perception
#
# CONFIG_PERCEPTION_SENSORDEVICE is not set
#
# connection
#

5
Ubiquitous/XiUOS/board/kd233/.defconfig

@ -200,11 +200,6 @@ CONFIG_FS_VFS_DEVFS=y
# APP Framework
#
#
# Perception
#
# CONFIG_PERCEPTION_SENSORDEVICE is not set
#
# connection
#

5
Ubiquitous/XiUOS/board/maix-go/.defconfig

@ -201,11 +201,6 @@ CONFIG_FS_VFS_DEVFS=y
# APP Framework
#
#
# Perception
#
# CONFIG_PERCEPTION_SENSORDEVICE is not set
#
# connection
#

5
Ubiquitous/XiUOS/board/stm32f407-st-discovery/.defconfig

@ -185,11 +185,6 @@ CONFIG_FS_VFS_DEVFS=y
# APP Framework
#
#
# Perception
#
# CONFIG_PERCEPTION_SENSORDEVICE is not set
#
# connection
#

5
Ubiquitous/XiUOS/board/stm32f407zgt6/.defconfig

@ -186,11 +186,6 @@ CONFIG_FS_VFS_DEVFS=y
# APP Framework
#
#
# Perception
#
# CONFIG_PERCEPTION_SENSORDEVICE is not set
#
# connection
#

4
Ubiquitous/XiUOS/path_kernel.mk

@ -164,10 +164,6 @@ ifeq ($(CONFIG_FS_CH376), y)
KERNELPATHS +=-I$(KERNEL_ROOT)/fs/compatibility_ch376 #
endif
# ifeq ($(CONFIG_PERCEPTION_SENSORDEVICE), y)
# KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/sensor #
# endif
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/transform_layer/xiuos/user_api/posix_support/include #
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/sensor #
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/transform_layer/xiuos #

Loading…
Cancel
Save