MityDSP Documentation Index
tcDspRomFs

Introduction

The tcDspRomFs class provides a mechanism to register a precompiled ROM filesystem with the TI DSP BIOS standard I/O libraries. Use of this routine will allow files to be accessed using standard fopen(), fread(), and fwrite() style function calls, as well as C++ stream operators.

See also:
MityDSP::tcDspRomFs Class Reference

Example

This is a simple example of tcDspRomFs usage:

{
{
// read in external ROM filesystem class built from make_romfs tool
// alternatively, one might reference a MityDSP application data sector
// with preloaded filesystem data on it...
extern tsDspRomFsNode MyFileSystem[];
char buffer[128];
tcDspRomFs* lpRomFs = new tcDspRomFs(MyFileSystem);
lpRomFs->RegisterFileSystem("ROMFS");
// read / parse data file...
FILE* lpFile = fopen("ROMFS:data.txt","r");
while(!feof(lpFile))
{
fread(lpBuff,1,128,lpFile);
// Do something with the data...
}
fclose(lpFile);
// typically, RomFs classes are not destroyed, they occupy a minimum amount
// of memory...
...
}

  
Generated on Mon Apr 22 2013 11:33:02 for MityDSP Core by  Doxygen Version 1.8.1.1
Copyright © 2009, Critical Link LLC, All rights reserved.