Public Member Functions |
| tcDspStorageProxy (tcDspStorageBase *apDevice, void *apOffset, unsigned int anSize, unsigned int anSectorSize=512) |
| This constructor is used to create a proxy with the specified sector size for the underlying tcDspStorageBase-derived class instance.
|
virtual | ~tcDspStorageProxy () |
| Default destructor.
|
virtual int | write (void *apAddr, void *apData, int anBytes) |
| This routine writes an arbitrary amount of data to the underlying storage device, after offsetting the request to the proper location and ensuring that it fits in the available space.
|
virtual int | write (unsigned int anSector, unsigned int anOffset, void *apData, int anBytes) |
| Sector-based version of the write method.
|
virtual int | read (void *apStartAddr, void *apBuffer, int anBytes) |
| This routine reads an arbitrary amount of data from the underlying storage device, after offsetting the request to the proper location and ensuring that it fits in the available space.
|
virtual int | read (unsigned int anSector, unsigned int anOffset, void *apBuffer, int anBytes) |
| Sector-based version of the read method.
|
| 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 () |
Additional Inherited Members |
typedef void(* | tfIsrCallback )(bool, void *) |
| prototype for the ISR callback
|
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.
|
unsigned int | mnTxBytes |
| Count of bytes written (debug)
|
unsigned int | mnRxBytes |
| Count of bytes read (debug)
|
The tcDspStorageProxy class is used with other tcDspStorageBase derived classes to provide an interface that presents a given sector size.
This is useful to allow something like a filesystem to be hosted on a couple of sectors of a larger-sectored device.
- See also:
- tcDspStorageProxy Page