Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Fix compilation with C++ #15

Merged
merged 2 commits into from
May 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions sfm-common/sfm_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 */
13 changes: 13 additions & 0 deletions sfm3003/sfm3003.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 */
13 changes: 13 additions & 0 deletions sfm3019/sfm3019.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 */