forked from xuos/xiuos
sync the upstream branch
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
import os
|
||||
Import('RTT_ROOT')
|
||||
Import('rtconfig')
|
||||
from building import *
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
|
||||
SOURCES = ['framework_init.c']
|
||||
path = [cwd]
|
||||
objs = []
|
||||
group = DefineGroup('sensor', SOURCES, depend = [], CPPPATH = [cwd])
|
||||
objs = objs + group
|
||||
list = os.listdir(cwd)
|
||||
|
||||
for d in list:
|
||||
|
||||
@@ -11,12 +11,13 @@
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <user_api.h>
|
||||
#include <transform.h>
|
||||
|
||||
extern int SensorFrameworkInit(void);
|
||||
extern int AdapterFrameworkInit(void);
|
||||
|
||||
extern int Adapter4GInit(void);
|
||||
extern int AdapterBlueToothInit(void);
|
||||
extern int AdapterWifiInit(void);
|
||||
extern int AdapterZigbeeInit(void);
|
||||
|
||||
@@ -90,13 +91,16 @@ static struct InitDesc sensor_desc[] =
|
||||
|
||||
static struct InitDesc connection_desc[] =
|
||||
{
|
||||
#ifdef ADAPTER_4G
|
||||
#ifdef CONNECTION_ADAPTER_4G
|
||||
{ "4G adpter", Adapter4GInit},
|
||||
#endif
|
||||
#ifdef CONNECTION_ADAPTER_ZIGBEE
|
||||
{ "zigbee adpter", AdapterZigbeeInit},
|
||||
#endif
|
||||
#ifdef ADAPTER_WIFI
|
||||
#ifdef CONNECTION_ADAPTER_BLUETOOTH
|
||||
{ "BlueTooth adpter", AdapterBlueToothInit},
|
||||
#endif
|
||||
#ifdef CONNECTION_ADAPTER_WIFI
|
||||
{ "Wifi adpter", AdapterWifiInit},
|
||||
#endif
|
||||
{ "NULL", NULL },
|
||||
|
||||
@@ -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,11 @@
|
||||
import os
|
||||
from building import *
|
||||
Import('RTT_ROOT')
|
||||
Import('rtconfig')
|
||||
cwd = GetCurrentDir()
|
||||
DEPENDS = [""]
|
||||
|
||||
SOURCES = ['double_list.c'] + ['single_list.c']
|
||||
path = [cwd]
|
||||
objs = DefineGroup('list', src = SOURCES, depend = DEPENDS,CPPPATH = path)
|
||||
Return("objs")
|
||||
@@ -23,7 +23,7 @@
|
||||
#define __LIST_H__
|
||||
|
||||
#include "libc.h"
|
||||
|
||||
#include<stddef.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import os
|
||||
from building import *
|
||||
Import('RTT_ROOT')
|
||||
Import('rtconfig')
|
||||
cwd = GetCurrentDir()
|
||||
DEPENDS = ["SUPPORT_SENSOR_FRAMEWORK"]
|
||||
SOURCES = []
|
||||
if GetDepend(['APPLICATION_SENSOR_CO2_ZG09']):
|
||||
SOURCES = ['co2_zg09.c'] + SOURCES
|
||||
if GetDepend(['APPLICATION_SENSOR_PM1_0_PS5308']):
|
||||
SOURCES = ['pm1_0_ps5308.c.c'] + SOURCES
|
||||
if GetDepend(['APPLICATION_SENSOR_VOICE_D124']):
|
||||
SOURCES = ['voice_d124.c'] + SOURCES
|
||||
if GetDepend(['APPLICATION_SENSOR_HUMIDITY_HS300X']):
|
||||
SOURCES = ['humidity_hs300x.c'] + SOURCES
|
||||
if GetDepend(['APPLICATION_SENSOR_TEMPERATURE_HS300X']):
|
||||
SOURCES = ['temperature_hs300x.c'] + SOURCES
|
||||
path = [cwd]
|
||||
objs = DefineGroup('sensor_app', src = SOURCES, depend = DEPENDS,CPPPATH = path)
|
||||
Return("objs")
|
||||
@@ -18,7 +18,7 @@
|
||||
* @date 2021.04.23
|
||||
*/
|
||||
|
||||
#include <user_api.h>
|
||||
#include <transform.h>
|
||||
#include <sensor.h>
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user