diff --git a/SConscript b/SConscript new file mode 100644 index 0000000..fe1abfb --- /dev/null +++ b/SConscript @@ -0,0 +1,17 @@ +from building import * +Import('rtconfig') + +src = [] +cwd = GetCurrentDir() + +src += Glob('sensor_st_sths34pf80.c.c') +src += Glob('libraries/sths34pf80_reg.c') +src += Glob('libraries/sths34pf80.c') + +# add sths34pf80 include path. +path = [cwd, cwd + '/libraries'] + +# add src and include to group. +group = DefineGroup('sths34pf80', src, depend = ['PKG_USING_STHS34PF80'], CPPPATH = path) + +Return('group') diff --git a/sensor_st_sths34pf80.c b/sensor_st_sths34pf80.c index d67f906..59e6504 100644 --- a/sensor_st_sths34pf80.c +++ b/sensor_st_sths34pf80.c @@ -7,15 +7,11 @@ * Date Author Notes * 2023-01-29 Rick the first version */ -#include "rtthread.h" -#include "rtdevice.h" -#include "stdint.h" -#include "sths34pf80.h" #include "sensor_st_sths34pf80.h" #define DBG_TAG "sensor.st.sths34pf80" #define DBG_LVL DBG_LOG -#include + static STHS34PF80_Object_t sths34pf80; static struct rt_i2c_bus_device *i2c_bus_dev; diff --git a/sensor_st_sths34pf80.h b/sensor_st_sths34pf80.h index db24fea..1a08795 100644 --- a/sensor_st_sths34pf80.h +++ b/sensor_st_sths34pf80.h @@ -9,6 +9,13 @@ */ #ifndef APPLICATIONS_SENSOR_ST_S34F80_H_ #define APPLICATIONS_SENSOR_ST_S34F80_H_ +#include "rtthread.h" +#include "rtdevice.h" +#include "stdint.h" +#include "sths34pf80.h" +#include + +int rt_hw_sths34pf80_init(const char *name, struct rt_sensor_config *cfg);