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

📄 bddefs.h

📁 M-System DOC(Disk on a Chip) Flash芯片的诊断工具, 可以从Flash芯片中获取特定的数据信息, 用于判断芯片当前的状态.
💻 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/bddefs.h-arc  $
 * 
 *    Rev 1.3   Jan 14 2004 22:28:52   oris
 * Added new file flag - FL_FILE_MUST_CREATE - 2 - Create file even if found
 * 
 *    Rev 1.2   Sep 30 2003 17:55:56   oris
 * Added globalAttFlag field to Volume structure.
 * Added FL prefix to file flag definitions
 * 
 *    Rev 1.1   May 18 2003 13:28:32   OriS
 * Removed prototype of dismountVolume(Volume vol), initDone and setBusy. They are now used only by blockdev.c
 * 
 *    Rev 1.0   Apr 09 2003 12:15:58   OriS
 * Initial revision.
 * 
 */

#ifndef BDDEFS_H
#define BDDEFS_H

#include "fltl.h"
#include "flsocket.h"
#include "flbuffer.h"
#include "stdcomp.h"

typedef struct {
  FLSByte       flags;                  /* See description in flreq.h */
  unsigned      sectorsPerCluster;      /* Cluster size in sectors */
  unsigned      maxCluster;             /* highest cluster no. */
  unsigned      bytesPerCluster;        /* Bytes per cluster */
  unsigned      bootSectorNo;           /* Sector no. of DOS boot sector */
  unsigned      firstFATSectorNo;       /* Sector no. of 1st FAT */
  unsigned      secondFATSectorNo;      /* Sector no. of 2nd FAT */
  unsigned      numberOfFATS;           /* number of FAT copies */
  unsigned      sectorsPerFAT;          /* Sectors per FAT copy */
  unsigned      rootDirectorySectorNo;  /* Sector no. of root directory */
  unsigned      sectorsInRootDirectory; /* No. of sectors in root directory */
  unsigned      firstDataSectorNo;      /* 1st cluster sector no. */
  unsigned      allocationRover;        /* rover pointer for allocation */

#if (defined(FL_FILES) && (FL_FILES > 0))
  FLBuffer      volBuffer;              /* Define a sector buffer */
#endif
  FLMutex*      volExecInProgress;
  FLFlash FAR2* flash;                  /* flash structure for low level operations */
  TL            tl;                     /* Translation layer methods */
  FLSocket      *socket;                /* Pointer to socket */
#ifdef WRITE_PROTECTION
  FLDword       password[2];
#endif
#ifdef WRITE_EXB_IMAGE
  FLDword       binaryLength;        /* Actual binary area taken by the exb      */
  FLByte        moduleNo;            /* Currently written module                 */
#endif /* WRITE_EXB_IMAGE */
  FLBoolean     globalAttFlag;        /* indication of global attention flag */
} Volume;

/* drive handle masks */

#if (defined(FL_FILES) && (FL_FILES > 0))
typedef struct {
  FLSDword      currentPosition;        /* current byte offset in file */
#define         ownerDirCluster currentPosition /* 1st cluster of owner directory */
  FLSDword      fileSize;               /* file size in bytes */
  SectorNo      directorySector;        /* sector of directory containing file */
  unsigned      currentCluster;         /* cluster of current position */
  FLByte        directoryIndex;         /* entry no. in directory sector */
  FLByte        flags;                  /* See description below */
  Volume *      fileVol;                /* Drive of file */
} File;

/* File flag definitions */
#define FL_FILE_MUST_CREATE        2    /* Create file even if found */
#define FL_FILE_MODIFIED           4    /* File was modified */
#define FL_FILE_IS_OPEN            8    /* File entry is used */
#define FL_FILE_IS_DIRECTORY    0x10    /* File is a directory */
#define FL_FILE_IS_ROOT_DIR     0x20    /* File is root directory */
#define FL_FILE_READ_ONLY       0x40    /* Writes not allowed */
#define FL_FILE_MUST_OPEN       0x80    /* Create file if not found */
#endif /* FL_FILES > 0 */

/* #define buffer (vol.volBuffer) */
#define execInProgress (vol.volExecInProgress)

extern Volume   vols[VOLUMES];
const void FAR0 *findSector(Volume vol, SectorNo sectorNo);
FLStatus dismountFS(Volume vol,FLStatus status);
#if (defined(FL_FILES) && (FL_FILES > 0))
void initFS(void);
#endif
#endif

⌨️ 快捷键说明

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