update transform in rt-thread and sensor framework

it is perfect
This commit is contained in:
xuedongliang
2021-09-27 16:48:22 +08:00
15 changed files with 454 additions and 8 deletions

View File

@@ -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:

View File

@@ -11,7 +11,7 @@
*/
#include <stdio.h>
#include <string.h>
#include <user_api.h>
#include <transform.h>
extern int SensorFrameworkInit(void);
extern int AdapterFrameworkInit(void);

View File

@@ -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')

View File

@@ -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")

View File

@@ -23,7 +23,7 @@
#define __LIST_H__
#include "libc.h"
#include<stddef.h>
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -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")

View File

@@ -18,7 +18,7 @@
* @date 2021.04.23
*/
#include <user_api.h>
#include <transform.h>
#include <sensor.h>
/**