From 9d1e3b8ef340bab523be6f7de0dfaf894e677e26 Mon Sep 17 00:00:00 2001 From: yl1185 <1182784652@qq.com> Date: Thu, 23 Jun 2022 14:08:49 +0800 Subject: [PATCH] Ubiquitous/RT-Thread_Fusion_XiUOS/app_match_rt-thread/ hs300x 1.Kconfig is ok. 2.gcc is ok. --- .../app_match_rt-thread/Kconfig | 2 ++ .../app_match_rt-thread/hs300x/Kconfig | 23 +++++++++++++++++++ .../app_match_rt-thread/hs300x/SConscript | 7 ++++++ .../hs300x/hs300x_source/SConscript | 14 +++++++++++ 4 files changed, 46 insertions(+) create mode 100644 Ubiquitous/RT-Thread_Fusion_XiUOS/app_match_rt-thread/hs300x/Kconfig create mode 100644 Ubiquitous/RT-Thread_Fusion_XiUOS/app_match_rt-thread/hs300x/SConscript create mode 100644 Ubiquitous/RT-Thread_Fusion_XiUOS/app_match_rt-thread/hs300x/hs300x_source/SConscript diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/app_match_rt-thread/Kconfig b/Ubiquitous/RT-Thread_Fusion_XiUOS/app_match_rt-thread/Kconfig index 14ddb6557..4bae294f6 100644 --- a/Ubiquitous/RT-Thread_Fusion_XiUOS/app_match_rt-thread/Kconfig +++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/app_match_rt-thread/Kconfig @@ -2,4 +2,6 @@ menu "More Drivers" source "$RT_Thread_DIR/app_match_rt-thread/rw007/Kconfig" source "$RT_Thread_DIR/app_match_rt-thread/ov2640/Kconfig" +source "$RT_Thread_DIR/app_match_rt-thread/hs300x/Kconfig" +source "$RT_Thread_DIR/app_match_rt-thread/sx1278/Kconfig" endmenu diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/app_match_rt-thread/hs300x/Kconfig b/Ubiquitous/RT-Thread_Fusion_XiUOS/app_match_rt-thread/hs300x/Kconfig new file mode 100644 index 000000000..1edfc9f8b --- /dev/null +++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/app_match_rt-thread/hs300x/Kconfig @@ -0,0 +1,23 @@ + +menuconfig DRV_USING_HS300X + bool "hs300x driver" + default n + help + note: + hs300x can read Temperature and Humidity + +if DRV_USING_HS300X + config SENSOR_DEVICE_HS300X + string "HS300x sensor name" + default "HS300x" + config HS300X_DEV_ADDRESS + hex "hs300x device i2c address" + default 0x22 + config HS300X_TEMP_RANGE_MAX + int "max temperature" + default 80 + config HS300X_TEMP_RANGE_MIN + int "min temperature" + default -10 +endif + diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/app_match_rt-thread/hs300x/SConscript b/Ubiquitous/RT-Thread_Fusion_XiUOS/app_match_rt-thread/hs300x/SConscript new file mode 100644 index 000000000..1e9cdf022 --- /dev/null +++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/app_match_rt-thread/hs300x/SConscript @@ -0,0 +1,7 @@ +Import('RTT_ROOT') +from building import * + +cwd = GetCurrentDir() +objs = SConscript(os.path.join(cwd, 'hs300x_source', 'SConscript')) + +Return('objs') diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/app_match_rt-thread/hs300x/hs300x_source/SConscript b/Ubiquitous/RT-Thread_Fusion_XiUOS/app_match_rt-thread/hs300x/hs300x_source/SConscript new file mode 100644 index 000000000..42837cf00 --- /dev/null +++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/app_match_rt-thread/hs300x/hs300x_source/SConscript @@ -0,0 +1,14 @@ +import os +from building import * +Import('RTT_ROOT') +Import('rtconfig') +cwd = GetCurrentDir() +DEPENDS = ["DRV_USING_HS300X"] + +SOURCES = [] +if GetDepend(['DRV_USING_HS300X']): + SOURCES += ['drv_hs300x.c'] +path = [cwd] +objs = DefineGroup('hs300x', src = SOURCES, depend = DEPENDS,CPPPATH = path) + +Return("objs") \ No newline at end of file