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

📄 flstruct.h

📁 电子盘DEMO板程序
💻 H
📖 第 1 页 / 共 3 页
字号:
/******************************************************************************/
/*                                                                            */
/*  Copyright (C), 1995-2006, msystems Ltd. All rights reserved.              */
/*                                                                            */
/*  Redistribution and use in source and binary forms, with or without        */
/*  modification, are permitted provided that the following conditions are    */
/*  met:                                                                      */
/*  1. Redistributions of source code must retain the above copyright notice, */
/*     this list of conditions and the following disclaimer.                  */
/*  2. Redistributions in binary form must reproduce the above copyright      */
/*     notice, this list of conditions and the following disclaimer in the    */
/*     documentation and/or other materials provided with the distribution.   */
/*  3. Neither the name of msystems nor the names of its contributors may be  */
/*     used to endorse or promote products derived from this software without */
/*     specific prior written permission.                                     */
/*                                                                            */
/*  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS       */
/*  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED */
/*  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR             */
/*  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT      */
/*  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,     */
/*  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED  */
/*  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR    */
/*  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF    */
/*  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING      */
/*  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS        */
/*  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.              */
/*                                                                            */
/******************************************************************************/
/*
 * $Log:   V:/PVCSDB/DiskOnChip/archives/Testing/TrueFFS 6.3/Drop 2.5/common/flstruct.h-arc  $
 * 
 *    Rev 1.7.1.3   Sep 11 2006 13:45:24   yaniv.iarovici
 * Legal header added
 * 
 *    Rev 1.7.1.2   Sep 03 2006 14:45:12   Yaniv.Iarovici
 * 1. Added '#define FL_EXT_INFO_NO_SPEC_PART 0xFF'.
 *    (Indicates SDK not to retrieve specific partition info in certain APIs)
 * 2. Encapsulate '#define TL_LEAVE_BINARY_AREA' and '#define TL_LEAVE_SOME_BINARY_AREA'
 *    under '#ifdef BDK_ACCESS'.
 * 3. Define 'TL_LEAVE_SOME_PARTITIONS' with value of 0x9.
 * 
 *    Rev 1.7.1.1   Aug 16 2006 08:47:42   Yaniv.Iarovici
 * 1) Add '#define TL_LEAVE_SOME_PARTITIONS   TL_LEAVE_SOME_BINARY_AREA'
 * 2) Encapsulate BDK related defines under '#ifdef BDK_ACCESS'.
 * 
 *    Rev 1.7.1.0   Aug 08 2006 15:55:30   Polina.Marimont
 * DOC Driver 1.0 initial
 */

#ifndef FLSTRUCT_H
#define FLSTRUCT_H

#include "flcommon.h"


/**************************************************************************/
/* Function opcode definitions:                                           */
/*   All TrueFFS functions has a uniques opcodes. The following enum      */
/*  defines all the function calls used by the TrueFFS SDK API.           */
/* Note:                                                                  */
/* The order of the enum bellow should be strictly kept since the bdcall  */
/* function utilizes the index values to simplify the function search     */
/**************************************************************************/
typedef enum {
/* The following routines are files related routines */

        /*********/
        /* FILES */
        /*********/

  FL_READ_FILE                  = 0,
  FL_WRITE_FILE,
  FL_SPLIT_FILE,
  FL_JOIN_FILE,
  FL_SEEK_FILE,
  FL_FIND_NEXT_FILE,
  FL_FIND_FILE,
  FL_TRUNCATE_FILE,
  INDEX_WRITE_FILE_START        = 100,
  FL_CLOSE_FILE,
  FL_FLUSH_FILE,
  INDEX_OPENFILES_END           = 200,
  FL_OPEN_FILE,
  FL_DELETE_FILE,
  FL_FIND_FIRST_FILE,
  FL_GET_DISK_INFO,
  FL_RENAME_FILE,
  FL_MAKE_DIR,
  FL_REMOVE_DIR,
  FL_FLUSH_BUFFER,
  FL_CLOSE_ALL_FILES,
  FL_FLUSH_ALL_FILES,
  FL_OPEN_DIRECTORY,
  FL_OPEN_MM_FILE,
  FL_LAST_FAT_FUNCTION          = 300,

  /* The following routines will not perform valid partition check */
       /**********/
       /* BINARY */
       /**********/
  INDEX_BINARY_START            = 400,
  FL_BINARY_WRITE_INIT,
  FL_BINARY_WRITE_BLOCK,
  FL_BINARY_CREATE,
  FL_BINARY_ERASE,
  FL_BINARY_PROTECTION_CHANGE_KEY,
  FL_BINARY_PROTECTION_CHANGE_LOCK,
  FL_BINARY_PROTECTION_SET_TYPE,
  INDEX_BINARY_WRITE_END        = 500,
  FL_BINARY_READ_INIT,
  FL_BINARY_READ_BLOCK,
  FL_BINARY_PARTITION_INFO,
  FL_BINARY_PROTECTION_GET_TYPE,
  FL_BINARY_PROTECTION_INSERT_KEY,
  FL_BINARY_PROTECTION_REMOVE_KEY,
  INDEX_BINARY_END              = 600,

/* The following routines must be called with partition number 0 */
  INDEX_NEED_PARTITION_0_START  = 700,
      /* OTP */
  FL_OTP_SIZE,
  FL_OTP_READ,
  FL_OTP_WRITE,
  FL_WRITE_IPL,
  FL_READ_IPL,
      /* PHYSICAL */
  FL_DEEP_POWER_DOWN_MODE,
  FL_GET_PHYSICAL_INFO,
  FL_PHYSICAL_READ,
  FL_PHYSICAL_WRITE,
  FL_PHYSICAL_ERASE,
  FL_UPDATE_SOCKET_PARAMS,
  FL_UNIQUE_ID,
  FL_CUSTOMER_ID,
  BD_FORMAT_VOLUME,
  BD_FORMAT_PHYSICAL_DRIVE,
  FL_PLACE_EXB,
  FL_READ_BBT,
  FL_WRITE_BBT,
  FL_GET_EXTENDED_DISK_INFO,
  FL_PROTECTION_STICKY_LOCK,
  BD_FLASH_FORMAT,
  BD_UNFORMAT,
  FL_HW_CONFIG,
  FL_RECOVER_FROM_POWER_LOSS,
  FL_IPL_PROTECTION_GET_TYPE,
  FL_IPL_PROTECTION_REMOVE_KEY,
  FL_IPL_PROTECTION_INSERT_KEY,
  FL_IPL_PROTECTION_CHANGE_KEY,
  FL_IPL_PROTECTION_CHANGE_TYPE,

  INDEX_NEED_PARTITION_0_END    = 800,
/* The following routines will go through the volume validity check */
      /* PROTECTION */
  FL_PROTECTION_GET_TYPE,
  FL_PROTECTION_REMOVE_KEY,
  FL_PROTECTION_INSERT_KEY,
  FL_PROTECTION_SET_LOCK,
  FL_PROTECTION_CHANGE_KEY,
  FL_PROTECTION_CHANGE_TYPE,
  FL_COUNT_VOLUMES,
  FL_INQUIRE_CAPABILITIES,
     /* BDTL */
  FL_MOUNT_VOLUME,
  FL_ABS_MOUNT,
  BD_FORMAT_LOGICAL_DRIVE,
  FL_WRITE_PROTECTION,
  FL_DISMOUNT_VOLUME,
  FL_CHECK_VOLUME,
  FL_DEFRAGMENT_VOLUME,
  FL_ABS_WRITE,
  FL_ABS_DELETE,
  FL_ABS_READ,
  FL_ABS_ADDRESS,
  FL_GET_BPB,
  FL_SECTORS_IN_VOLUME,
  FL_VOLUME_INFO,
  FL_VERIFY_VOLUME,
  FL_CLEAR_QUICK_MOUNT_INFO,
  FL_RUGGEDIZE_OPERATION,	/* not used */
  FL_ABS_WRITE_UNCOMMITED,	/* not used */
  FL_ABS_DELETE_UNCOMMITED,	/* not used */
  FL_ABS_READ_RUGGEDIZED,	/* not used */
  FL_GET_QUICK_MOUNT_STATUS,
  FL_WRITE_QUICK_MOUNT_INFO,
  FL_LOAD_VOLUMES_CACHE,
  FL_COMPLETE_OPERATION,
  FL_FIND_LOGICAL_PARTITION,
  FL_CREATE_LOGICAL_PARTITIONS,
  FL_FORMAT_FS,
  FL_GET_BD_VERSION,
  FL_GET_FS_VERSION,
  BD_ERASE_BD,
  FL_ABS_SECURE_DELETE,
  FL_MCOTP_SIZE,/* not used - must gone */
  FL_MCOTP_READ,/* not used - must gone */
  FL_MCOTP_WRITE,/* not used - must gone */
  FL_DOCH_PASS_THROUGH /* DOCH only */
} FLFunctionNo;



/**************************************************************************/
/*  Structures and defines for GetInfo routines:                          */
/*  GetInfo routines are used by several TrueFFS packages.                */
/*  The output structures and values are defined below                    */
/**************************************************************************/

/*---------------------------------------------------------*/
/*                     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 {
  FLDword  logicalSectors;    /*  number of logical sectors                  */
  FLDword  bootAreaSize;      /*  boot area size                             */
  FLDword  baseAddress;       /*  physical base address                      */
  FLWord   flashType;         /*  JEDEC id of the flash                      */
  FLDword  dwPhysicalSize;    /*  physical size of the media                 */
  FLDword  dwPhysicalUnitSize;/*  Erasable block size                        */
  FLByte   DOCType;           /*  DiskOnChip type (MDoc/Doc2000)             */
  FLSByte  lifeTime;          /*  Life time indicator for the media (1-10)   */
                              /*  1 - the media is fresh,                    */
                              /*  10 - the media is close to its end of life */
  FLSByte  driverVer[10];     /*  driver version (NULL terminated string)    */
  FLSByte  OSAKVer[10];       /*  TrueFFS version that driver is based on    */
                              /*  (NULL terminated string)                   */
  FLDword  cylinders;         /*  Media.....                                 */
  FLDword  heads;             /*            geometry......                   */
  FLDword  sectors;           /*                            parameters.      */
} VolumeInfoRecord;


/*---------------------------------------------------------*/
/*                          P h y s i c a l I n f o        */
/*                                                         */
/* A structure that holds physical information about the   */
/* media. The information includes JEDEC ID, unit size and */
/* media size. Pointer to this structure is passed to the  */
/* function flGetPhysicalInfo where it receives the        */
/* relevant data.                                          */
/*---------------------------------------------------------*/

typedef struct {
  FLWord type;                 /* Flash device type (JEDEC id)                 */
  FLByte         mediaType;    /* type of media see below                      */
  FLDword        dwUnitSize;   /* Smallest physically erasable size in sectors */
  FLDword        dwMediaSize;  /* media size in sectors                        */
  FLDword        dwChipSize;   /* individual chip size in sectors              */
  FLDword        interleaving; /* device interleaving                          */
} PhysicalInfo;



/*---------------------------------------------------------*/
/*                  f l E x t e n d e d D i s k I n f o    */
/*                                                         */
/* This structure supplies very low-level information on   */
/* the device                                              */
/*                                                         */
/* Note: This structure is used for M-Systems low level    */
/*      utilities. It is subject to chages from one TrueFFS*/
/*      version to the other.                              */

⌨️ 快捷键说明

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