X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fplatforms%2Fmulle%2Fsoftwarei2c%2FSoftI2CBusP.nc;h=db5543b300ef81765d9b1f4395c0f23f3d8349f1;hb=500ad4cbd47a5e6471b4855cf9360e5cf5d978ca;hp=0460da4c4175b650b60060521a89aa56fc915b01;hpb=58682d81735201c7a22f7768619d3b6f7469d2f0;p=tinyos-2.x.git diff --git a/tos/platforms/mulle/softwarei2c/SoftI2CBusP.nc b/tos/platforms/mulle/softwarei2c/SoftI2CBusP.nc index 0460da4c..db5543b3 100755 --- a/tos/platforms/mulle/softwarei2c/SoftI2CBusP.nc +++ b/tos/platforms/mulle/softwarei2c/SoftI2CBusP.nc @@ -180,8 +180,14 @@ implementation } call I2CClk.clr(); - if (ack) call I2C.masterAck(); - else call I2C.masterNack(); + if (ack) + { + call I2C.masterAck(); + } + else + { + call I2C.masterNack(); + } } return retChar; } @@ -219,13 +225,6 @@ implementation transition(); call I2CClk.clr(); - // ...Check the ACK from the receiver.... - - // if(SDA2==1){ACK=0;} /* ACK received£¿*/ - // else ACK= 1; - - // SCL2 = LOW; - // transition(); idle(); } } @@ -234,6 +233,7 @@ implementation { atomic { + call I2CData.makeOutput(); call I2CClk.clr(); call I2CData.clr(); // Low for ack transition(); @@ -249,6 +249,7 @@ implementation { atomic { + call I2CData.makeOutput(); call I2CClk.clr(); call I2CData.set(); // High for nack