diff options
| author | guozhanxin <[email protected]> | 2019-02-12 14:16:27 +0800 |
|---|---|---|
| committer | guozhanxin <[email protected]> | 2019-02-12 14:17:50 +0800 |
| commit | eae4394329c46a3e5e3463ae5f5ba64c368cfadb (patch) | |
| tree | 8e3c104b9876b2fbd9c0d57a27e6f9ea03bf2a6c | |
| parent | 64813b6b07f32bbee1a5f0743c5ea08458294d13 (diff) | |
add "extern "C" {}" for c++
| -rw-r--r-- | components/drivers/sensors/sensor.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/components/drivers/sensors/sensor.h b/components/drivers/sensors/sensor.h index 15dd79ccdf..f505a27e1d 100644 --- a/components/drivers/sensors/sensor.h +++ b/components/drivers/sensors/sensor.h @@ -14,6 +14,10 @@ #include <rtthread.h> #include <rtdevice.h> +#ifdef __cplusplus +extern "C" { +#endif + #ifdef RT_USING_RTC #define rt_sen_get_timestamp() time() /* API for the sensor to get the timestamp */ #else @@ -189,4 +193,9 @@ int rt_hw_sensor_register(rt_sensor_t sensor, const char *name, rt_uint32_t flag, void *data); + +#ifdef __cplusplus +} #endif + +#endif /* __SENSOR_H__ */ |
