Flipped polarity of output enables to match Guava pins logic
[sifive-blocks.git] / src / main / scala / devices / i2c / I2C.scala
index da555496a8297f1a1d69a9d7cbeb90a67b5b3b20..0c487642ab5f1fcb473e38bd51a8ebbbebcf3148 100644 (file)
@@ -182,10 +182,10 @@ trait I2CModule extends Module with HasI2CParameters with HasRegMap {
   }
 
   val sclOen     = Reg(init = true.B)
-  io.port.scl.oe := sclOen
+  io.port.scl.oe := !sclOen
 
   val sdaOen     = Reg(init = true.B)
-  io.port.sda.oe := sdaOen
+  io.port.sda.oe := !sdaOen
 
   val sdaChk     = Reg(init = false.B)       // check SDA output (Multi-master arbitration)