#define dout(...) do { } while(0)
#endif
+
+
+uint32_t stats_reads;
+uint32_t stats_writes;
+uint32_t stats_erases;
+
typedef struct {
unsigned char page[PAGES_PER_BLOCK][PAGE_SIZE];
unsigned blockOk;
unsigned char * d;
unsigned char *s;
+ stats_reads++;
+
if(blockId >= sim->nBlocks ||
pageOffset >= PAGES_PER_BLOCK ||
dataLength >DATA_SIZE ||
dout("wr_chunk\n");
+ stats_writes++;
+
if(blockId >= sim->nBlocks ||
pageOffset >= PAGES_PER_BLOCK ||
dataLength >DATA_SIZE ||
{
SimData *sim = DevToSim(dev);
+ stats_erases++;
+
CheckInitialised();
return yramsim_erase_internal(sim,blockId,0);
}
0, 99);
}
+
+void yaffs_rtems_flashsim_dump_status(void)
+{
+ printf("\nFlashsim stats\n");
+ printf("reads.....%d\n", stats_reads);
+ printf("writes....%d\n", stats_writes);
+ printf("erases....%d\n", stats_erases);
+}