edison: add i2c bus definitions
authorThomas Ingleby <thomas.c.ingleby@intel.com>
Thu, 24 Jul 2014 10:59:36 +0000 (11:59 +0100)
committerBrendan Le Foll <brendan.le.foll@intel.com>
Tue, 9 Sep 2014 16:28:43 +0000 (17:28 +0100)
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
src/intel_edison_fab_c.c

index 6e39b21..e503a08 100644 (file)
@@ -241,11 +241,15 @@ mraa_intel_edison_fab_c()
     b->pins[13].gpio.mux[0].value = 0;
 
     //BUS DEFINITIONS
-    b->i2c_bus_count = 1;
-    b->def_i2c_bus = 0;
-    b->i2c_bus[0].bus_id = 0;
-    b->i2c_bus[0].sda = 18;
-    b->i2c_bus[0].scl = 19;
+    b->i2c_bus_count = 9;
+    b->def_i2c_bus = 6;
+    int ici;
+    for (ici = 0; ici < 9; ici++) {
+        b->i2c_bus[ici].bus_id = -1;
+    }
+    b->i2c_bus[6].bus_id = 6;
+    b->i2c_bus[6].sda = 18;
+    b->i2c_bus[6].scl = 19;
 
     b->spi_bus_count = 1;
     b->def_spi_bus = 0;