]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/mulle/chips/ds2782/DS2782InternalP.nc
Fixed a bug in the Software I2C. The first time a start condition was sent the clock...
[tinyos-2.x.git] / tos / platforms / mulle / chips / ds2782 / DS2782InternalP.nc
index 5d2b7cbc7c1f21ccb59042473525d0abfb98ee1e..6db69919ce51a4cd6f9eaf69c7a16264587965b7 100644 (file)
 module DS2782InternalP
 {
   uses interface ResourceDefaultOwner;
-  uses interface GeneralIO as SDA;
-  uses interface GeneralIO as SCL;
+  uses interface GeneralIO as Pullup;
 }
 implementation
 {
   async event void ResourceDefaultOwner.granted()
   {
-    call SDA.clr();
-    call SDA.makeOutput();
-    call SCL.clr();
-    call SCL.makeOutput();
+    call Pullup.clr();
   }
 
   async event void ResourceDefaultOwner.requested()
   {
+    call Pullup.set(); 
     call ResourceDefaultOwner.release();
   }
 
   async event void ResourceDefaultOwner.immediateRequested()
   {
+    call Pullup.set();
     call ResourceDefaultOwner.release();
   }
 }