Skip to content

Commit

Permalink
Merge pull request #2 from CXSforHPU/adapt
Browse files Browse the repository at this point in the history
更改头文件位置,引出初始化函数,添加scons 脚本
  • Loading branch information
zyk6271 authored Oct 7, 2024
2 parents 5af614c + c2a9f8f commit db374a3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
17 changes: 17 additions & 0 deletions SConscript
Original file line number Diff line number Diff line change
@@ -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')
6 changes: 1 addition & 5 deletions sensor_st_sths34pf80.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <rtdbg.h>


static STHS34PF80_Object_t sths34pf80;
static struct rt_i2c_bus_device *i2c_bus_dev;
Expand Down
7 changes: 7 additions & 0 deletions sensor_st_sths34pf80.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <rtdbg.h>

int rt_hw_sths34pf80_init(const char *name, struct rt_sensor_config *cfg);



Expand Down

0 comments on commit db374a3

Please # to comment.