www.pudn.com > drivers.rar
To Read all the content
[file head]:
/******************************************************************************
* Flash File System (ffs)
* Idea, design and coding by Mads Meisner-Jensen, mmj@ti.com
*
* ffs public API functions
*
* $Id: ffs.c 1.69.1.24.1.40 Thu, 08 Jan 2004 15:05:23 +0100 tsj $
*
f ******************************************************************************/
#ifndef TARGET
#include "ffs.cfg"
#endif
#if ((TARGET == 1) || (RIV_ENV== 1))
#include "ffs/board/task.h"
#endif
#if (TARGET == 0)
#include <stdlib.h>
#endif
#include <string.h>
#include <limits.h>
#include "ffs/ffs.h"
#include "ffs/board/core.h"
#include "ffs/board/ffstrace.h"
#include "swconfig.cfg"
#ifdef WCP_PROF
#include "prf/prf_api.h"
#endif
// added for profiling
UINT32 debug_ffs_read_time =0;
UINT32 debug_ffs_write_time =0;
UINT32 countfiles=1;
static T_FFS_FD fd = 0x00000000;
#if 0
//#if(FFS_PERFORMANCE_MEASURE==1)
UINT8 src_data_p[] =
{
0x33,0xB5,0x13,0xAD,0x33,0xB5,0x54,0
... ...
[file tail]:
... ...
t_buf (mb_ffs_test, 50, (T_RVF_BUFFER **) (&amt;dest_data_p)) == RVF_RED)
/* Read the file by chunks. */
while (total_data_read < 204800)
{
BeginTime = rvf_get_tick_count();
if ((data_read = ffs_read (fd, dest_data_p, READ_SIZE)) <= 0x00000000)
{
rvf_send_trace("Reopen failed", 30, NULL_PARAM, RV_TRACE_LEVEL_DEBUG_HIGH, FFS_USE_ID);
return ;
}
EndTime = rvf_get_tick_count();
total_data_read += data_read;
RTimeTaken +=EndTime-BeginTime;
}
debug_ffs_read_time=RTimeTaken;
rvf_send_trace("Ffs_Read PASS", 13, RTimeTaken, RV_TRACE_LEVEL_DEBUG_HIGH, FFS_USE_ID);
ffs_close (fd);
}
void print_result(void)
{
rvf_send_trace("Ffs_Write PASS", 14, debug_ffs_write_time, RV_TRACE_LEVEL_DEBUG_HIGH, FFS_USE_ID);
rvf_send_trace("Ffs_Read PASS", 13, debug_ffs_read_time, RV_TRACE_LEVEL_DEBUG_HIGH, FFS_USE_ID);
}
//s#endif
#endif
/*------------------------- File end -----------------------------------------------------------------*/