From 6459839f287996424dae870fd00fe499d8693530 Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Fri, 24 Apr 2015 11:42:40 +0800 Subject: [PATCH] Add extern declaration for C++. --- components/drivers/include/rtdevice.h | 8 ++++++++ 1 file changed, 8 insertions(+) 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 +#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__ */