[Tinyos-beta-commits] CVS: tinyos-1.x/beta/STM25P/STM25P
StorageManager.nc, 1.3, 1.4 StorageManagerM.nc, 1.6, 1.7
Jonathan Hui
jwhui at users.sourceforge.net
Mon May 23 10:35:19 PDT 2005
- Previous message: [Tinyos-beta-commits]
CVS: tinyos-1.x/beta/STM25P/STM25P LogRead.nc, 1.2,
1.3 LogStorage.h, 1.2, 1.3 LogStorageM.nc, 1.2,
1.3 LogWrite.nc, 1.2, 1.3
- Next message: [Tinyos-beta-commits] CVS: tinyos-1.x/beta/STM25P/STM25P
LogStorageM.nc, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-1.x/beta/STM25P/STM25P
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3958
Modified Files:
StorageManager.nc StorageManagerM.nc
Log Message:
- Provide a numSectors command to grab the number of sectors within a
given volume.
Index: StorageManager.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/STM25P/STM25P/StorageManager.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** StorageManager.nc 17 May 2005 20:44:49 -0000 1.3
--- StorageManager.nc 23 May 2005 17:35:17 -0000 1.4
***************
*** 29,32 ****
--- 29,33 ----
interface StorageManager {
+ command uint8_t getNumSectors();
command stm25p_addr_t getVolumeSize();
}
Index: StorageManagerM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/STM25P/STM25P/StorageManagerM.nc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** StorageManagerM.nc 17 May 2005 20:44:49 -0000 1.6
--- StorageManagerM.nc 23 May 2005 17:35:17 -0000 1.7
***************
*** 237,252 ****
}
! command stm25p_addr_t StorageManager.getVolumeSize[volume_t volume]() {
!
uint8_t i = baseSector[volume];
uint8_t tmpVolumeId = sectorTable.sector[i].volumeId;
if (baseSector[volume] == STM25P_INVALID_SECTOR)
! return STM25P_INVALID_ADDR;
for ( ; i < STM25P_NUM_SECTORS && sectorTable.sector[i].volumeId == tmpVolumeId; i++ );
-
- return STM25P_SECTOR_SIZE*(i-baseSector[volume]);
}
--- 237,256 ----
}
! command uint8_t StorageManager.getNumSectors[volume_t volume]() {
uint8_t i = baseSector[volume];
uint8_t tmpVolumeId = sectorTable.sector[i].volumeId;
if (baseSector[volume] == STM25P_INVALID_SECTOR)
! return STM25P_INVALID_SECTOR;
for ( ; i < STM25P_NUM_SECTORS && sectorTable.sector[i].volumeId == tmpVolumeId; i++ );
+ return (i - baseSector[volume]);
+ }
+
+ command stm25p_addr_t StorageManager.getVolumeSize[volume_t volume]() {
+ if (baseSector[volume] == STM25P_INVALID_SECTOR)
+ return STM25P_INVALID_ADDR;
+ return STM25P_SECTOR_SIZE * call StorageManager.getNumSectors[volume]();
}
- Previous message: [Tinyos-beta-commits]
CVS: tinyos-1.x/beta/STM25P/STM25P LogRead.nc, 1.2,
1.3 LogStorage.h, 1.2, 1.3 LogStorageM.nc, 1.2,
1.3 LogWrite.nc, 1.2, 1.3
- Next message: [Tinyos-beta-commits] CVS: tinyos-1.x/beta/STM25P/STM25P
LogStorageM.nc, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-beta-commits
mailing list