Skip to content

Commit 109efcb

Browse files
committed
[components/drivers]
added function declaration
1 parent 6f1a505 commit 109efcb

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

components/drivers/sensors/sensor.h

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,26 @@
66
* Change Logs:
77
* Date Author Notes
88
* 2019-01-31 flybreak first version
9+
* 2021-06-23 linpeng added function declaration
910
*/
1011

12+
#ifndef __SENSOR_H__
13+
#define __SENSOR_H__
1114

1215
#include <rtthread.h>
13-
#include <rtdevice.h>
1416

17+
#ifdef __cplusplus
18+
extern "C"
19+
{
20+
#endif
21+
22+
int rt_hw_sensor_register(rt_sensor_t sensor,
23+
const char *name,
24+
rt_uint32_t flag,
25+
void *data);
26+
27+
#ifdef __cplusplus
28+
}
29+
#endif
30+
31+
#endif /*__SENSOR_H__*/

0 commit comments

Comments
 (0)