]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - apps/tests/storage/Block/RandRWC.nc
Merge over into the trunk.
[tinyos-2.x.git] / apps / tests / storage / Block / RandRWC.nc
index 385f8ea46d155779813a05683551e770cce38b6e..1744f0611d60318f10816955103bd44fed0a21f5 100644 (file)
  *
  * @author David Gay
  */
-/*
-  address & 3:
-  0, 2: r
-  1: w
-  3: r&w
-*/
 module RandRWC {
   uses {
     interface Boot;
@@ -151,7 +145,7 @@ implementation {
     if (++count == NWRITES)
       {
        call Leds.led2Toggle();
-       scheck(call BlockWrite.commit());
+       scheck(call BlockWrite.sync());
       }
     else
       {
@@ -173,7 +167,7 @@ implementation {
       }
   }
 
-  event void BlockWrite.commitDone(error_t result) {
+  event void BlockWrite.syncDone(error_t result) {
     if (scheck(result))
       done();
   }
@@ -184,14 +178,6 @@ implementation {
       nextRead();
   }
 
-  event void BlockRead.verifyDone(error_t result) {
-    if (scheck(result))
-      {
-       call Leds.led2Toggle();
-       nextRead();
-      }
-  }
-
   event void BlockRead.computeCrcDone(storage_addr_t x, storage_len_t y, uint16_t z, error_t result) {
   }
 
@@ -207,7 +193,7 @@ implementation {
        scheck(call BlockWrite.erase());
        break;
       case A_READ:
-       scheck(call BlockRead.verify());
+       nextRead();
        break;
       }
   }