MityDSP Documentation Index

MityDSP::tcDspRomFs Class Reference

#include <DspRomFs.h>

List of all members.

Public Member Functions

 tcDspRomFs (tsDspRomFsNode *apRomFs)
 Constructor.
 ~tcDspRomFs (void)
 Destructor.
int RegisterFileSystem (const char *apDevName)
 Register ROM Based Filesystem with TI stdio device library.

Static Public Attributes

static const int gnMaxRomFileSystems = 5
 maximum number of filesystems to be opened at once

Protected Member Functions

int open (const char *path, unsigned flags, int fno)
 Plug for file system open call.
int unlink (const char *path)
 Plug for file system unlink call.
int rename (const char *old_name, const char *new_name)
 Plug for file system rename call.

Static Protected Member Functions

static int close (int fno)
 Plug for file system close call.
static int read (int fno, char *buffer, unsigned count)
 Plug for file system read call.
static int write (int fno, const char *buffer, unsigned count)
 Plug for file system write call.
static off_t lseek (int fno, off_t offset, int origin)
 Plug for file system seek call.

Static Protected Attributes

static bool mbInitialized = false
static int gnNumRegFileSystems = 0
 currently allocated fs number

Constructor & Destructor Documentation

tcDspRomFs::tcDspRomFs ( tsDspRomFsNode apRomFs  ) 

Constructor.

Allocates appropriate tables and ensures base filesystem tables are initialized.

Note:
users must call RegisterFileSystem() to use the RomFS
Parameters:
[in] apRomFs pointer to ROM Based File System Array
tcDspRomFs::~tcDspRomFs ( void   ) 

Destructor.

Not typically reached.


Member Function Documentation

int tcDspRomFs::RegisterFileSystem ( const char *  apDevName  ) 

Register ROM Based Filesystem with TI stdio device library.

Parameters:
[in] apDevName Name of the device to use on the filesystem
Returns:
ROMFS_OK on success
int tcDspRomFs::close ( int  fno  )  [static, protected]

Plug for file system close call.

Parameters:
fno file descriptor of file to close.
Returns:
ROMFS_OK on success
int tcDspRomFs::read ( int  fno,
char *  buffer,
unsigned  count 
) [static, protected]

Plug for file system read call.

Parameters:
fno file descriptor to read
buffer pointer to buffer for read data
count maximum number of bytes to read into the buffer
Returns:
number of bytes read, 0 if EOF, or < 0 on error
int tcDspRomFs::write ( int  fno,
const char *  buffer,
unsigned  count 
) [static, protected]

Plug for file system write call.

Parameters:
fno file descriptor number of opened file to write
buffer data buffer to write
count number of bytes to write.
Note:
write is not supported for ROM file systems.
Returns:
ROMFS_OK on success
off_t tcDspRomFs::lseek ( int  fno,
off_t  offset,
int  origin 
) [static, protected]

Plug for file system seek call.

Parameters:
fno file descriptor of opened file to seek
offset number of bytes to offset from origin
origin one of SEEK_SET, SEEK_CUR, or SEEK_END
Returns:
ROMFS_OK on success
int tcDspRomFs::open ( const char *  path,
unsigned  flags,
int  fno 
) [protected]

Plug for file system open call.

Parameters:
path path of the file to be opened
flags standard I/O flags for opening the file
fno internal OS file descriptor pending
Returns:
fno on success, -1 on error. errno is set to the error code as indicated in the header file
int tcDspRomFs::unlink ( const char *  path  )  [protected]

Plug for file system unlink call.

(This is a delete function)

Note:
unlink is not supported for ROM file systems.
Parameters:
path path to file to unlink
Returns:
ROMFS_OK on success
int tcDspRomFs::rename ( const char *  old_name,
const char *  new_name 
) [protected]

Plug for file system rename call.

Note:
rename is not supported for ROM file systems.
Parameters:
old_name file to rename
new_name new target name for file
Returns:
ROMFS_OK on success

Member Data Documentation

maximum number of filesystems to be opened at once

bool tcDspRomFs::mbInitialized = false [static, protected]

used to initialize fd tables

int tcDspRomFs::gnNumRegFileSystems = 0 [static, protected]

currently allocated fs number


  
Generated on Fri Sep 23 16:33:54 2011 for MityDSP Core by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.