From 62a2b68e0800e0f2610a282a9b688006f8718186 Mon Sep 17 00:00:00 2001 From: Sylaina Date: Thu, 6 Dec 2018 21:33:03 +0100 Subject: [PATCH] Update i2c.h --- i2c.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/i2c.h b/i2c.h index efc24ac..e33655a 100644 --- a/i2c.h +++ b/i2c.h @@ -9,6 +9,10 @@ #ifndef i2c_h #define i2c_h +#ifdef __cplusplus +extern "C" { +#endif + /* TODO: setup i2c/twi */ #define F_I2C 100000UL// clock i2c #define PSC_I2C 1 // prescaler i2c @@ -35,4 +39,8 @@ void i2c_byte(uint8_t byte); // send data_byte uint8_t i2c_readAck(void); // read byte with ACK uint8_t i2c_readNAck(void); // read byte with NACK +#ifdef __cplusplus +} +#endif + #endif /* i2c_h */