#include <DspFtdiUsbFs.h>
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 tsSectorMap * | getMap (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 |
tcDspFtdiVNC1 * | mpDriver |
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) | |
tsSectorMap * | mpSectorInfo |
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 |
tcDspFtdiUsbFs::tcDspFtdiUsbFs | ( | tcDspFtdiVNC1 * | apFtdiDriver, |
int | anOffset | ||
) |
This constructor is used to create access to the Usb filesystem connected to a FTDI VNC1L device.
[in] | apFtdiDriver | The VNC1L low-level driver |
[in] | anOffset | Usb Port offset (0 or 1) |
tcDspFtdiUsbFs::~tcDspFtdiUsbFs | ( | ) |
|
static |
Static dispatch for the media callback.
[in] | abPresent | true if device was inserted |
[in] | apArg | User arguement supplied when callback was registered |
void tcDspFtdiUsbFs::MediaCallback | ( | bool | abPresent | ) |
Media Callback function.
Calls the registered callback, if any, when media is inserted/removed
[in] | abPresent | true if device was inserted |
|
virtual |
Writes an address.
[in] | apAddr | Address to write |
[in] | apData | Data to write |
[in] | anBytes | Number of bytes to write |
Implements MityDSP::tcDspStorageBase.
|
virtual |
Writes a sector.
[in] | anSector | Sector number to write |
[in] | anOffset | Offset into sector |
[in] | apData | Data to write |
[in] | anBytes | Number of bytes to write |
Implements MityDSP::tcDspStorageBase.
|
virtual |
Reads an address.
[in] | apStartAddr | Address to read from |
[in] | apBuffer | Buffer to read data into |
[in] | anBytes | Size of buffer in bytes |
Implements MityDSP::tcDspStorageBase.
|
virtual |
Reads a sector.
[in] | anSector | Sector number to read |
[in] | anOffset | Offset into sector |
[in] | apBuffer | Buffer to read into |
[in] | anBytes | Size of buffer in bytes |
Implements MityDSP::tcDspStorageBase.
bool tcDspFtdiUsbFs::InitSectorMap | ( | ) |
Initialize the sector map.
|
protected |
|
protected |
|
protected |
Count of bytes written (debug)
Reimplemented from MityDSP::tcDspStorageBase.
|
protected |
Count of bytes read (debug)
Reimplemented from MityDSP::tcDspStorageBase.