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

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

?? tffsdrv.c

?? This is a source code of VxWorks
?? 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一区二区三区免费野_久草精品视频
一区免费观看视频| 色婷婷综合久久久久中文一区二区| 欧美精品久久天天躁| 亚洲综合丝袜美腿| 欧美精品粉嫩高潮一区二区| 视频一区视频二区中文| 日韩午夜电影av| 国内成人免费视频| 中文字幕一区二区视频| 日本久久一区二区| 捆绑紧缚一区二区三区视频| 国产视频一区在线播放| 欧美综合在线视频| 久久精品99国产精品日本| 国产人成亚洲第一网站在线播放| 91视频免费播放| 免费观看在线色综合| 欧美国产一区二区| 欧美乱熟臀69xxxxxx| 精品一区二区三区免费| 亚洲青青青在线视频| 日韩视频一区在线观看| 成人国产精品免费网站| 亚洲成人av一区| 国产欧美精品在线观看| 精品视频全国免费看| 经典三级一区二区| 亚洲精品国产精华液| 精品黑人一区二区三区久久| 99精品在线观看视频| 日本欧美一区二区在线观看| 18成人在线观看| 精品三级在线看| 一本色道亚洲精品aⅴ| 久久66热偷产精品| 夜夜嗨av一区二区三区中文字幕| 精品国产露脸精彩对白| 在线精品国精品国产尤物884a| 麻豆91精品视频| 亚洲欧美偷拍另类a∨色屁股| 日韩午夜中文字幕| 色老综合老女人久久久| 国产精品99久久久| 日韩黄色一级片| 一区二区免费在线播放| 亚洲国产精品ⅴa在线观看| 91精品国产综合久久久蜜臀图片 | 亚洲精品国产一区二区三区四区在线| 91精品一区二区三区在线观看| 成人午夜短视频| 韩国av一区二区三区四区| 日本视频中文字幕一区二区三区| 亚洲欧美偷拍另类a∨色屁股| 久久久久久久网| 精品国产成人系列| 日韩视频在线观看一区二区| 欧美日韩久久久| 色综合天天狠狠| 91首页免费视频| 99精品国产一区二区三区不卡| 精品午夜久久福利影院| 蜜臀久久99精品久久久画质超高清| 亚洲乱码中文字幕| 日韩理论在线观看| 国产精品妹子av| 欧美国产综合一区二区| 欧美国产精品中文字幕| 欧美成人一级视频| 欧美精品一区二区三区一线天视频| 91精品欧美福利在线观看| 欧美亚洲综合网| 欧美亚洲综合色| 欧美精品乱码久久久久久按摩| 精品视频1区2区3区| 欧美精品欧美精品系列| 欧美一区二区三区视频在线| 欧美日韩高清一区二区三区| 欧美丰满少妇xxxxx高潮对白| 欧美日韩视频一区二区| 欧美日本在线视频| 91精品国产色综合久久 | 欧美老人xxxx18| 3d成人h动漫网站入口| 欧美一级日韩不卡播放免费| 欧美r级在线观看| 国产欧美中文在线| 国产精品第五页| 亚洲综合久久av| 日本欧美在线看| 国产高清成人在线| 99精品久久久久久| 欧美日韩精品免费观看视频| 欧美区在线观看| 欧美tickle裸体挠脚心vk| 久久久亚洲午夜电影| 一区在线观看视频| 亚洲风情在线资源站| 久热成人在线视频| 国产高清精品在线| 在线免费观看成人短视频| 538在线一区二区精品国产| 日韩三级视频中文字幕| 国产欧美一区二区三区网站| 亚洲天堂精品视频| 日韩精品午夜视频| 国产成人av资源| 欧美午夜精品一区二区三区| 欧美精品乱码久久久久久按摩| 日韩欧美国产精品一区| 欧美激情中文不卡| 午夜视频一区二区| 国产一级精品在线| 日本黄色一区二区| 久久综合九色欧美综合狠狠| 中文字幕一区二区在线观看| 婷婷国产v国产偷v亚洲高清| 国产老女人精品毛片久久| 色诱亚洲精品久久久久久| 欧美不卡一区二区三区| 亚洲一区二区视频| 国产一区在线不卡| 91成人网在线| 国产亚洲午夜高清国产拍精品| 亚洲国产欧美日韩另类综合| 激情偷乱视频一区二区三区| 欧洲av在线精品| 亚洲国产精华液网站w| 日本女优在线视频一区二区| av成人免费在线| 欧美精品一区二区久久婷婷| 亚洲黄色小视频| 成人免费毛片片v| 欧美成人精品福利| 亚洲一区视频在线| 国产成人av自拍| 欧美成人伊人久久综合网| 亚洲综合一区在线| 成人激情动漫在线观看| 久久综合色综合88| 三级成人在线视频| 欧美主播一区二区三区| 国产精品国产三级国产有无不卡 | 亚洲激情第一区| 国产老肥熟一区二区三区| 91精品婷婷国产综合久久| 亚洲欧美激情在线| 粉嫩高潮美女一区二区三区| 欧美成人精品福利| 日韩电影一区二区三区四区| 欧美午夜一区二区| 一区二区三区四区激情| 99精品一区二区三区| 国产精品麻豆欧美日韩ww| 国产成人8x视频一区二区| 精品国产伦一区二区三区免费| 日韩在线一二三区| 欧美揉bbbbb揉bbbbb| 洋洋av久久久久久久一区| 日本精品一级二级| 一区二区三区丝袜| 欧美在线不卡视频| 一区二区三区免费在线观看| 91亚洲永久精品| 亚洲色图在线视频| 91福利精品视频| 亚洲一区二区三区四区中文字幕| 色老汉av一区二区三区| 亚洲精品欧美二区三区中文字幕| av电影在线观看完整版一区二区| 国产精品午夜免费| 成人性生交大片免费| 中文字幕一区二区三区不卡在线| 波波电影院一区二区三区| 中文字幕在线视频一区| 99热这里都是精品| 亚洲精品乱码久久久久久日本蜜臀| 99久久久免费精品国产一区二区| 亚洲免费在线播放| 欧美日韩中文字幕精品| 视频精品一区二区| 精品久久久久99| 成人av先锋影音| 亚洲国产视频直播| 欧美大尺度电影在线| 国产一区二区福利| 国产精品久久久久桃色tv| 色偷偷成人一区二区三区91| 亚洲国产成人va在线观看天堂| 欧美一区二区日韩一区二区| 久久99热国产| 中文字幕亚洲不卡| 欧美肥妇毛茸茸| 国产美女一区二区三区| 国产精品国产三级国产三级人妇| 91高清视频在线| 国内一区二区视频| 一区二区三区免费观看| 欧美r级在线观看| 91免费国产视频网站| 日韩电影免费在线|