📄 _fltl.h
字号:
/***********************************************************************************/
/* M-Systems Confidential */
/* Copyright (C) M-Systems Flash Disk Pioneers Ltd. 1995-2003 */
/* All Rights Reserved */
/***********************************************************************************/
/* NOTICE OF M-SYSTEMS OEM */
/* SOFTWARE LICENSE AGREEMENT */
/* */
/* THE USE OF THIS SOFTWARE IS GOVERNED BY A SEPARATE LICENSE */
/* AGREEMENT BETWEEN THE OEM AND M-SYSTEMS. REFER TO THAT AGREEMENT */
/* FOR THE SPECIFIC TERMS AND CONDITIONS OF USE, */
/* OR CONTACT M-SYSTEMS FOR LICENSE ASSISTANCE: */
/* E-MAIL = info@m-sys.com */
/***********************************************************************************/
/*
* $Log: V:/PVCSDB/DiskOnChip/archives/general storage/TrueFFS/src/include/_fltl.h-arc $
*
* Rev 1.4 Oct 23 2003 13:56:16 oris
* Changed interface to recommendedClusterInfo routine - removed the used of in type variables
*
* Rev 1.3 Sep 01 2003 19:09:52 oris
* - changed TLS definition to FL_TLS
*
* Rev 1.2 May 18 2003 13:30:14 OriS
* Changed handleConversionTable to flHandleConversionTable.
*
*
* Rev 1.1 May 11 2003 08:27:16 OriS
* Removed FL_LEAVE_BINARY_AREA and FL_LEAVE_SOME_BINARY_ARE. Now using the TL_xxx version.
*
* Rev 1.0 Apr 09 2003 12:16:02 OriS
* Initial revision.
*
*/
#ifndef _FLTL_H
#define _FLTL_H
typedef struct {
SectorNo sectorsInVolume;
FLDword bootAreaSize;
FLDword eraseCycles;
FLDword tlUnitBits;
} TLInfo;
/* See interface documentation of functions in ftllite.c */
typedef struct tTLrec TLrec; /* Defined by translation layer */
#ifdef RUGGEDIZED
#define ALL_TRANSACTIONS 0xff
typedef FLByte FLTransactionNo;
#endif /*RUGGEDIZED*/
struct tTL {
TLrec *rec;
FLByte partitionNo;
FLByte socketNo;
#ifdef FL_REPORT_MOUNT_PROGRESS
void FAR1* progressCallback;
#endif /* FL_REPORT_MOUNT_PROGRESS */
#ifdef RUGGEDIZED
FLTransactionNo transactionHandle;
FLStatus (*openTransaction)(TLrec *, FLByte mode);
FLStatus (*rollbackTransaction)(TLrec *);
FLStatus (*commitTransaction)(TLrec *);
#endif /*RUGGEDIZED*/
const void FAR0 *(*mapSector)(TLrec *, SectorNo sectorNo, CardAddress *physAddr);
FLStatus (*writeSector)(TLrec *, SectorNo sectorNo, void FAR1 *fromAddress);
FLStatus (*writeMultiSector)(TLrec *, SectorNo sectorNo, void FAR1 *fromAddress,SectorNo sectorCount);
FLStatus (*readSectors)(TLrec *, SectorNo sectorNo, void FAR1 *dest,SectorNo sectorCount);
FLStatus (*deleteSector)(TLrec *, SectorNo sectorNo, SectorNo noOfSectors);
FLStatus (*tlSetBusy)(TLrec *, FLBoolean);
void (*dismount)(TLrec *);
#ifdef DEFRAGMENT_VOLUME
FLStatus (*defragment)(TLrec *, FLSDword FAR2 *bytesNeeded);
#endif
#if (defined(VERIFY_VOLUME) || defined(VERIFY_WRITE))
FLStatus (*checkVolume)(TLrec *);
#endif /* VERIFY_VOLUME || VERIFY_WRITE */
SectorNo (*sectorsInVolume)(TLrec *);
FLStatus (*getTLInfo)(TLrec *, TLInfo *tlInfo);
void (*recommendedClusterInfo)(TLrec *, FLDword *sectorsPerCluster, FLDword *clusterAlignment);
#ifndef NO_READ_BBT_CODE
FLStatus (*readBBT)(TLrec *, CardAddress FAR1 * buf, FLSDword FAR2 * mediaSize, unsigned FAR2 * noOfBB);
#endif
#ifdef ENVIRONMENT_VARS
FLStatus (*notifyChange)(TLrec *, void FAR1 * reserved, FLEnvVars variableType , FLDword value);
#endif /* ENVIRONMENT_VARS */
FLStatus (*completeOperation)(TLrec *);
};
#define readFlags transactionHandle
#define UNCOMMITED 0x10
#define COMMITED 0x20
#include "dosformt.h"
/* Translation layer registration information */
extern int noOfTLs; /* No. of translation layers actually registered */
typedef struct {
FLStatus (*mountRoutine) (unsigned volNo, TL *tl, FLFlash *flash, FLFlash **volForCallback);
FLStatus (*formatRoutine) (unsigned volNo, TLFormatParams *deviceFormatParams, FLFlash *flash);
FLStatus (*preMountRoutine)(FLFunctionNo callType, IOreq FAR2* ioreq ,FLFlash* flash,FLStatus* status);
} TLentry;
extern TLentry tlTable[FL_TLS];
extern FLStatus noFormat (unsigned volNo, TLFormatParams *formatParams, FLFlash *flash);
extern FLStatus flMount(unsigned volNo, unsigned socketNo,TL *, FLBoolean useFilters , FLFlash *flash);
extern FLStatus flPreMount(FLFunctionNo callType, IOreq FAR2* ioreq , FLFlash *flash);
extern unsigned noOfDrives;
extern FLByte flHandleConversionTable[SOCKETS][FL_MAX_TL_PARTITIONS];
#ifdef FORMAT_VOLUME
extern FLStatus flFormat(unsigned volNo, TLFormatParams *formatParams, FLFlash * flash);
#endif /* FORMAT_VOLUME */
#endif /* FLTL_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -