summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2015-04-24 11:42:40 +0800
committerBernard Xiong <[email protected]>2015-04-24 11:42:40 +0800
commit20c06ccb00d6181f925d9b2d8f92b8e16edfc314 (patch)
tree4d743530973aaa2c63d5e80a0e8fdd0d079a2648 /components
parent3e24db1f8eccd01655e078d8f7a5a1c33679d830 (diff)
Add extern declaration for C++.
Diffstat (limited to 'components')
-rw-r--r--components/drivers/include/rtdevice.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/components/drivers/include/rtdevice.h b/components/drivers/include/rtdevice.h
index bb01da2d12..5d74ed6199 100644
--- a/components/drivers/include/rtdevice.h
+++ b/components/drivers/include/rtdevice.h
@@ -28,6 +28,10 @@
#include <rtthread.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define RT_DEVICE(device) ((rt_device_t)device)
/* completion flag */
@@ -362,5 +366,9 @@ rt_inline void rt_work_init(struct rt_work* work, void (*work_func)(struct rt_wo
#include "drivers/pin.h"
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __RT_DEVICE_H__ */