diff --git a/include/mraa_internal_types.h b/include/mraa_internal_types.h index 133291e..ed3849d 100644 --- a/include/mraa_internal_types.h +++ b/include/mraa_internal_types.h @@ -46,3 +46,14 @@ struct _gpio { unsigned int reg_bit_pos; /*@}*/ }; + +/** + * A structure representing a I2C bus + */ +struct _i2c { + /*@{*/ + int hz; /**< frequency of communication */ + int fh; /**< the file handle to the /dev/i2c-* device */ + int addr; /**< the address of the i2c slave */ + /*@}*/ +}; diff --git a/src/i2c/i2c.c b/src/i2c/i2c.c index 0604425..26c686b 100644 --- a/src/i2c/i2c.c +++ b/src/i2c/i2c.c @@ -26,14 +26,6 @@ #include "smbus.h" #include "mraa_internal.h" -struct _i2c { - /*@{*/ - int hz; /**< frequency of communication */ - int fh; /**< the file handle to the /dev/i2c-* device */ - int addr; /**< the address of the i2c slave */ - /*@}*/ -}; - mraa_i2c_context mraa_i2c_init(int bus) {