i2c: internal structure to mraa_internal_types
authorThomas Ingleby <thomas.c.ingleby@intel.com>
Mon, 14 Jul 2014 16:52:08 +0000 (17:52 +0100)
committerThomas Ingleby <thomas.c.ingleby@intel.com>
Mon, 14 Jul 2014 16:52:08 +0000 (17:52 +0100)
* For use in hooks

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
include/mraa_internal_types.h
src/i2c/i2c.c

index 133291e..ed3849d 100644 (file)
@@ -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 */
+    /*@}*/
+};
index 0604425..26c686b 100644 (file)
 #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)
 {