]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/at45db/At45dbP.nc
Remove bogus 'tab:4' and 'tab:2' markers.
[tinyos-2.x.git] / tos / chips / at45db / At45dbP.nc
index 213573f2d07aed6f331939282eb872dfe3de0c44..90b3d313b1434a89ccaa7129dac5c1ce2ea58e72 100644 (file)
@@ -1,6 +1,6 @@
 // $Id$
 
-/*                                                                     tab:4
+/*
  * "Copyright (c) 2000-2003 The Regents of the University  of California.  
  * All rights reserved.
  *
@@ -80,8 +80,8 @@ implementation
     BROKEN // Write failed. Fail all subsequent requests.
   };
   uint8_t request;
-  uint8_t *reqBuf;
   at45pageoffset_t reqOffset, reqBytes;
+  uint8_t * COUNT_NOK(reqBytes) reqBuf;
   at45page_t reqPage;
 
   enum {
@@ -364,7 +364,7 @@ implementation
   }
 
   void newRequest(uint8_t req, at45page_t page, at45pageoffset_t offset,
-                 void *reqdata, at45pageoffset_t n) {
+                 void * COUNT_NOK(n) reqdata, at45pageoffset_t n) {
     request = req;
 
     reqBuf = reqdata;
@@ -398,8 +398,8 @@ implementation
                                        at45pageoffset_t n,
                                        uint16_t baseCrc) {
     /* This is a hack (store crc in reqBuf), but it saves 2 bytes of RAM */
-    reqBuf = (uint8_t *)baseCrc;
-    newRequest(R_READCRC, page, offset, NULL, n);
+    reqBuf = TCAST(uint8_t * COUNT(baseCrc), baseCrc);
+    newRequest(R_READCRC, page, offset, reqBuf, n);
   }
 
   command void At45db.write(at45page_t page, at45pageoffset_t offset,