diff --git a/components/drivers/include/rtdevice.h b/components/drivers/include/rtdevice.h index bb01da2d12769359c46d3f0334b692ec0ef10025..5d74ed619919339b8b5f00f460eb37119ebda4ee 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__ */