提交 eae43943 编写于 作者: G guozhanxin

add "extern "C" {}" for c++

上级 64813b6b
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef RT_USING_RTC #ifdef RT_USING_RTC
#define rt_sen_get_timestamp() time() /* API for the sensor to get the timestamp */ #define rt_sen_get_timestamp() time() /* API for the sensor to get the timestamp */
#else #else
...@@ -189,4 +193,9 @@ int rt_hw_sensor_register(rt_sensor_t sensor, ...@@ -189,4 +193,9 @@ int rt_hw_sensor_register(rt_sensor_t sensor,
const char *name, const char *name,
rt_uint32_t flag, rt_uint32_t flag,
void *data); void *data);
#ifdef __cplusplus
}
#endif #endif
#endif /* __SENSOR_H__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册