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

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

?? tffsdrv.c

?? vxworks5.5.1源代碼。完整源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
        }    ioreq.irHandle = pTffsDev->tffsDriveNo;    status = flCheckVolume(&ioreq);    if (status == flNotMounted)        {        status = flMountVolume(&ioreq);        if (status == flOK)            {            ioreq.irData = &bpb;            status = flGetBPB(&ioreq);            }        if (status != flOK)            {            pTffsDev->tffsBlkdev.bd_readyChanged = TRUE;            return (ERROR);            }        /* Modify BLK_DEV structure */        tffsSetFromBPB( &(pTffsDev->tffsBlkdev), &bpb);        pTffsDev->tffsBlkdev.bd_mode = O_RDWR; /* initial mode for device */        }    ioreq.irSectorNo    = startBlk;    ioreq.irSectorCount = numBlks;    ioreq.irData        = pBuffer;    status = flAbsRead(&ioreq);    /* if success cancel dosFs re-mount volume request */    if (status != flOK)        pTffsDev->tffsBlkdev.bd_readyChanged = TRUE;    return ((status == flOK) ? OK : ERROR);    }/********************************************************************************* tffsBlkWrt - write sequence of blocks to TFFS device** This routine writes a sequence of blocks to TrueFFS device.** RETURNS: OK, or ERROR if it failed.** NOMANUAL*/LOCAL STATUS tffsBlkWrt     (    FAST TFFS_DEV * pTffsDev,		/* pointer to device descriptor */    int startBlk,			/* starting block number to write */    int numBlks,			/* number of blocks to write */    char * pBuffer			/* pointer to buffer containing data */    )    {    FLStatus   status = flOK;    IOreq      ioreq;    BPB        bpb;    if ( (NULL == pTffsDev) || (NULL == pBuffer) ||         (pTffsDev->tffsDriveNo >= DRIVES) )        {        return (ERROR);        }    ioreq.irHandle = pTffsDev->tffsDriveNo;    status = flCheckVolume(&ioreq);    if (status == flNotMounted)        {        status = flMountVolume(&ioreq);        if (status == flOK)            {            ioreq.irData = &bpb;            status = flGetBPB(&ioreq);            }        if (status != flOK)            {            pTffsDev->tffsBlkdev.bd_readyChanged = TRUE;            return (ERROR);            }        /* Modify BLK_DEV structure */        tffsSetFromBPB( &(pTffsDev->tffsBlkdev), &bpb);        pTffsDev->tffsBlkdev.bd_mode = O_RDWR;	/* initial mode for device */        }    ioreq.irSectorNo    = startBlk;    ioreq.irSectorCount = numBlks;    ioreq.irData        = pBuffer;    status = flAbsWrite(&ioreq);    if (status == flWriteProtect)        {        flDismountVolume(&ioreq);		/* force a remount */        pTffsDev->tffsBlkdev.bd_mode = O_RDONLY;        }    /* re-mount volume request */    if (status != flOK)        pTffsDev->tffsBlkdev.bd_readyChanged = TRUE;    return ((status == flOK) ? OK : ERROR);    }/********************************************************************************* tffsSetFromBPB - copy some data from BIOS parameter block** This routine copies BIOS parameter block data describing the flash device* returned by TrueFFS into a device descriptor.** RETURNS: N/A** NOMANUAL*/LOCAL void tffsSetFromBPB     (    BLK_DEV * pBlkDev,		/* pointer to device descriptor */    BPB * pBPB			/* pointer to BIOS parameters block */    )    {    if ((NULL == pBlkDev) || (NULL == pBPB))        return;    pBlkDev->bd_nBlocks      = 0;    pBlkDev->bd_bytesPerBlk  = 0;    pBlkDev->bd_blksPerTrack = 0;    pBlkDev->bd_nHeads       = 0;     /* clear first */    if( UNAL2(pBPB->totalSectorsInVolumeDOS3) )        pBlkDev->bd_nBlocks  = UNAL2(pBPB->totalSectorsInVolumeDOS3);    else        pBlkDev->bd_nBlocks  = LE4(pBPB->totalSectorsInVolume);    pBlkDev->bd_bytesPerBlk  = UNAL2(pBPB->bytesPerSector);    pBlkDev->bd_blksPerTrack = LE2(pBPB->sectorsPerTrack);    pBlkDev->bd_nHeads       = LE2(pBPB->noOfHeads);    }/********************************************************************************* tffsDiskChangeAnnounce - announce disk change to the file system attached** This routine is called by TFFS to update the the readyChanged field in the* device descriptor so that the file system can be notified of a disk change.** RETURNS: N/A** NOMANUAL*/void tffsDiskChangeAnnounce    (    unsigned volNo		/* FLite drive number (0 - DRIVES-1) */    )    {    if ((volNo < DRIVES) && (tffsBlkDevs[volNo] != NULL))        tffsBlkDevs[volNo]->tffsBlkdev.bd_readyChanged = TRUE;    }/********************************************************************************* tffsDevFormat - format a flash device for use with TrueFFS** This routine formats a flash device for use with TrueFFS.  It takes two * parameters, a drive number and a pointer to a device format structure. * This structure describes how the volume should be formatted.  The structure * is defined in dosformt.h.  The drive number is assigned in the order that * the socket component for the device was registered.** The format process marks each erase unit with an Erase Unit Header (EUH) and* creates the physical and virtual Block Allocation Maps (BAM) for the device. * The erase units reserved for the "boot-image" are skipped and the first* EUH is placed at number (boot-image length - 1). To write to the boot-image* region, call tffsBootImagePut(). * * WARNING: If any of the erase units in the boot-image * region contains an erase unit header from a previous format call (this can* happen if you reformat a flash device specifying a larger boot region) * TrueFFS fails to mount the device.  To fix this problem, use tffsRawio() to* erase the problem erase units (thus removing the outdated EUH).  ** The macro TFFS_STD_FORMAT_PARAMS defines the default values used for * formatting a flask disk device. If the second argument to this routine * is zero, tffsDevFormat() uses these default values.** RETURNS: OK, or ERROR if it failed.*/STATUS tffsDevFormat     (    int tffsDriveNo,		/* TrueFFS drive number (0 - DRIVES-1) */    int arg			/* pointer to tffsDevFormatParams structure */    )    {    tffsDevFormatParams defaultParams = TFFS_STD_FORMAT_PARAMS;    tffsDevFormatParams *devFormatParams;    IOreq                ioreq;    FLStatus             status;    if (tffsDriveNo >= DRIVES)        return (ERROR);    /* tell dosFs to re-mount volume */      if (tffsBlkDevs[tffsDriveNo] != NULL)        tffsBlkDevs[tffsDriveNo]->tffsBlkdev.bd_readyChanged = TRUE;    if (arg == 0)        devFormatParams = &defaultParams;    else        devFormatParams = (tffsDevFormatParams *) arg;    ioreq.irHandle = tffsDriveNo;    ioreq.irFlags  = devFormatParams->formatFlags;    ioreq.irData   = &(devFormatParams->formatParams);    status = flFormatVolume(&ioreq);    return ((status == flOK) ? OK : ERROR);    }/********************************************************************************* tffsRawio - low level I/O access to flash components** Use the utilities provided by thisroutine with the utmost care. If you use * these routines carelessly, you risk data loss as well as  permanent * physical damage to the flash device.** This routine is a gateway to a series of utilities (listed below). Functions * such as mkbootTffs() and tffsBootImagePut() use these tffsRawio() utilities * to write boot sector information. The functions for physical read, write, and * erase are made available with the intention that they be used on erase units * allocated to the boot-image region by tffsDevFormat(). Using these functions * elsewhere could be dangerous.** The <arg0>, <arg1>, and <arg2> parameters to tffsRawio() are interpreted * differently depending on the function number you specify for <functionNo>. * The drive number is determined by the order in which the socket * components were registered. ** .TS* tab(|);* lf3 lf3 lf3 lf3* l l l l .* Function Name | arg0 | arg1 | arg2* _* TFFS_GET_PHYSICAL_INFO | user buffer address | N/A | N/A* TFFS_PHYSICAL_READ | address to read | byte count | user buffer address* TFFS_PHYSICAL_WRITE | address to write | byte count | user buffer address* TFFS_PHYSICAL_ERASE | first unit | number of units | N/A* TFFS_ABS_READ	| sector number | number of sectors | user buffer address* TFFS_ABS_WRITE | sector number | number of sectors | user buffer address* TFFS_ABS_DELETE | sector number | number of sectors | N/A* TFFS_DEFRAGMENT_VOLUME | number of sectors | user buffer address | N/A* .TE** TFFS_GET_PHYSICAL_INFO writes the flash type, erasable block size, and media* size to the user buffer specified in <arg0>.** TFFS_PHYSICAL_READ reads <arg1> bytes from <arg0> and writes them to * the buffer specified by <arg2>.** TFFS_PHYSICAL_WRITE copies <arg1> bytes from the <arg2> buffer and writes * them to the flash memory location specified by <arg0>.  * This aborts if the volume is already mounted to prevent the versions of * translation data in memory and in flash from going out of synchronization.** TFFS_PHYSICAL_ERASE erases <arg1> erase units, starting at the erase unit* specified in <arg0>.* This aborts if the volume is already mounted to prevent the versions of * translation data in memory and in flash from going out of synchronization.** TFFS_ABS_READ reads <arg1> sectors, starting at sector <arg0>, and writes* them to the user buffer specified in <arg2>.** TFFS_ABS_WRITE takes data from the <arg2> user buffer and writes <arg1> * sectors of it to the flash location starting at sector <arg0>.* * TFFS_ABS_DELETE deletes <arg1> sectors of data starting at sector <arg0>. ** TFFS_DEFRAGMENT_VOLUME calls the defragmentation routine with the minimum* number of sectors to be reclaimed, <arg0>, and writes the actual number * reclaimed in the user buffer by <arg1>. Calling this function through some * low priority task will make writes more deterministic.* No validation is done of the user specified address fields, so the functions * assume they are writable. If the address is invalid, you could see bus errors* or segmentation faults.* * RETURNS: OK, or ERROR if it failed.*/STATUS tffsRawio     (    int tffsDriveNo,		/* TrueFFS drive number (0 - DRIVES-1) */    int functionNo,		/* TrueFFS function code */    int arg0,			/* argument 0 */    int arg1,			/* argument 1 */    int arg2			/* argument 2 */    )    {    IOreq	ioreq;    FLStatus	status;    int		function;    if (tffsDriveNo >= DRIVES)        return (ERROR);    ioreq.irHandle = tffsDriveNo;	/* drive number */    switch (functionNo)	{	case TFFS_GET_PHYSICAL_INFO:	    function = FL_GET_PHYSICAL_INFO;	    ioreq.irData = (char *)arg0; /* address of user buffer to store */	    break;	case TFFS_PHYSICAL_READ:	    function = FL_PHYSICAL_READ;	    ioreq.irAddress = arg0;	/* chip/card address to read/write */	    ioreq.irByteCount = arg1;	/* number of bytes to read/write */	    ioreq.irData = (char *)arg2; /* address of user buffer to r/w */	    break;	case TFFS_PHYSICAL_WRITE:	    function = FL_PHYSICAL_WRITE;	    ioreq.irAddress = arg0;	/* chip/card address to read/write */	    ioreq.irByteCount = arg1;	/* number of bytes to read/write */	    ioreq.irData = (char *)arg2; /* address of user buffer to r/w */	    break;	case TFFS_PHYSICAL_ERASE:	    function = FL_PHYSICAL_ERASE;	    ioreq.irUnitNo = arg0;	/* first unit to erase */	    ioreq.irUnitCount = arg1;	/* number of units to erase */	    break;		case TFFS_ABS_READ:	    function = FL_ABS_READ;	    ioreq.irSectorNo = arg0;	/* sector number to read/write */	    ioreq.irSectorCount = arg1;	/* number of sectors to read/write */	    ioreq.irData = (char *)arg2; /* address of user buffer to r/w */	    break;		case TFFS_ABS_WRITE:	    function = FL_ABS_WRITE;	    ioreq.irSectorNo = arg0;	/* sector number to read/write */	    ioreq.irSectorCount = arg1;	/* number of sectors to read/write */	    ioreq.irData = (char *)arg2; /* address of user buffer to r/w */	    break;		case TFFS_ABS_DELETE:	    function = FL_ABS_DELETE;	    ioreq.irSectorNo = arg0;	/* sector number to delete */	    ioreq.irSectorCount = arg1;	/* number of sectors to delete */	    break;		case TFFS_DEFRAGMENT_VOLUME:	    function = FL_DEFRAGMENT_VOLUME;	    ioreq.irLength = arg0;	/* minimum number of sectors to get */	    break;		default:	    return (ERROR);	}    status = flCall (function, &ioreq);    switch (functionNo)	{	case TFFS_DEFRAGMENT_VOLUME:	    *(int *)arg1 = ioreq.irLength; /* min number of sectors gotten */	    break;	}    return ((status == flOK) ? OK : ERROR);    }#if     (POLLING_INTERVAL > 0)/********************************************************************************* flPollSemCreate - create semaphore for polling task** This routine creates the semaphore used to delay socket polling until* TrueFFS initialization is complete.** RETURNS: flOK, or flNotEnoughMemory if it fails.*/LOCAL FLStatus flPollSemCreate (void)    {    if ((flPollSemId = semBCreate (SEM_Q_PRIORITY, SEM_EMPTY)) == NULL)        return (flNotEnoughMemory);    else        return (flOK);    }#endif /* (POLLING_INTERVAL > 0) */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天堂在线亚洲视频| 免费观看91视频大全| 国产精品一品视频| 8x8x8国产精品| 天堂久久一区二区三区| 91麻豆文化传媒在线观看| 3d动漫精品啪啪一区二区竹菊| 一区二区三区蜜桃| 成人黄色在线看| 欧美国产一区视频在线观看| 国产在线精品一区二区夜色| 欧美成人精品二区三区99精品| 肉肉av福利一精品导航| 欧美亚州韩日在线看免费版国语版| 亚洲图片另类小说| 日本高清不卡一区| 亚洲乱码国产乱码精品精可以看| 国产精品影视天天线| 久久久高清一区二区三区| 国产中文字幕一区| 久久一区二区三区四区| 国产在线精品不卡| 久久综合九色欧美综合狠狠 | 一区二区三区免费看视频| 91丝袜国产在线播放| 国产精品视频一区二区三区不卡| 国产精品一卡二卡在线观看| wwwwww.欧美系列| 五月天婷婷综合| 欧美乱熟臀69xxxxxx| 日韩国产欧美在线观看| 日韩欧美国产三级| 久久99精品久久只有精品| 精品三级av在线| 国内外精品视频| 久久中文字幕电影| 国产精品99久久久久久有的能看| 国产午夜三级一区二区三| 国产精品一品二品| 国产精品乱人伦| 91丨porny丨首页| 亚洲理论在线观看| 678五月天丁香亚洲综合网| 日韩电影一二三区| 精品国产污污免费网站入口 | 爽爽淫人综合网网站| 日韩欧美aaaaaa| 国产美女视频一区| 亚洲人xxxx| 欧美裸体一区二区三区| 久久国产夜色精品鲁鲁99| 国产精品视频九色porn| 91欧美激情一区二区三区成人| 亚洲欧洲精品一区二区三区| 色菇凉天天综合网| 日韩精品电影在线观看| 国产午夜精品久久久久久久| av激情成人网| 亚洲黄色av一区| 精品国产污污免费网站入口| 成人av资源网站| 五月天激情综合| 2024国产精品视频| 99久久99久久综合| 免费观看成人鲁鲁鲁鲁鲁视频| 国产亚洲欧美日韩俺去了| 欧美亚洲综合一区| 九色|91porny| 亚洲欧洲日产国产综合网| 91精品国产综合久久福利软件| 国产在线播放一区| 中文字幕中文字幕一区二区| 在线综合+亚洲+欧美中文字幕| 国产精品伊人色| 午夜久久久影院| 欧美国产综合一区二区| 色综合久久九月婷婷色综合| 老司机精品视频一区二区三区| 国产欧美日韩一区二区三区在线观看| 99riav久久精品riav| 国内一区二区在线| 亚洲国产精品久久久久秋霞影院 | 欧美日本免费一区二区三区| 国产福利一区二区三区视频在线| 亚洲高清一区二区三区| 久久精品男人的天堂| 欧美日韩久久久一区| 成人三级伦理片| 日产国产欧美视频一区精品| 亚洲美女屁股眼交| 久久女同精品一区二区| 色综合久久天天| 国产不卡一区视频| 午夜精品成人在线视频| 亚洲色图在线看| 精品国产乱码久久久久久浪潮| 色呦呦一区二区三区| 国产精品亚洲专一区二区三区 | 九一九一国产精品| 精品国产乱码久久久久久久| 欧美日韩中文精品| 成人高清视频在线观看| 日本三级韩国三级欧美三级| 国产女人aaa级久久久级| 欧美精品xxxxbbbb| 99视频有精品| 免费一区二区视频| 亚洲视频一二三区| 久久精品视频一区二区| 日韩一区二区三区视频| 色综合久久99| 成人免费视频一区| 国产一区二区三区在线观看免费视频| 午夜精品久久久久久久| 久久久国产午夜精品| 欧美刺激脚交jootjob| 欧美日韩在线观看一区二区| 91一区二区在线| 国产成人h网站| 国产伦精品一区二区三区免费 | 精品视频1区2区| 91成人在线精品| www.久久久久久久久| 国产精品77777| 久久精品国产精品亚洲红杏| 中文字幕一区二区三| 日韩视频免费观看高清完整版| av欧美精品.com| 成人网在线免费视频| 国内不卡的二区三区中文字幕 | 精品久久久久久久人人人人传媒| 欧美午夜精品一区| 91免费在线看| 91蜜桃婷婷狠狠久久综合9色| 风间由美中文字幕在线看视频国产欧美| 亚洲成人在线免费| 亚洲天堂2016| 亚洲欧洲中文日韩久久av乱码| 国产精品免费观看视频| 国产精品天天看| 久久嫩草精品久久久精品一| 26uuu欧美| 日韩欧美国产一区二区三区| 日韩一卡二卡三卡| 日韩一卡二卡三卡国产欧美| 欧美日韩精品欧美日韩精品一综合| 色一情一乱一乱一91av| 91在线看国产| 在线观看视频一区| 色菇凉天天综合网| 欧美无砖专区一中文字| 欧美三级日韩在线| 在线中文字幕一区二区| 91精选在线观看| 日韩一二三区视频| 欧美zozo另类异族| 久久精品视频一区二区三区| 精品美女在线播放| 精品国偷自产国产一区| 国产日韩高清在线| 中文字幕一区在线观看| 一区二区在线观看视频| 一个色综合网站| 亚洲国产成人av网| 婷婷开心久久网| 免费观看日韩电影| 经典三级在线一区| 国产一区二区免费视频| 国产成人av资源| 99久久国产免费看| 欧美日韩午夜在线| 日韩一区二区在线观看视频 | 粉嫩欧美一区二区三区高清影视| 国产成人精品一区二区三区网站观看| 成人av动漫网站| 91久久精品一区二区三区| 欧美日本一区二区在线观看| 欧美大片顶级少妇| 久久免费视频一区| 亚洲欧美乱综合| 天堂成人国产精品一区| 久久精品国产久精国产| 风间由美中文字幕在线看视频国产欧美| 国产成人av在线影院| 国产suv一区二区三区88区| 色综合久久久久久久| 欧美日韩亚洲高清一区二区| 亚洲精品一线二线三线| 国产欧美精品一区二区色综合| 亚洲成人高清在线| 国精产品一区一区三区mba桃花| 激情欧美日韩一区二区| 波多野结衣一区二区三区 | 懂色av一区二区夜夜嗨| 色8久久人人97超碰香蕉987| 日韩一区二区三区av| 亚洲欧美激情小说另类| 日本不卡的三区四区五区| 国产精品1024| 欧美日韩中文国产|