|
|
@@ -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;
|
|
|
@@ -127,7 +123,7 @@ static rt_err_t _sths34pf80_set_odr(rt_sensor_t sensor, rt_uint16_t odr)
|
|
|
|
|
|
return RT_EOK;
|
|
|
}
|
|
|
-static rt_size_t _sths34pf80_polling_get_data(rt_sensor_t sensor, struct rt_sensor_data *data)
|
|
|
+static RT_SIZE_TYPE _sths34pf80_polling_get_data(rt_sensor_t sensor, struct rt_sensor_data *data)
|
|
|
{
|
|
|
uint16_t val;
|
|
|
switch(sensor->info.type)
|
|
|
@@ -182,7 +178,7 @@ static rt_err_t _sths34pf80_set_mode(rt_sensor_t sensor, rt_uint8_t mode)
|
|
|
}
|
|
|
return RT_EOK;
|
|
|
}
|
|
|
-static rt_size_t sths34pf80_fetch_data(struct rt_sensor_device *sensor, void *buf, rt_size_t len)
|
|
|
+static RT_SIZE_TYPE sths34pf80_fetch_data(struct rt_sensor_device *sensor, void *buf, rt_size_t len)
|
|
|
{
|
|
|
if (sensor->config.mode == RT_SENSOR_MODE_POLLING)
|
|
|
{
|