亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ssfdc.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* * $Log:   V:/ssfdc.c_v  $ * *    Rev 1.17   01 Mar 1998 12:59:30   amirban * Add parameter to mapSector * *    Rev 1.16   29 Sep 1997 14:17:28   danig * Call setBusy(OFF) from dismount function * *    Rev 1.15   18 Sep 1997 10:11:42   danig * Warnings * *    Rev 1.14   10 Sep 1997 16:21:16   danig * Got rid of generic names * *    Rev 1.13   10 Sep 1997 13:32:20   danig * Limit number of virtual units * *    Rev 1.12   04 Sep 1997 15:52:46   danig * Debug messages * *    Rev 1.11   04 Sep 1997 11:07:52   danig * Share buffer with MTD * *    Rev 1.10   28 Jul 1997 15:13:34   danig * volForCallback & moved standard typedefs to flbase.h * *    Rev 1.9   27 Jul 1997 14:04:18   danig * FAR -> FAR0 * *    Rev 1.8   24 Jul 1997 15:14:18   danig * Fixed ECC on read * *    Rev 1.7   20 Jul 1997 11:01:52   danig * Ver 2.0 * *    Rev 1.6   13 Jul 1997 10:51:58   danig * erasedSectors * *    Rev 1.5   01 Jul 1997 15:36:32   danig * Changes to isErasedSector & isErasedUnit * *    Rev 1.4   29 Jun 1997 16:13:02   danig * Comments * *    Rev 1.3   12 Jun 1997 17:41:54   danig * ECC on read, use second address area. * *    Rev 1.2   08 Jun 1997 19:05:24   danig * Delete sector bug & check for mount in setBusy() * *    Rev 1.1   01 Jun 1997 13:42:36   amirban * Use ftllite.h I/F * *    Rev 1.0   15 Apr 1997 17:56:26   danig * Initial revision. *//************************************************************************//*                                                                      *//*		FAT-FTL Lite Software Development Kit			*//*		Copyright (C) M-Systems Ltd. 1995-1997			*//*									*//************************************************************************/#include "fltl.h"#include "flflash.h"#include "flbuffer.h"/* VF: This macro is vital to supporting devices with 32 or more sectors per erase       unit.  Data types and code coming originally from M-Systems only provided       for up to 16 sectors per erase unit.  Some data types had bit fields that       depended on the number of sectors per erase unit not exceeding 16.       Several data type and code modifications have been made based on the value       of this macro to accomodate larger erase unit sized devices.*/#define TFFS_SECTORS_PER_UNIT  32typedef long int VirtualAddress;/* VF: Updated PhysUnit storage type.  As used below in the Unit type,       a PhysUnit only provided 8 bits of storage:  The upper 3 bits were       used to bookkeep sector status, and the low 5 bits represented a count       of sectors free in the unit.  5 bits only counts up to 31.  We need more       bits for the count, hence the increase in size of this data type.*/#if (TFFS_SECTORS_PER_UNIT < 32)typedef unsigned char PhysUnit;#elsetypedef unsigned short PhysUnit;#endiftypedef unsigned short UnitNo;#define FORMAT_PATTERN 1, 3, 0xd9, 1, 0xff, 0x18, 2, 0xdf, 1, 0x20#define CIS_DATA 0x1, 0x3, 0xd9, 0x1, 0xff, 0x18, 0x2, 0xdf, 0x1, \0x20, 0x4, 0x0, 0x0, 0x0, 0x0, 0x21, 0x2, \0x4, 0x1, 0x22, 0x2, 0x1, 0x1, 0x22, 0x3, \0x2, 0x4, 0x7, 0x1a, 0x5, 0x1, 0x3, 0x0, \0x2, 0xf, 0x1b, 0x8, 0xc0, 0xc0, 0xa1, 0x1, \0x55, 0x8, 0x0, 0x20, 0x1b, 0xa, 0xc1, 0x41, \0x99, 0x1, 0x55, 0x64, 0xf0, 0xff, 0xff, 0x20, \0x1b, 0xc, 0x82, 0x41, 0x18, 0xea, 0x61, 0xf0, \0x1, 0x7, 0xf6, 0x3, 0x1, 0xee, 0x1b, 0xc, \0x83, 0x41, 0x18, 0xea, 0x61, 0x70, 0x1, 0x7, \0x76, 0x3, 0x1, 0xee, 0x15, 0x14, 0x5, 0x0, \0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0, \0x20, 0x20, 0x20, 0x20, 0x0, 0x30, 0x2e, 0x30, \0x0, 0xff, 0x14, 0x0, 0xff, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0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0x1, 0x7, 0xf6, 0x3, 0x1, 0xee, 0x1b, 0xc, \0x83, 0x41, 0x18, 0xea, 0x61, 0x70, 0x1, 0x7, \0x76, 0x3, 0x1, 0xee, 0x15, 0x14, 0x5, 0x0, \0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0, \0x20, 0x20, 0x20, 0x20, 0x0, 0x30, 0x2e, 0x30, \0x0, 0xff, 0x14, 0x0, 0xff, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0#define SECTOR_ERASED		1#define SECTOR_ALLOCATED        2#define SECTOR_REPLACED		3#define SECTOR_DELETED1		0x80#define SECTOR_DELETED2		0xf0#define SECTORS_PER_UNIT 16  /* default number of sectors per unit *//*#define ECC_ON_READ*/#define UNASSIGNED_ADDRESS 0xffffffffl/* VF: Due to the increase in size of PhysUnit above from 8 to 16 bits, these macros       must be adjusted accordingly to represent the upper 3 bits of a 16-bit quantity.*/#if (TFFS_SECTORS_PER_UNIT < 32)#define UNIT_FREE	0xe0   /* unassigned unit */#define	UNIT_AVAILABLE	0x80   /* assigned unit */#define UNIT_ERASED	0xc0   /* unit is erased */#define UNIT_BAD	0      /* unit is defective */#define STATUS_MASK	0xe0   /* the unit status is in the 3 MSBs */#else#define UNIT_FREE	0xe000   /* unassigned unit */#define	UNIT_AVAILABLE	0x8000   /* assigned unit */#define UNIT_ERASED	0xc000   /* unit is erased */#define UNIT_BAD	0x0000   /* unit is defective */#define STATUS_MASK	0xe000   /* the unit status is in the 3 MSBs */#endif/* extra area of odd pages is read before extra area of even pages   when page size is 256 */#define STATUS_AREA_OFFSET      ((vol.flash.flags & BIG_PAGE) ? 4 : 12)#define BLOCK_ADDRESS_OFFSET1   ((vol.flash.flags & BIG_PAGE) ? 6 : 14)#define BLOCK_ADDRESS_OFFSET2   ((vol.flash.flags & BIG_PAGE) ? 11 : 3)#define CIS_DATA_OFFSET		((vol.flash.flags & BIG_PAGE) ? 4 : 12)#define ECC1			((vol.flash.flags & BIG_PAGE) ? 13 : 5)#define ECC2			((vol.flash.flags & BIG_PAGE) ? 8 : 0)#define OFFSET1 1#define OFFSET2 2#define INCORRECT_DATA	0#define CORRECT_DATA	0xff#define NO_UNIT 0xfffftypedef struct {  PhysUnit unitStatus;             /* unit status in the 3 MSBs, unassigned */				   /* sectors counter in the rest of the bits. *//* VF: Updated next line.  This is a bit-field, so we need 32 bits to represent sectors: */#if (TFFS_SECTORS_PER_UNIT < 32)  unsigned short erasedSectors;    /* if bit i=1, sector i in the unit is erased. */#else  unsigned long erasedSectors;     /* if bit i=1, sector i in the unit is erased. */#endif} Unit;typedef struct  {  unsigned char sectorStatus;  unsigned char unitStatus;} StatusArea;typedef enum {BAD_FORMAT, SSFDC_FORMAT, ANAND_FORMAT} FormatType;#ifndef MALLOC_TFFS#define HEAP_SIZE	(0x100000l / ASSUMED_NFTL_UNIT_SIZE) *       \			(sizeof(UnitNo) + sizeof(Unit)) *  	\			MAX_VOLUME_MBYTES + SECTORS_PER_UNIT#endifstruct tTLrec {  FLBoolean	    badFormat;		/* true if TFFS format is bad */  UnitNo	    CISblock;           /* Unit no. of CIS block */  unsigned int	    erasableBlockSizeBits;  /* log2 of erasable block size */  UnitNo	    noOfVirtualUnits;  UnitNo	    freeUnits;              /* number of unassigned units */  unsigned long     unitOffsetMask;  unsigned int	    sectorsPerUnit;  UnitNo	    noOfUnits;  unsigned int	    unitSizeBits;  SectorNo	    virtualSectors;  UnitNo            roverUnit;          /* Starting point for allocation search */  UnitNo	    transferUnit;  UnitNo	    replacedUnit;  unsigned int	    sectorsDeleted;     /* number of sector deleted in the					   replaced unit */  Unit 		    *physicalUnits; 	/* unit table by physical no. */  UnitNo	    *virtualUnits; 	/* unit table by logical no. */  unsigned char	    *replacementSectors; /* a table of the sectors in the					    replaced unit */  SectorNo 	    mappedSectorNo;  void FAR0         *mappedSector;  CardAddress	    mappedSectorAddress;  FLFlash	    flash;  FLBuffer          *buffer;#ifndef MALLOC_TFFS  char		    heap[HEAP_SIZE];#endif};#define ssfdcBuffer  vol.buffer->datatypedef TLrec SSFDC;static SSFDC vols[DRIVES];/********************** ECC\EDC part ******************************//*----------------------------------------------------------------------*//*		         c h a r P a r i t y				*//*									*//* Get odd parity of one byte.						*//*                                                                      *//* Parameters:                                                          *//*	c		: One byte of data.				*//*                                                                      *//* Returns:                                                             *//*	Odd parity.							*//*----------------------------------------------------------------------*/static unsigned char charParity(unsigned char c){  unsigned char parityBit = 1;  for (; c; c >>= 1)    parityBit ^= c & 0x01;  return parityBit;}/*----------------------------------------------------------------------*//*		         c r e a t e E c c				*//*									*//* Calculate 22 bits Error correction \ detection code for 256 bytes    *//* of data. 16 bits line parity, 6 bits column parity. ECC scheme 	*//* according to SSFDC specification.					*//*                                                                      *//* Parameters:                                                          *//*	buf		: 256 bytes of data.				*//*	code		: 3 bytes of ECC.				*//*                                                                      *//*----------------------------------------------------------------------*/static void createEcc(unsigned char FAR0 *buf, unsigned char FAR0 *code){  unsigned char lineParity[16], columnParity[6], temp;  int i, k;  /* initialize to 1's, odd parity */  for (i = 0; i < 16; i++)    lineParity[i] = 0xff;  for (i = 0; i < 6; i++)    columnParity[i] = 1;  /* xor the lines */  for (i = 0; i < 256; i++)    for (k = 0; k < 8; k++)      if ((i / (1 << k)) % 2)	lineParity[2 * k + 1] ^= buf[i];      else	lineParity[2 * k] ^= buf[i];  temp = lineParity[0] ^ lineParity[1];  /* temp holds the xor of all the lines */  for(i = 0; i < 3; i++)    code[i] = 0;  /* get line parity */  for(i = 0; i < 16; i++)    if (charParity(lineParity[i]))      code[i / 8] |= (1 << (i % 8));  /* xor the columns */  for(i = 0; i < 8; i++)    for (k = 0; k < 3; k++)      if ((i / (1 << k)) % 2)	columnParity[2 * k + 1] ^= (temp & (0xff >> (7 -  i))) >> i;      else	columnParity[2 * k] ^= (temp & (0xff >> (7 -  i))) >> i;  code[2] |= 0x03;  /* bits 16 and 17 are always 1 */  /* get column parity */  for(i = 0; i < 6; i++)    if (columnParity[i])      code[2] |= 4 << i;}#ifdef ECC_ON_READ/*----------------------------------------------------------------------*//*		         i s F i x a b l e				*//*									*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品在线电影| 久久国产欧美日韩精品| 久久久精品免费观看| 777xxx欧美| 69堂成人精品免费视频| 久久久精品综合| 午夜精品久久久久久久蜜桃app | 91在线免费播放| 成人aaaa免费全部观看| 97久久超碰国产精品电影| 日韩精品一区二区三区视频在线观看 | 日韩av在线播放中文字幕| 视频一区二区欧美| 麻豆久久久久久| 丁香婷婷深情五月亚洲| 色综合中文综合网| 麻豆免费看一区二区三区| 日本福利一区二区| 欧美一区二区大片| 久久九九久精品国产免费直播| 中文字幕av不卡| 亚洲一区二区在线观看视频| 日本亚洲三级在线| 欧美自拍偷拍一区| 久久综合九色综合欧美就去吻 | jvid福利写真一区二区三区| 欧美日本乱大交xxxxx| 亚洲精品一区二区三区99| 天天操天天干天天综合网| 欧美在线观看你懂的| 亚洲精品国产视频| 国产一区二区免费看| 色播五月激情综合网| 亚洲美女区一区| 国产乱人伦偷精品视频免下载 | 国产一区二区电影| 久久免费精品国产久精品久久久久 | 亚洲激情中文1区| 99久久er热在这里只有精品66| 国产精品久久久久久福利一牛影视 | 欧美日韩在线一区二区| 欧洲精品中文字幕| 91精品国产高清一区二区三区| 亚洲裸体xxx| 色综合久久88色综合天天免费| 欧美一级黄色大片| 日韩伦理av电影| 久久国产婷婷国产香蕉| 精品福利在线导航| 懂色av一区二区夜夜嗨| 亚洲精品欧美专区| 欧美一区二区三区四区在线观看| 青青草91视频| 欧美丝袜丝交足nylons| 国产精品不卡一区二区三区| 91一区二区三区在线观看| 久久久久久久久免费| 成人午夜电影久久影院| www日韩大片| 成人av资源网站| 亚洲一区二区高清| 日韩欧美一区二区不卡| 床上的激情91.| 亚洲成人在线网站| 欧美群妇大交群中文字幕| 久久精品国产**网站演员| 国产欧美久久久精品影院| 国产一区二区按摩在线观看| 亚洲日本在线观看| 欧美刺激脚交jootjob| 精品一区二区三区免费视频| 日韩午夜精品电影| 成人午夜免费电影| 日日夜夜一区二区| 国产精品久99| 欧美一区二区在线免费播放| 波多野结衣精品在线| 日本在线播放一区二区三区| 国产精品久久久久7777按摩 | 亚洲午夜av在线| 在线精品视频小说1| 久久se精品一区精品二区| 国产精品高潮呻吟| 日韩一区二区三区视频| 色嗨嗨av一区二区三区| 国产精品一区二区在线观看不卡 | 亚洲欧美在线视频| 色菇凉天天综合网| 国产精品一二三区在线| 亚洲成人福利片| ...av二区三区久久精品| 日韩视频永久免费| 欧美日韩久久不卡| 91麻豆视频网站| 国产不卡视频一区二区三区| 日本在线不卡视频一二三区| 一区二区免费看| 欧美一区二区大片| 精品污污网站免费看| 北条麻妃一区二区三区| 精品一区二区在线免费观看| 日韩精品一二三| 亚洲一区视频在线| 亚洲精品视频在线看| 国产精品青草久久| 91欧美一区二区| 丁香婷婷深情五月亚洲| 国产精品中文字幕一区二区三区| 免费在线看成人av| 日本不卡不码高清免费观看| 午夜精品福利在线| 亚洲综合激情另类小说区| 伊人色综合久久天天人手人婷| 国产精品家庭影院| 国产精品系列在线| 久久精品在这里| 久久精品视频免费| 久久久99久久| 日本一区二区三区高清不卡| 国产农村妇女毛片精品久久麻豆| 26uuu欧美| 国产日韩精品一区| 国产精品久久久久久福利一牛影视 | 日韩激情在线观看| 天天操天天色综合| 麻豆视频观看网址久久| 日本美女一区二区三区视频| 免费在线视频一区| 国产老肥熟一区二区三区| 高清av一区二区| 99精品欧美一区二区三区综合在线| 国产99一区视频免费| 91同城在线观看| 欧美日韩一级二级| 精品日韩在线一区| 中文成人av在线| 一区二区三区毛片| 热久久一区二区| 成人久久视频在线观看| 欧美日韩在线三区| 欧美精品一区二| 亚洲综合网站在线观看| 久久国产精品一区二区| 成人晚上爱看视频| 这里只有精品99re| 国产精品欧美极品| 天堂成人国产精品一区| 国产一区二区伦理| 91九色最新地址| 久久一夜天堂av一区二区三区| 中文字幕在线不卡视频| 日韩国产一区二| 成人av在线网站| 91精品国产综合久久精品性色| 欧美激情一区二区三区全黄| 亚洲妇熟xx妇色黄| 国产69精品久久久久毛片| 欧美日韩国产一区| 国产精品久久久爽爽爽麻豆色哟哟| 亚洲国产aⅴ天堂久久| 国产精品系列在线观看| 欧美日韩大陆在线| 国产精品久久777777| 老司机免费视频一区二区| 色综合久久久久综合| 精品捆绑美女sm三区| 亚洲一区二区偷拍精品| 国产精品1区二区.| 欧美一区二区三区性视频| 亚洲精品国产无天堂网2021| 国产suv精品一区二区6| 欧美一二三区精品| 亚洲一区二区三区三| 成人黄页在线观看| 精品电影一区二区| 日本不卡一区二区三区| 欧美影院一区二区三区| 最新久久zyz资源站| 国产不卡视频在线播放| 精品国产乱码久久久久久久久 | 国产一区二区免费视频| 制服丝袜日韩国产| 亚洲一区二区在线播放相泽| 91丝袜美女网| 国产精品天天摸av网| 韩国理伦片一区二区三区在线播放| 国产综合色在线| 91麻豆精品国产自产在线观看一区 | 美国欧美日韩国产在线播放| 精品视频在线免费观看| 亚洲一区二区av电影| av一区二区三区四区| 中文字幕av不卡| 成人深夜视频在线观看| 久久午夜色播影院免费高清 | av色综合久久天堂av综合| 国产欧美一区二区三区鸳鸯浴| 精品一区二区免费在线观看| 日韩一级片网站| 国产综合色视频|