From 6dea7abfc06582f170d6fdca5f9a9a56ddac70de Mon Sep 17 00:00:00 2001
From: Brian Schwind <brianmschwind@gmail.com>
Date: Tue, 11 Oct 2016 22:52:11 +0900
Subject: [PATCH] Add extern C declaration

---
 extras/tsl2561/tsl2561.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/extras/tsl2561/tsl2561.h b/extras/tsl2561/tsl2561.h
index 1e6597d..ad5109f 100644
--- a/extras/tsl2561/tsl2561.h
+++ b/extras/tsl2561/tsl2561.h
@@ -10,6 +10,10 @@
 #include <stdint.h>
 #include <stdbool.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 // I2C Addresses
 typedef enum
 {
@@ -45,4 +49,8 @@ void tsl2561_set_integration_time(tsl2561_t *device, tsl2561_integration_time_t
 void tsl2561_set_gain(tsl2561_t *device, tsl2561_gain_t gain);
 bool tsl2561_read_lux(tsl2561_t *device, uint32_t *lux);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif  // __TSL2561_H__