Browse Source

[components/drivers]
added function declaration

DavidLin1577 4 years ago
parent
commit
109efcbcd5
1 changed files with 18 additions and 1 deletions
  1. 18 1
      components/drivers/sensors/sensor.h

+ 18 - 1
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 <rtthread.h>
-#include <rtdevice.h>
 
+#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__*/