Skip to content

Commit 718df98

Browse files
committed
Merge branch 'contrib/github_pr_486' into 'master'
fix(max17048): Add boilerplate ifdef cplusplus so max17048 functions can be called from c++ (GitHub PR) Closes AEGHB-1021 See merge request ae_group/esp-iot-solution!1262
2 parents 4aac4e3 + 79572fa commit 718df98

File tree

1 file changed

+8
-0
lines changed
  • components/sensors/battery_fuel_gauge/max17048/include

1 file changed

+8
-0
lines changed

components/sensors/battery_fuel_gauge/max17048/include/max17048.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
#include "i2c_bus.h"
99

10+
#ifdef __cplusplus
11+
extern "C" {
12+
#endif
13+
1014
#define MAX17048_I2C_ADDR_DEFAULT 0x36
1115

1216
#define MAX17048_VCELL_REG 0x02 /*!< ADC measurement of VCELL. */
@@ -394,3 +398,7 @@ esp_err_t max17048_set_sleep(max17048_handle_t sensor, bool sleep);
394398
* - Other esp_err_t codes Errors that may occur during I2C transactions or hardware interaction
395399
*/
396400
esp_err_t max17048_is_sleeping(max17048_handle_t sensor, bool *is_sleeping);
401+
402+
#ifdef __cplusplus
403+
} // extern "C"
404+
#endif

0 commit comments

Comments
 (0)