Framework/sensor/hs300x

1.Kconfig is ok.
2.gcc is ok.
This commit is contained in:
yl1185 2022-06-23 14:48:53 +08:00
parent 15a8589770
commit 81fbf93dd2
4 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,10 @@
from building import *
import os
cwd = GetCurrentDir()
src = []
if GetDepend(['SENSOR_HS300X_HUMIDITY']):
src += ['hs300x_humi.c']
group = DefineGroup('sensor humidity hs300x', src, depend = [], CPPPATH = [cwd])
Return('group')

View File

@ -34,6 +34,12 @@ config SENSOR_HS300X_TEMPERATURE
endif
if ADD_RTTHREAD_FETURES
config SENSOR_DEVICE_HS300X_DEV
string "HS300x device name"
default "/dev/i2c1"
config SENSOR_DEVICE_HS300X_I2C_ADDR
hex "HS300x device i2c address"
default 0x44
endif
endif

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,10 @@
from building import *
import os
cwd = GetCurrentDir()
src = []
if GetDepend(['SENSOR_HS300X_TEMPERATURE']):
src += ['hs300x_temp.c']
group = DefineGroup('sensor temperature hs300x', src, depend = [], CPPPATH = [cwd])
Return('group')