]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/at45db/HplAt45dbByteC.nc
deputy fixes
[tinyos-2.x.git] / tos / chips / at45db / HplAt45dbByteC.nc
index 57557675af2da87a6b34bbc7441f41180b82d7f4..925f3128d5b318c6295edb508c429a4b0e2e5caa 100644 (file)
@@ -47,7 +47,7 @@ implementation
     P_ERASE
   };
   uint8_t status = P_IDLE;
-  uint8_t flashCmd[4];
+  uint8_t flashCmd[9];
   at45pageoffset_t dataCount;
   uint8_t * COUNT_NOK(dataCount) data;
   uint8_t dontCare;
@@ -180,8 +180,9 @@ implementation
     flashCmd[1] = reqPage >> (16 - sectorSizeLog2);
     flashCmd[2] = reqPage << (sectorSizeLog2 - 8) | reqOffset >> 8;
     flashCmd[3] = reqOffset; // low-order 8 bits
-    data = reqData;
+    data = NULL;
     dataCount = reqCount;
+    data = reqData;
     dontCare = reqDontCare;
 
     call Resource.request();