MityDSP Documentation Index
Public Member Functions | Static Public Member Functions | Protected Attributes
MityDSP::tcDspFtdiUsbFs Class Reference

#include <DspFtdiUsbFs.h>

Inheritance diagram for MityDSP::tcDspFtdiUsbFs:
MityDSP::tcDspStorageBase

List of all members.

Public Member Functions

 tcDspFtdiUsbFs (tcDspFtdiVNC1 *apFtdiDriver, int anOffset)
 This constructor is used to create access to the Usb filesystem connected to a FTDI VNC1L device.
 ~tcDspFtdiUsbFs ()
void MediaCallback (bool mbPresent)
 Media Callback function.
virtual int write (void *apAddr, void *apData, int anBytes)
 Writes an address.
virtual int write (unsigned int anSector, unsigned int anOffset, void *apData, int anBytes)
 Writes a sector.
virtual int read (void *apStartAddr, void *apBuffer, int anBytes)
 Reads an address.
virtual int read (unsigned int anSector, unsigned int anOffset, void *apBuffer, int anBytes)
 Reads a sector.
bool InitSectorMap ()
 Initialize the sector map.
- Public Member Functions inherited from MityDSP::tcDspStorageBase
 tcDspStorageBase ()
 This constructor is used to initialize storage base class.
virtual ~tcDspStorageBase ()
 Default Destructor.
virtual bool erase (unsigned int anSector)
 This routine provides a default erase method.
virtual void registerISRCallback (tfIsrCallback afCallback, void *apUserArg)
 This method is used to register a callback that is activated whenever the device changes state.
virtual void * getAddress (unsigned int anSector, unsigned int anOffset)
 This routine uses the device's sector map to compute an offset address from a supplied sector and offset.
virtual unsigned int getSize (unsigned int anSector)
 This routine uses the device's sector map to determine the size of the specified sector.
virtual unsigned int getSector (void *apAddr)
 This routine uses the device's sector map to compute a sector from a from a supplied offset address.
virtual double getDeviceSizeKB (void)
 This routine returns the size of the device in kilobytes.
const tsSectorMapgetMap (int &anNumSectors)
 This routine returns a pointer to access the device's sector map.
virtual bool getMediaPresent ()

Static Public Member Functions

static void StaticMediaCallback (bool mbPresent, void *mpArg)
 Static dispatch for the media callback.
- Static Public Member Functions inherited from MityDSP::tcDspStorageBase
static int readDispatch (unsigned int anSector, unsigned int anOffset, char *apBuffer, unsigned int anLength, void *apInstance)
 Static dispatch routine to allow the read method to be registered as a callback.
static int writeDispatch (unsigned int anSector, unsigned int anOffset, char *apData, unsigned int anBytes, void *apInstance)
 Static dispatch routine to allow the write method to be registered as a callback.

Protected Attributes

int mnOffset
tcDspFtdiVNC1mpDriver
int mnTxBytes
 Count of bytes written (debug)
int mnRxBytes
 Count of bytes read (debug)
- Protected Attributes inherited from MityDSP::tcDspStorageBase
unsigned int mnNumSectors
 Number of sectors in this device.
double mnDeviceSize
 Overall device size (in bytes)
tsSectorMapmpSectorInfo
 Map of sectors and sizes.
bool mbMediaPresent
 True if device is loaded.
tfIsrCallback mfIsrCallback
void * mpUserArg
 User-supplied argument for ISR callback.

Additional Inherited Members

- Public Types inherited from MityDSP::tcDspStorageBase
typedef void(* tfIsrCallback )(bool, void *)
 prototype for the ISR callback
- Public Attributes inherited from MityDSP::tcDspStorageBase

Constructor & Destructor Documentation

tcDspFtdiUsbFs::tcDspFtdiUsbFs ( tcDspFtdiVNC1 apFtdiDriver,
int  anOffset 
)

This constructor is used to create access to the Usb filesystem connected to a FTDI VNC1L device.

Parameters:
[in]apFtdiDriverThe VNC1L low-level driver
[in]anOffsetUsb Port offset (0 or 1)
Returns:
None.
See also:
DspFtdiUsbFs.h
tcDspFtdiUsbFs::~tcDspFtdiUsbFs ( )

Member Function Documentation

void tcDspFtdiUsbFs::StaticMediaCallback ( bool  abPresent,
void *  apArg 
)
static

Static dispatch for the media callback.

Parameters:
[in]abPresenttrue if device was inserted
[in]apArgUser arguement supplied when callback was registered
See also:
DspFtdiUsbFs.h
void tcDspFtdiUsbFs::MediaCallback ( bool  abPresent)

Media Callback function.

Calls the registered callback, if any, when media is inserted/removed

Parameters:
[in]abPresenttrue if device was inserted
See also:
DspFtdiUsbFs.h
int tcDspFtdiUsbFs::write ( void *  apAddr,
void *  apData,
int  anBytes 
)
virtual

Writes an address.

Parameters:
[in]apAddrAddress to write
[in]apDataData to write
[in]anBytesNumber of bytes to write
Returns:
Number of bytes written
See also:
DspFtdiUsbFs.h

Implements MityDSP::tcDspStorageBase.

int tcDspFtdiUsbFs::write ( unsigned int  anSector,
unsigned int  anOffset,
void *  apData,
int  anBytes 
)
virtual

Writes a sector.

Parameters:
[in]anSectorSector number to write
[in]anOffsetOffset into sector
[in]apDataData to write
[in]anBytesNumber of bytes to write
Returns:
Number of bytes written
See also:
DspFtdiUsbFs.h

Implements MityDSP::tcDspStorageBase.

int tcDspFtdiUsbFs::read ( void *  apStartAddr,
void *  apBuffer,
int  anBytes 
)
virtual

Reads an address.

Parameters:
[in]apStartAddrAddress to read from
[in]apBufferBuffer to read data into
[in]anBytesSize of buffer in bytes
Returns:
Number of bytes read
See also:
DspFtdiUsbFs.h

Implements MityDSP::tcDspStorageBase.

int tcDspFtdiUsbFs::read ( unsigned int  anSector,
unsigned int  anOffset,
void *  apBuffer,
int  anBytes 
)
virtual

Reads a sector.

Parameters:
[in]anSectorSector number to read
[in]anOffsetOffset into sector
[in]apBufferBuffer to read into
[in]anBytesSize of buffer in bytes
Returns:
Number of bytes read
See also:
DspFtdiUsbFs.h

Implements MityDSP::tcDspStorageBase.

bool tcDspFtdiUsbFs::InitSectorMap ( )

Initialize the sector map.

Returns:
True if successful.
Note:
This should be called anytime a new drive is inserted.
See also:
DspFtdiUsbFs.h

Member Data Documentation

int MityDSP::tcDspFtdiUsbFs::mnOffset
protected
tcDspFtdiVNC1* MityDSP::tcDspFtdiUsbFs::mpDriver
protected
int MityDSP::tcDspFtdiUsbFs::mnTxBytes
protected

Count of bytes written (debug)

Reimplemented from MityDSP::tcDspStorageBase.

int MityDSP::tcDspFtdiUsbFs::mnRxBytes
protected

Count of bytes read (debug)

Reimplemented from MityDSP::tcDspStorageBase.


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