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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? tffsconfig.c

?? Vxworks下BSP源碼
?? C
字號:
/* tffsConfig.c - TrueFFS configuration file for VxWorks *//* Copyright 1984-2001 Wind River Systems, Inc. */#include "copyright_wrs.h"/* FAT-FTL Lite Software Development Kit * Copyright (C) M-Systems Ltd. 1995-2001	*//*modification history--------------------01w,02oct02,nrv  fixing diab build error01v,28mar02,nrv  adding INCLUDE_MTD_CFIAMD01u,12dec01,nrv  supressing the compiler warning on tffsVersion01t,07nov01,yp  fixing SPR #6383801s,02nov01,nrv  changing the version number to 2.201r,17sep01,yp  merging code changes from T3. Preserving T2 specifics that                 were removed in T301q,25apr01,mem  Remove NFTL, CDSN and DOC2.01p,20dec00,tlc  Add user-defined "Identify" routine to MTD table.01t,23apr01,yp  Incrementing version number to 2.101s,29nov00,tlc  Added MTD_USR_IDENTIFY to the mtdTable. This allows                 user-defined identify routines to be used for trueFFS		                  support.01r,06Sep00,csh  Added code to free pBuf on error SPR #3424601q,06Sep00,csh  Added check for pBuf == NULL SPR #3424601p,01Sep00,csh  Removed MACRO for INCLUDE_SHOW_ROUTINES01o,04feb99,yp   added MACRO INCLUDE_TFFS_SHOW for better scalability.01m,21apr98,yp   added tffs subdir to include path01n,28feb98,kbw  made man page edits to fix problems found by QE01m,28feb98,kbw  made man page edits01l,19jan98,hdn  added new function tffsShowAll().01k,08jan98,hdn  added new MTD for Heurikon Baja4700.01j,06jan98,hdn  cleaned up tffsShow() and tffsBootImagePut().01i,18dec97,yp   added documentation on sharing bootrom with TFFS01h,15dec97,yp   doc cleanup01g,11dec97,hdn  added tffsRawio()'s return value check in tffsShow().01f,08dec97,hdn  renamed mkbootTffs() to tffsCopy().01e,05dec97,hdn  changed tffsSocket[] to LOCAL variable.01d,05dec97,hdn  added tffsShow() and mkbootTffs().01c,11nov97,hdn  fixed documentation of flRegisterComponents().01b,07nov97,hdn  cleaned up.01a,07jul97,ami  written by Amirban at M-Systems*//*DESCRIPTIONThis source file, with the help of sysTffs.c, configures TrueFFS for VxWorks.  The functions defined here are generic to all BSPs.  To include these functionsin the BSP-specific module, the BSP's sysTffs.c file includes this file.  Within the sysTffs.c file, define statements determine which functions from the tffsConfig.c file are ultimately included in TrueFFS.The only externally callable routines defined in this file are tffsShow(), tffsShowAll(), and tffsBootImagePut().  You canexclude the show utilities if you edit config.h and undefine INCLUDE_SHOW_ROUTINES.  You can exclude tffsBootImagePut() if youedit sysTffs.c and undefine INCLUDE_TFFS_BOOT_IMAGE.  (If you find theseutilities are missing and you want them included, edit config.h and define INCLUDE_SHOW_ROUTINES and INCLUDE_TFFS_BOOT_IMAGE.)If you wish to include only the TrueFFS specific show routines you coulddefine INCLUDE_TFFS_SHOW instead of INCLUDE_SHOW_ROUTINES in config.h.However, for the most part, these externally callable routines are only a small part of the TrueFFS configuration needs handled by this file.  The routines internal to this file make calls into the MTDs and translation layer modules of TrueFFS.  At link time, resolving the symbols associated with these calls pulls MTD and translation layer modules into VxWorks. However, each of these calls to the MTDs and the translation layer modulesis only conditionally included.  The constants that control the includesare defined in sysTffs.c.  To exclude an MTD or translation layer module,you edit sysTffs.c, undefine the appropriate constant, and rebuild sysTffs.o.These constants are described in the reference entry for 'sysTffs'. INCLUDE FILES: stdcomp.h*//* includes */#include "tffs/stdcomp.h"#include "tffs/tffsDrv.h"#include "tffs/fatlite.h"#include "stdio.h"/* defines */#ifdef INCLUDE_SHOW_ROUTINES#define INCLUDE_TFFS_SHOW#endif /* INCLUDE_SHOW_ROUTINES *//* externs */#ifdef INCLUDE_MTD_USRFLStatus  MTD_USR_IDENTIFY (FLFlash vol);#endif /* INCLUDE_MTD_USR */#ifdef INLUCDE_MTD_K9F2808U0CFLStatus  nandMTDIdentify(FLFlash vol);#endif	/*INCLUDE_MTD_MINE*//* globals */MTDidentifyRoutine mtdTable[] = 	/* MTD tables */    {#ifdef  INCLUDE_MTD_CFIAMD    cfiAmdIdentify,#endif  /* INCLUDE_MTD_CFIAMD */#ifdef	INCLUDE_MTD_CFISCS    cfiscsIdentify,#endif	/* INCLUDE_MTD_CFISCS */#ifdef	INCLUDE_MTD_I28F016    i28f016Identify,#endif	/* INCLUDE_MTD_I28F016 */#ifdef	INCLUDE_MTD_I28F008    i28f008Identify,#endif	/* INCLUDE_MTD_I28F008 */#ifdef	INCLUDE_MTD_I28F008_BAJA    i28f008BajaIdentify,#endif	/* INCLUDE_MTD_I28F008_BAJA */#ifdef	INCLUDE_MTD_AMD    amdMTDIdentify,#endif	/* INCLUDE_MTD_AMD */#ifdef INCLUDE_MTD_USR    MTD_USR_IDENTIFY,#endif  /* INCLUDE_MTD_USR */#ifdef INLUCDE_MTD_K9F2808U0C		nandMTDIdentify,#endif	/*INCLUDE_MTD_MINE*/	#ifdef	INCLUDE_MTD_WAMD    flwAmdMTDIdentify,#endif	/* INCLUDE_MTD_WAMD */    NULL    };int noOfMTDs = NELEMENTS (mtdTable) - 1;	/* number of MTDs */TLentry tlTable[] = 			/* TL tables */    {#ifdef	INCLUDE_TL_FTL#ifdef	FORMAT_VOLUME    {mountFTL, formatFTL},#else    mountFTL,#endif	/* FORMAT_VOLUME */#endif	/* INCLUDE_TL_FTL */#ifdef	INCLUDE_TL_SSFDC#ifdef	FORMAT_VOLUME    {mountSSFDC, formatSSFDC},#else    mountSSFDC,#endif	/* FORMAT_VOLUME */#endif	/* INCLUDE_TL_SSFDC */    NULL    };int noOfTLs = NELEMENTS (tlTable) - 1;	/* number of TLs *//* locals */LOCAL char * tffsSocket[DRIVES] = {NULL}; /* name of the socket interface */#ifdef INCLUDE_TFFS_SHOW LOCAL char * tffsVersion = "2.2";	/* WRS version number of TFFS */#endif /* INCLUDE_TFFS_SHOW *//* forward declarations */LOCAL VOID sysTffsInit (void);		/* BSP dependent init routine *//********************************************************************************* flRegisterComponents - register MTD and translation layer components for use** This routine registers MTD and translation layer components for use.* This function is called by FLite once only, at initialization of the* FLite system.** NOMANUAL** RETURNS: N/A*/void flRegisterComponents (void)    {    sysTffsInit ();    }#ifdef	INCLUDE_TFFS_SHOW/********************************************************************************* tffsShowAll - show device information on all socket interfaces ** This routine prints device information on all socket interfaces. ** RETURNS: N/A*/void tffsShowAll (void)    {    int ix;    printf ("TFFS Version %s\n", tffsVersion);    for (ix = 0; ix < noOfDrives; ix++)	tffsShow (ix);    }/********************************************************************************* tffsShow - show device information on a specific socket interface ** This routine prints device information on the specified socket interface. * This information is particularly useful when trying to determine the * number of Erase Units required to contain a boot image.  The field called* unitSize reports the size of an Erase Unit.** If the process of getting physical information fails, an error code is * printed. The error codes can be found in flbase.h.** RETURNS: N/A*/void tffsShow     (    int driveNo			/* TFFS drive number */    )    {    PhysicalInfo info;    FLStatus status;    if (tffsSocket[driveNo] == NULL)	{        printf ("%d: ---- no socket interface installed ----\n", driveNo);	return;	}    status = tffsRawio (driveNo, TFFS_GET_PHYSICAL_INFO, (int)&info, 0, 0);    if (status != OK)	{        printf ("%d: **** communication failed with error %d ****\n",                driveNo, status);	return;	}    printf ("%d: socket=%s: ", driveNo, tffsSocket[driveNo]);    printf ("type=0x%x, unitSize=0x%x, mediaSize=0x%x\n", info.type, 	    (UINT)info.unitSize, (UINT)info.mediaSize);    }#endif	/* INCLUDE_TFFS_SHOW */#ifdef	INCLUDE_TFFS_BOOT_IMAGE/********************************************************************************* tffsBootImagePut - write to the boot-image region of the flash device** This routine writes an input stream to the boot-image region (if any) of * a flash memory device.  Typically, the input stream contains a boot image, * such as the VxWorks boot image, but you are free to use this function to * write any data needed. The size of the boot-image region is set by * the tffsDevFormat() call (or the sysTffsFormat() call, a BSP-specific helper * function that calls tffsDevFormat() internally) that formats the flash * device for use with TrueFFS.  * * If tffsBootImagePut() is used to put a VxWorks boot image in flash, you * should not use the s-record version of the boot image typically produced * by make.  Instead, you should take the pre s-record version (usually * called 'bootrom' instead of 'bootrom.hex'), and filter out its loader * header information using an <xxx>'ToBin' utility.  For example: * .CS* elfToBin < bootrom > bootrom.bin* .CE* * Use the resulting 'bootrom.bin' as input to tffsBootImagePut(). * * The discussion above assumes that you want only to use the flash device to* store a VxWorks image that is retrieved from the flash device and then run * out of RAM. However, because it is possible to map many flash devices * directly into the target's memory, it is also possible run the VxWorks * image from flash memory, although there are some restrictions:* .IP "-"* The flash device must be non-NAND. * .IP "-"* Only the text segment of the VxWorks image ('vxWorks.res_rom') may run out * of flash memory. The data segment of the image must reside in standard RAM. * .IP "-"* No part of the flash device may be erased while the VxWorks image is running * from flash memory. * .LP* Because TrueFFS garbage collection triggers an erase, this last restriction * means that you cannot run a VxWorks boot image out of a flash device that * must also support a writable file system (although a read-only file system * is OK). * * This last restriction arises from the way in which flash devices are* constructed. The current physical construction of flash memory devices does * not allow access to the device while an erase is in * progress anywhere on the flash device. As a result, if TrueFFS tries to * erase a portion of the flash device, the entire device becomes inaccessible * to all other users.  If that other user happens to be the VxWorks image * looking for its next instruction, the VxWorks image crashes.**RETURNS: OK or ERROR*/STATUS tffsBootImagePut     (    int driveNo,		/* TFFS drive number */    int offset,			/* offset in the flash chip/card */    char * filename		/* binary format of the bootimage */    )    {    PhysicalInfo info;    UINT unitNo;    UINT unitSize;    UINT addr;    char * pBuf;    int fd;    int ix;    if (tffsSocket[driveNo] == NULL)	return (ERROR);    if (tffsRawio (driveNo, TFFS_GET_PHYSICAL_INFO, (int)&info, 0, 0) != OK)        {        printErr ("Unable to get physical info from drive\n");	return (ERROR);	}    if ((pBuf = (char *)malloc (info.unitSize)) == NULL)	{       	printErr ("Can't allocate %d bytes of memory\n", info.unitSize);	return( ERROR ) ;	}    if ((fd = open (filename, O_RDONLY, 0644)) == ERROR)        {        printErr ("Can't open \"%s\"\n", filename);	free( pBuf ) ;        return (ERROR);	}    addr = offset;    unitNo = offset / info.unitSize;    unitSize = info.unitSize - (offset % info.unitSize);    /* If the offset is not Erase Unit aligned we need to save the the     * contents of the region begining at the start of this erase unit      * and ending at the specified address so we can restore it after     * we erase the Erase Unit     */    if (tffsRawio (driveNo, TFFS_PHYSICAL_READ, unitNo * info.unitSize,	           offset % info.unitSize, (int)pBuf) != OK)        {	printErr ("Failed attempting to save Erase Unit %d\n", unitNo);	close (fd);	free( pBuf ) ;	return (ERROR);	}            if (tffsRawio (driveNo, TFFS_PHYSICAL_ERASE, unitNo, 1, 0) != OK)	{	printErr ("Failed attempting to erase Erase Unit %d\n", unitNo);	close (fd);	free( pBuf ) ;	return (ERROR);	}    if (tffsRawio (driveNo, TFFS_PHYSICAL_WRITE, unitNo * info.unitSize,	           offset % info.unitSize, (int)pBuf) != OK)        {	printErr ("Failed attempting to restore Erase Unit %d\n", unitNo);	close (fd);	free( pBuf ) ;	return (ERROR);	}    while (unitSize)	{        if ((ix = read (fd, pBuf, unitSize)) == ERROR)            {            printErr ("Error reading inputfile: 0x%x\n", errno);	    free( pBuf ) ;            return (ERROR);            }        if (ix == 0)	    break;        if ((addr + ix) > info.mediaSize)	    {	    printErr ("Error : Attempting to write beyond Flash boundary\n");	    close (fd);	    free( pBuf ) ;	    return (ERROR);	    }        if (tffsRawio (driveNo, TFFS_PHYSICAL_WRITE, addr, ix, (int)pBuf) != OK)	    {	    printErr ("Physical write failed at address 0x%x\n", addr);	    close (fd);	    free( pBuf ) ;	    return (ERROR);	    }	addr += ix;	unitSize -= ix;	if (unitSize == 0)	    {            unitSize = info.unitSize;            unitNo++;            if (tffsRawio (driveNo, TFFS_PHYSICAL_ERASE, unitNo, 1, 0) != OK)	        {		printErr ("Failed attempting to erase Erase Unit %d\n", unitNo);	        close (fd);	        free( pBuf ) ;	        return (ERROR);	        }	    }	}    close (fd);    free( pBuf ) ;    return (OK);    }    #endif	/* INCLUDE_TFFS_BOOT_IMAGE */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产东北露脸精品视频| 日韩精品一区二区三区在线播放 | 亚洲视频一二区| 亚洲欧美色综合| 亚洲一本大道在线| 麻豆精品一区二区综合av| 国产老妇另类xxxxx| 成人动漫一区二区在线| 精品视频在线视频| 国产性天天综合网| 亚洲国产精品久久人人爱| 久久国产精品一区二区| 99久免费精品视频在线观看| 91精品国产色综合久久不卡蜜臀 | 亚洲欧洲成人av每日更新| 亚洲第一av色| 国产suv精品一区二区883| 欧美另类z0zxhd电影| 中文字幕一区二区三| 日韩国产在线一| yourporn久久国产精品| 欧美精品三级日韩久久| 中文字幕一区av| 国产一区二区三区黄视频| 一本色道综合亚洲| 中文文精品字幕一区二区| 日韩成人伦理电影在线观看| 色综合天天综合网天天看片| 精品久久久三级丝袜| 天天操天天综合网| av一二三不卡影片| 欧美极品aⅴ影院| 国产一区二区三区在线观看精品| 欧美日韩亚洲综合在线| 国产精品国产三级国产三级人妇 | 亚洲高清在线精品| 色婷婷av久久久久久久| 中文字幕一区在线观看| 成人午夜在线免费| 国产精品私人影院| 成人av在线电影| 亚洲欧洲日韩综合一区二区| 成人一区在线观看| 国产精品网站导航| 94-欧美-setu| 亚洲桃色在线一区| 91老司机福利 在线| 亚洲欧美中日韩| 在线观看网站黄不卡| 调教+趴+乳夹+国产+精品| 91精品国产综合久久久久久| 久久99精品久久只有精品| 久久久久国产成人精品亚洲午夜| 国产一区二区三区不卡在线观看| 日本一区二区免费在线观看视频 | 一区二区三区高清在线| 欧美日产国产精品| 麻豆91小视频| 国产精品情趣视频| 欧美三级中文字| 久久精品国产久精国产爱| 国产精品三级在线观看| 欧美午夜精品久久久久久孕妇| 天堂va蜜桃一区二区三区| 精品99一区二区| 97久久超碰国产精品| 视频一区在线视频| 日本一区二区不卡视频| 欧美日韩成人在线一区| 高清不卡一区二区在线| 丝袜脚交一区二区| 国产视频在线观看一区二区三区| 91九色02白丝porn| 久草热8精品视频在线观看| 日韩一区在线播放| 久久亚洲二区三区| 欧美主播一区二区三区美女| 国产美女在线精品| 日本欧美肥老太交大片| 国产欧美精品一区| 91精品国产aⅴ一区二区| 色综合久久综合中文综合网| 成人午夜视频在线观看| 极品瑜伽女神91| 午夜激情久久久| 亚洲一二三专区| 亚洲男女毛片无遮挡| 中文字幕五月欧美| 国产欧美一区二区精品性色超碰| 日韩一区二区三| 91麻豆精品国产综合久久久久久| 欧美专区日韩专区| 欧美日韩一区二区在线观看| 色999日韩国产欧美一区二区| 精品国产欧美一区二区| 日韩欧美一二三四区| 制服丝袜亚洲播放| 欧美乱妇一区二区三区不卡视频 | 精品少妇一区二区三区日产乱码 | 久久国产精品一区二区| 国产欧美一区二区三区鸳鸯浴| 日韩电影网1区2区| 欧美日韩日本视频| 日本视频一区二区三区| 亚洲国产成人av网| 狠狠色丁香婷综合久久| 色爱区综合激月婷婷| 久久久久久久久99精品| 午夜成人免费电影| 91麻豆国产精品久久| 久久天天做天天爱综合色| 国产精品第五页| 亚洲国产欧美日韩另类综合| 日本欧美一区二区三区乱码| 国产精品一区二区三区四区| 91天堂素人约啪| 91精品黄色片免费大全| 久久久欧美精品sm网站| 亚洲区小说区图片区qvod| 午夜av电影一区| 国产精品一区二区久久不卡| 91麻豆成人久久精品二区三区| 欧美猛男gaygay网站| 国产区在线观看成人精品| 一区二区三区免费| 国产高清不卡二三区| 在线视频国内一区二区| 久久综合九色综合欧美亚洲| 中文字幕一区二区三区不卡| 麻豆久久久久久| 欧美亚洲国产一区在线观看网站 | 一本一本大道香蕉久在线精品| 欧美高清视频在线高清观看mv色露露十八 | 欧美精品粉嫩高潮一区二区| 亚洲毛片av在线| caoporn国产精品| 日本一区二区三区视频视频| 国产一区欧美日韩| 2020日本不卡一区二区视频| 毛片基地黄久久久久久天堂| 欧美日免费三级在线| 亚洲免费看黄网站| www.色精品| 国产精品久久三区| 粉嫩久久99精品久久久久久夜 | 亚洲电影第三页| 欧美日韩亚洲另类| 亚洲国产aⅴ成人精品无吗| 欧美日韩精品一区二区三区蜜桃| 亚洲国产综合人成综合网站| 欧美日韩免费不卡视频一区二区三区| 一区二区久久久久| 欧美日韩免费观看一区三区| 日韩精品电影在线| 精品成人一区二区| 成人爽a毛片一区二区免费| 国产精品久久久久aaaa樱花| 在线观看日韩一区| 奇米精品一区二区三区在线观看 | 免费在线观看一区二区三区| 欧美午夜一区二区三区| 看国产成人h片视频| 亚洲综合激情另类小说区| 国产三级精品视频| 日韩欧美精品在线视频| 欧美日韩一级大片网址| 成人97人人超碰人人99| 黄色日韩网站视频| 日本亚洲天堂网| 亚洲三级小视频| 欧美成人一区二区三区| 欧美一a一片一级一片| 国产成人综合在线| 午夜精品久久久久久久| 国产精品视频你懂的| 日韩一区二区精品葵司在线| 成人不卡免费av| 国产又黄又大久久| 日韩av在线发布| 亚洲天堂精品在线观看| 国产亚洲综合在线| 91麻豆精品国产综合久久久久久 | 欧美一卡二卡在线观看| 91麻豆精品秘密| www.性欧美| 白白色 亚洲乱淫| 成人成人成人在线视频| 国产69精品久久久久777| 琪琪久久久久日韩精品| 亚洲一区二区三区四区在线| 亚洲人成网站精品片在线观看| 国产嫩草影院久久久久| xvideos.蜜桃一区二区| 日韩视频在线观看一区二区| 欧美片网站yy| 在线播放中文一区| 56国语精品自产拍在线观看| 欧美日本不卡视频| 欧美日韩高清一区二区| 精品人伦一区二区色婷婷|