From 96eb4ebe33094d323b90c10a85523c2121018123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 21 Sep 2007 17:33:35 +0000 Subject: [PATCH] Made i2c.h and ddc.h C++ safe. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22271 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/graphics/common/ddc.h | 8 ++++++++ headers/private/graphics/common/i2c.h | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/headers/private/graphics/common/ddc.h b/headers/private/graphics/common/ddc.h index 7de40e8b08..583082ac76 100644 --- a/headers/private/graphics/common/ddc.h +++ b/headers/private/graphics/common/ddc.h @@ -10,6 +10,10 @@ #include "edid.h" +#ifdef __cplusplus +extern "C" { +#endif + void ddc2_init_timing(i2c_bus *bus); // read EDID and VDIF from monitor via ddc2 @@ -17,4 +21,8 @@ void ddc2_init_timing(i2c_bus *bus); status_t ddc2_read_edid1(const i2c_bus *bus, edid1_info *edid, void **vdif, size_t *vdifLength); +#ifdef __cplusplus +} +#endif + #endif /* _DDC_H */ diff --git a/headers/private/graphics/common/i2c.h b/headers/private/graphics/common/i2c.h index dc067c814a..e048b6d60e 100644 --- a/headers/private/graphics/common/i2c.h +++ b/headers/private/graphics/common/i2c.h @@ -49,6 +49,10 @@ typedef struct i2c_bus { } i2c_bus; +#ifdef __cplusplus +extern "C" { +#endif + // send and receive data via i2c bus status_t i2c_send_receive(const i2c_bus *bus, int slave_address, const uint8 *writeBuffer, size_t writeLength, uint8 *readBuffer, @@ -61,4 +65,8 @@ void i2c_get100k_timing(i2c_timing *timing); // (as timing resolution is 1 microsecond, we cannot reach full speed!) void i2c_get400k_timing(i2c_timing *timing); +#ifdef __cplusplus +} +#endif + #endif /* _I2C_H */