From 109efcbcd5fe63429534aaf9a06a4fb30f76241f Mon Sep 17 00:00:00 2001 From: DavidLin1577 Date: Wed, 23 Jun 2021 14:40:02 +0800 Subject: [PATCH] [components/drivers] added function declaration --- components/drivers/sensors/sensor.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/components/drivers/sensors/sensor.h b/components/drivers/sensors/sensor.h index 761ee49b4c..df70e96690 100755 --- a/components/drivers/sensors/sensor.h +++ b/components/drivers/sensors/sensor.h @@ -6,9 +6,26 @@ * Change Logs: * Date Author Notes * 2019-01-31 flybreak first version + * 2021-06-23 linpeng added function declaration */ +#ifndef __SENSOR_H__ +#define __SENSOR_H__ #include -#include +#ifdef __cplusplus +extern "C" +{ +#endif + +int rt_hw_sensor_register(rt_sensor_t sensor, + const char *name, + rt_uint32_t flag, + void *data); + +#ifdef __cplusplus +} +#endif + +#endif /*__SENSOR_H__*/