]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/stm25p/Stm25pLogP.nc
stm25p: fix seek error
[tinyos-2.x.git] / tos / chips / stm25p / Stm25pLogP.nc
index e454de79d88c27d03d5b8dafb4aca2e937632343..b63cf3f71f5baa507b20b7d2de2b3460337d1b89 100644 (file)
@@ -230,9 +230,9 @@ implementation {
        {
          // make sure the cookie is still within the range of valid data
          uint8_t numSectors = call Sector.getNumSectors[ id ]();
-         uint8_t readSector = 
+         uint16_t readSector =
            (m_log_state[ id ].cookie >> STM25P_SECTOR_SIZE_LOG2);
-         uint8_t writeSector =
+         uint16_t writeSector =
            ((m_log_info[ id ].write_addr-1)>>STM25P_SECTOR_SIZE_LOG2)+1;
          // if cookie is overwritten, advance to beginning of log
          if ( (writeSector - readSector) > numSectors ) {