diff --git a/sfm-common/sfm_common.h b/sfm-common/sfm_common.h index cfd0ee3..2de739a 100644 --- a/sfm-common/sfm_common.h +++ b/sfm-common/sfm_common.h @@ -34,6 +34,10 @@ #include "sensirion_arch_config.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + #define SFM_CMD_READ_PRODUCT_IDENTIFIER 0xE102 #define SFM_CMD_READ_SCALE_FACTOR_OFFSET_AND_FLOW_UNIT 0x3661 @@ -164,4 +168,8 @@ int16_t sfm_common_read_measurement_raw(const SfmConfig* sfm_config, */ int16_t sfm_common_stop_continuous_measurement(SfmConfig* sfm_config); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* SFM_COMMON_H */ diff --git a/sfm3003/sfm3003.h b/sfm3003/sfm3003.h index 7d1b905..1b66354 100644 --- a/sfm3003/sfm3003.h +++ b/sfm3003/sfm3003.h @@ -29,10 +29,17 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifndef SFM3003_H +#define SFM3003_H + #include "sensirion_common.h" #include "sensirion_i2c.h" #include "sfm_common.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + #define SFM3003_I2C_ADDRESS 0x28 #define SFM3003_CMD_START_CONTINUOUS_MEASUREMENT_O2 \ @@ -61,3 +68,9 @@ int16_t sfm3003_probe(void); * Create a new SFM3003 instance */ SfmConfig sfm3003_create(void); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* SFM3003_H */ diff --git a/sfm3019/sfm3019.h b/sfm3019/sfm3019.h index 1b18169..759302e 100644 --- a/sfm3019/sfm3019.h +++ b/sfm3019/sfm3019.h @@ -29,10 +29,17 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifndef SFM3019_H +#define SFM3019_H + #include "sensirion_common.h" #include "sensirion_i2c.h" #include "sfm_common.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + #define SFM3019_I2C_ADDRESS 0x2E #define SFM3019_CMD_START_CONTINUOUS_MEASUREMENT_O2 \ @@ -61,3 +68,9 @@ int16_t sfm3019_probe(void); * Create a new SFM3019 instance */ SfmConfig sfm3019_create(void); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* SFM3019_H */