⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ceioctl.h

📁 MODC驱动
💻 H
📖 第 1 页 / 共 3 页
字号:
/*
 * $Log:   V:/PVCSDB/DiskOnChip/archives/general storage/Drivers/Windows CE/Includes/ceioctl.h-arc  $
 * 
 *    Rev 1.4   Dec 16 2003 11:06:44   alexander.geller
 * Comment change
 * 
 *    Rev 1.3   Sep 14 2003 08:38:28   doronc
 * Added - Update XIP support
 * 
 *    Rev 1.2   May 27 2003 16:10:28   doronc
 * Change format flags definies according to allowed values of TrueFFS 6.1.
 * 
 *    Rev 1.1   May 27 2003 14:02:50   doronc
 * VolumeInfoRecord structure changed physicalUnitSize field 
 * type from short to long.
 * 
 *    Rev 1.0   May 05 2003 13:30:50   doronc
 * Initial revision.
 * 
 *    Rev 1.2   Jun 02 2002 16:34:08   doronc
 * Added constants TL_NORMAL_FORMAT  and  BINARY_AREA   
 * for format structure.
 * 
 *    Rev 1.1   May 28 2002 17:42:46   doronc
 * Add API for FL_IOCTL_EXTENDED_WRITE_IPL, 
 * replace the names of flCEBDKOperation and flBDKOperation to keep backward compatability with ver 5.04,
 * Remove mutex taking in DSK_PowerUp and DSK_PowerDown since The mutex API is not available in this stage.
 * 
 *    Rev 1.0   May 09 2002 17:44:52   doronc
 * Initial revision.
 * 
 *    Rev 1.8   Jan 17 2002 23:02:02   oris
 * Added 3 new ioctls
 *  - FL_IOCTL_EXTENDED_ENVIRONMENT_VARIABLES - Set environment variables
 *    - flExtendedEnvVarsInput and flExtendedEnvVarsOutput records 
 *    - FL_APPLY_TO_ALL / FL_APPLY_TO_SOCKET / FL_APPLY_TO_VOLUME  definitions
 *  - FL_IOCTL_SET_ACCESS_ROUTINE -set access routines
 *    - flVerifyVolumeOutput record 
 *  - FL_IOCTL_VERIFY_VOLUME - check volume for errors caused by power  failures.
 *    - flSetMemoryAccessInput record
 * 
 *    Rev 1.7   May 09 2001 00:45:48   oris
 * Changed protection ioctl interface to prevent the use of input buffer as an output buffer.
 * 
 *    Rev 1.6   Apr 16 2001 13:45:10   oris
 * Removed warrnings by changing some of the fields types to standart flite types.
 * 
 *    Rev 1.5   Apr 09 2001 15:02:22   oris
 * Added comment to ifdef statment.
 * End with an empty line.
 * 
 *    Rev 1.4   Apr 01 2001 15:16:38   oris
 * Updated inquire capability ioctl - diffrent input and output records.
 *
 *    Rev 1.3   Apr 01 2001 07:58:44   oris
 * Moved the following defines to blockdev.h:
 *   FL_PROTECT   0
 *   FL_UNPROTECT 1
 *   FL_UNLOCK    2
 *
 *    Rev 1.2   Feb 14 2001 02:16:16   oris
 * Updated inquire capabilities ioctl.
 *
 *    Rev 1.1   Feb 13 2001 01:49:06   oris
 * Added the following new IO Controls:
 *   FL_IOCTL_FORMAT_VOLUME2,
 *   FL_IOCTL_FORMAT_PARTITION,
 *   FL_IOCTL_BDTL_HW_PROTECTION,
 *   FL_IOCTL_BINARY_HW_PROTECTION,
 *   FL_IOCTL_OTP,
 *   FL_IOCTL_CUSTOMER_ID,
 *   FL_IOCTL_UNIQUE_ID,
 *   FL_IOCTL_NUMBER_OF_PARTITIONS,
 *   FL_IOCTL_SUPPORTED_FEATURES,
 *   FL_IOCTL_SET_ENVIRONMENT_VARIABLES,
 *   FL_IOCTL_PLACE_EXB_BY_BUFFER,
 *   FL_IOCTL_WRITE_IPL,
 *   FL_IOCTL_DEEP_POWER_DOWN_MODE,
 * and BDK_GET_INFO type in FL_IOCTL_BDK_OPERATION
 *
 *    Rev 1.0   Feb 04 2001 11:38:18   oris
 * Initial revision.
 *
 */
/***********************************************************************************/
/*                        M-Systems Confidential                                   */
/*           Copyright (C) M-Systems Flash Disk Pioneers Ltd. 1995-2001            */
/*                         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                                                    */
/***********************************************************************************/

#ifndef FLIOCTL_H
#define FLIOCTL_H

#ifndef CE_DRIVER_LAYER
#define FL_IOCTL_START	3000
#endif
/* In every call to flIOctl function, the irFlags field in the structure
   IOreq should hold one of the following: */
typedef enum{FL_IOCTL_GET_INFO = FL_IOCTL_START,
             FL_IOCTL_DEFRAGMENT,
             FL_IOCTL_WRITE_PROTECT,
             FL_IOCTL_MOUNT_VOLUME,
             FL_IOCTL_FORMAT_VOLUME,
             FL_IOCTL_BDK_OPERATION,
             FL_IOCTL_DELETE_SECTORS,
             FL_IOCTL_READ_SECTORS,
             FL_IOCTL_WRITE_SECTORS,
             FL_IOCTL_FORMAT_PHYSICAL_DRIVE,
             FL_IOCTL_FORMAT_LOGICAL_DRIVE,
             FL_IOCTL_BDTL_HW_PROTECTION,
             FL_IOCTL_BINARY_HW_PROTECTION,
             FL_IOCTL_OTP,
             FL_IOCTL_CUSTOMER_ID,
             FL_IOCTL_UNIQUE_ID,
             FL_IOCTL_NUMBER_OF_PARTITIONS,
             FL_IOCTL_INQUIRE_CAPABILITIES,
             FL_IOCTL_SET_ENVIRONMENT_VARIABLES, /* No longer supported */
             FL_IOCTL_PLACE_EXB_BY_BUFFER,
             FL_IOCTL_WRITE_IPL,		/* For backward compatability only, use FL_IOCTL_EXTENDED_WRITE_IPL instead*/
             FL_IOCTL_DEEP_POWER_DOWN_MODE,
             FL_IOCTL_EXTENDED_ENVIRONMENT_VARIABLES, 
             FL_IOCTL_VERIFY_VOLUME,
             FL_IOCTL_SET_ACCESS_ROUTINE,		/*Not supported for CE*/
             FL_IOCTL_GET_ACCESS_ROUTINE,		/*Not supported for CE*/
             FL_IOCTL_EXTENDED_WRITE_IPL,
             FL_IOCTL_OPEN_TRANSACTION,
             FL_IOCTL_COMMIT_TRANSACTION,
			 FL_IOCTL_IS_VOLUME_RUGGEDIZED,
             FL_IOCTL_COMPLETE_OPERATION,
			 FL_IOCTL_UPDATE_XIP_MODE = FL_IOCTL_START + 150

} flIOctlFunctionNo;

#ifndef CE_DRIVER_LAYER
typedef enum {                          /* Status code for operation.
                       A zero value indicates success,
                       other codes are the extended
                       DOS codes. */
         flOK                      = 0,
         flBadFunction             = 1,
         flFileNotFound            = 2,
         flPathNotFound            = 3,
         flTooManyOpenFiles        = 4,
         flNoWriteAccess           = 5,
         flBadFileHandle           = 6,
         flDriveNotAvailable       = 9,
         flNonFATformat            = 10,
         flFormatNotSupported      = 11,
         flNoMoreFiles             = 18,
         flWriteProtect            = 19,
         flBadDriveHandle          = 20,
         flDriveNotReady           = 21,
         flUnknownCmd              = 22,
         flBadFormat               = 23,
         flBadLength               = 24,
         flDataError               = 25,
         flUnknownMedia            = 26,
         flSectorNotFound          = 27,
         flOutOfPaper              = 28,
         flWriteFault              = 29,
         flReadFault               = 30,
         flGeneralFailure          = 31,
         flDiskChange              = 34,
         flVppFailure              = 50,
         flBadParameter            = 51,
         flNoSpaceInVolume         = 52,
         flInvalidFATchain         = 53,
         flRootDirectoryFull       = 54,
         flNotMounted              = 55,
         flPathIsRootDirectory     = 56,
         flNotADirectory           = 57,
         flDirectoryNotEmpty       = 58,
         flFileIsADirectory        = 59,
         flAdapterNotFound         = 60,
         flFormattingError         = 62,
         flNotEnoughMemory         = 63,
         flVolumeTooSmall          = 64,
         flBufferingError          = 65,
         flFileAlreadyExists       = 80,
         flForceDismount           = 85,
         flIncomplete              = 100,
         flTimedOut                = 101,
         flTooManyComponents       = 102,
         flTooManyDrives           = 103,
         flTooManyBinaryPartitions = 104,
         flPartitionNotFound       = 105,
         flFeatureNotSupported     = 106,
         flWrongVersion            = 107,
         flTooManyBadBlocks        = 108,
         flNotProtected            = 109,
         flUnchangeableProtection  = 110,
         flBadDownload             = 111,
         flBadBBT                  = 112,
         flInterleaveError         = 113,
         flWrongKey                = 114,
         flHWProtection            = 115,
         flLeftForCompetability    = 116,
         flMultiDocContradiction   = 117,
         flCanNotFold              = 118,
         flBadIPLBlock             = 119,
         flIOCommandBlocked        = 120,
         flBadTransaction          = 121,
         flTooManyTransactions     = 122,
         flUnitIsNotErased         = 123,
         flSequenceError           = 124,
         flFIFOTimeOut             = 125,
         flUnitIsBad               = 126,
         flFlashIsVirgin           = 127,
} FLStatus;
#endif /*CE_DRIVER_LAYER*/

#ifdef CE_DRIVER_LAYER
FLStatus flIOctl(IOreq far *);
#endif /*CE_DRIVER_LAYER*/


/* In every call to flIOctl function, the irData field in the structure
   IOreq should point to the structure defined below. The fields
   inputRecord and outputRecord should point to structures which are
   specific to each IOctl function as defined in this file. */
typedef struct {
  void far *inputRecord;
  void far *outputRecord;
} flIOctlRecord;


/* General output record that returns only status. */
typedef struct {
  FLStatus status;
} flOutputStatusRecord;







/* Input and output records for the different IOCTL functions: */
/* =========================================================== */




/* Get disk information (FL_IOCTL_GET_INFO) */
#ifndef CE_DRIVER_LAYER
/*----------------------------------------------------------------------*/
/*                     V o l u m e I n f o R e c o r d                  */
/*                                                                      */
/* A structure that holds general information about the media. The      */
/* information includes Physical Info (see flGetPhysicalInfo), Logical  */
/* partition (number of sectors and CHS), boot area size, S/W versions  */
/* Media life-time etc.                                                 */
/* A pointer to this structure is passed to the function flVolumeInfo   */
/* where it receives the relevant data.                                 */
/*----------------------------------------------------------------------*/

typedef struct {
  unsigned long  logicalSectors;    /*  number of logical sectors                  */
  unsigned long  bootAreaSize;      /*  boot area size                             */
  unsigned long  baseAddress;       /*  physical base address                      */
  unsigned short flashType;         /*  JEDEC id of the flash                      */
  unsigned long  physicalSize;      /*  physical size of the media                 */
  unsigned long physicalUnitSize;  /*  Erasable block size                        */
  char DOCType;                     /*  DiskOnChip type (MDoc/Doc2000)             */
  char lifeTime;                    /*  Life time indicator for the media (1-10)   */
                                    /*  1 - the media is fresh,                    */
                                    /*  10 - the media is close to its end of life */
  char driverVer[10];               /*  driver version (NULL terminated string)    */
  char OSAKVer[10];                 /*  OSAK version that driver is based on
                                        (NULL terminated string)                   */
  unsigned long cylinders;          /*  Media.....                                 */
  unsigned long heads;              /*            geometry......                   */
  unsigned long sectors;            /*                            parameters.      */
} VolumeInfoRecord;
#endif /*CE_DRIVER_LAYER*/




/* Input record: NULL */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -