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

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

?? nandfs.c

?? 基于EP7312的MP3播放器源代碼,包括MCU和PC端代碼.
?? C
?? 第 1 頁 / 共 3 頁
字號:
                //                ulCount += 512;            }            //            // De-select the on-board NAND FLASH.            //            pulGPIO[HwPortABCD >> 2] |= HwPortABCD_NAND1_CS;            //            // Success.            //            return(ulCount);        }        //        // Write data to the currently opened file.        //        case IOCTL_FS_WRITE:        {            tNANDFile *pFile;            unsigned long ulCount;            //            // Get a pointer to the file structure.            //            pFile = (tNANDFile *)ulInstance;            //            // Make sure that the current file pointer is a multiple of 512.            //            if(pFile->ulFilePos & 511)            {                return(0);            }            //            // Select the on-board NAND FLASH.            //            pulGPIO[HwPortABCD >> 2] &= ~HwPortABCD_NAND1_CS;            //            // Write pages to the on-board NAND FLASH.            //            ulCount = 0;            while(ulParam2)            {                //                // Stop writing data if we've reached the end of the on-board                // NAND FLASH.                //                if(pFile->ulPage ==                   (sNAND.usNumBlocks * sNAND.ucPagesPerBlock))                {                    break;                }                //                // If this is the first page of a block, then erase the block.                //                if((pFile->ulPage & (sNAND.ucPagesPerBlock - 1)) == 0)                {                    NANDWaitTilNotBusy(HwNANDAddress);                    (sNAND.pfnErase)(HwNANDAddress,                                     pFile->ulPage / sNAND.ucPagesPerBlock);                }                //                // Write the next page to the on-board NAND FLASH.                //                NANDWaitTilNotBusy(HwNANDAddress);                (sNAND.pfnWrite)(HwNANDAddress, NextPage(&(pFile->ulPage)),                                 (unsigned char *)ulParam1, pucScratch);                //                // See if this was a partial sector at the end of the write.                //                if(ulParam2 < 512)                {                    //                    // Increment the file length.                    //                    sNAND.ulFileLength += ulParam2;                    //                    // Increment the count of the bytes written.                    //                    ulCount += ulParam2;                    //                    // There are no byte remaining to be written.                    //                    ulParam2 = 0;                }                //                // Otherwise, it was a full sector.                //                else                {                    //                    // Increment the write buffer pointer.                    //                    ulParam1 += 512;                    //                    // Decrement the count of bytes to write.                    //                    ulParam2 -= 512;                    //                    // Increment the file length.                    //                    sNAND.ulFileLength += 512;                    //                    // Increment the count of the bytes written.                    //                    ulCount += 512;                }            }            //            // De-select the on-board NAND FLASH.            //            pulGPIO[HwPortABCD >> 2] |= HwPortABCD_NAND1_CS;            //            // Success.            //            return(ulCount);        }        //        // Seek to the specified position in the currently opened file.        //        case IOCTL_FS_SEEK:        {            tNANDFile *pFile;            unsigned long ulCount;            //            // Make sure that the seek position is a multiple of 512.            //            if(ulParam1 & 511)            {                return(0);            }            //            // Make sure that the seek position is within the file.            //            if(ulParam1 > sNAND.ulFileLength)            {                return(0);            }            //            // Get a pointer to the file structure.            //            pFile = (tNANDFile *)ulInstance;            //            // Set the file position to the seek position.            //            pFile->ulFilePos = ulParam1;            //            // Compute the page number for this position within the file.            //            pFile->ulPage = sNAND.ucPagesPerBlock + 1 + (ulParam1 / 512);            //            // Skip the bad blocks in the NAND FLASH.  This works by adding a            // block's worth of offset when the offset is greater than the            // offset of a bad block.            //            for(ulCount = 0; ulCount < sNAND.usNumBadBlocks; ulCount++)            {                //                // Does this page start at or after a bad block?                //                if((pFile->ulPage / sNAND.ucPagesPerBlock) >=                   sNAND.usBadBlocks[ulCount])                {                    //                    // It does, so skip a block's worth of data.                    //                    pFile->ulPage += sNAND.ucPagesPerBlock;                }            }            //            // Success.            //            return(1);        }        //        // Return the current read/write pointer of the file.        //        case IOCTL_FS_TELL:        {            tNANDFile *pFile;            //            // Get a pointer to the file structure.            //            pFile = (tNANDFile *)ulInstance;            //            // Return the current read/write pointer.            //            return(pFile->ulFilePos);        }        //        // Return the length of the currently opened file.        //        case IOCTL_FS_LENGTH:        {            //            // Return the file length.            //            return(sNAND.ulFileLength);        }        //        // Close the currently opened file.        //        case IOCTL_FS_CLOSE:        {            tNANDFile *pFile;            //            // Get a pointer to the file structure.            //            pFile = (tNANDFile *)ulInstance;            //            // See if we were writing this file.            //            if(ulParam1 & FS_OPEN_WRITE)            {                //                // Select the on-board NAND FLASH.                //                pulGPIO[HwPortABCD >> 2] &= ~HwPortABCD_NAND1_CS;                //                // Go back to the first page of the file.                //                pFile->ulPage = sNAND.ucPagesPerBlock - 1;                NextPage(&(pFile->ulPage));                //                // Write the first page of the file.                //                NANDWaitTilNotBusy(HwNANDAddress);                (sNAND.pfnWrite)(HwNANDAddress, pFile->ulPage,                                 (unsigned char *)&(sNAND.ulFileLength),                                 pucScratch);                //                // Make sure that the on-board NAND FLASH is done programming                // the page before we continue.                //                NANDWaitTilNotBusy(HwNANDAddress);                //                // De-select the on-board NAND FLASH.                //                pulGPIO[HwPortABCD >> 2] |= HwPortABCD_NAND1_CS;            }            //            // Success.            //            return(1);        }        //        // Deletes the specified file from the file system.  We do not support        // multiple files, so we also don't care what the file name is...any        // delete will work for the single file in the file system.        //        // We also use this to handle formatting the file system, since a        // format will simply blast the singe file.        //        case IOCTL_FS_DELETE:        case IOCTL_FS_FORMAT:        {            unsigned long ulPage;            //            // Select the on-board NAND FLASH.            //            pulGPIO[HwPortABCD >> 2] &= ~HwPortABCD_NAND1_CS;            //            // Go to the first page of the file.            //            ulPage = sNAND.ucPagesPerBlock - 1;            NextPage(&ulPage);            //            // Erase the first block of the file.            //            NANDWaitTilNotBusy(HwNANDAddress);            (sNAND.pfnErase)(HwNANDAddress, ulPage / sNAND.ucPagesPerBlock);            //            // Set the file length to zero.            //            sNAND.ulFileLength = 0;            //            // Write a file length of zero.            //            NANDWaitTilNotBusy(HwNANDAddress);            (sNAND.pfnWrite)(HwNANDAddress, ulPage,                             (unsigned char *)&(sNAND.ulFileLength),                             pucScratch);            //            // Make sure that the on-board NAND FLASH is done programming the            // page before we continue.            //            NANDWaitTilNotBusy(HwNANDAddress);            //            // De-select the on-board NAND FLASH.            //            pulGPIO[HwPortABCD >> 2] |= HwPortABCD_NAND1_CS;            //            // Success.            //            return(1);        }        //        // Opens the directory of the file system.        //        case IOCTL_FS_OPENDIR:        {            tNANDDir *pDir;            //            // Get a pointer to the directory structure.            //            pDir = (tNANDDir *)ulInstance;            //            // Indicate that the next IOCTL_FS_READDIR will be the first.            //            if(sNAND.ulFileLength)            {                pDir->bIsFirstDirEntry = 1;            }            else            {                pDir->bIsFirstDirEntry = 0;            }            //            // Success.            //            return(1);        }        //        // Read the next directory entry from the file system.        //        case IOCTL_FS_READDIR:        {            tNANDDir *pDir;            //            // Get a pointer to the directory structure.            //            pDir = (tNANDDir *)ulInstance;            //            // If this is not the first IOCTL_FS_READDIR, then return a failure            // since we only support a single file in the on-board NAND FLASH.            //            if(!pDir->bIsFirstDirEntry)            {                return(0);            }            //            // Fill in the file name with a bogus name.            //            memcpy((void *)ulParam1, "n\0a\0n\0d\0.\0d\0a\0t\0\0", 18);            //            // Indicate that the next IOCTL_FS_READDIR will not be the first.            //            pDir->bIsFirstDirEntry = 0;            //            // Success.            //            return(1);        }        //        // Close the directory of the file system.        //        case IOCTL_FS_CLOSEDIR:        {            //            // Success.            //            return(1);        }        //        // Create a new directory in the file system.        //        case IOCTL_FS_MAKEDIR:        {            //            // We do not support subdirectories, so return a failure.            //            return(0);        }        //        // Remove the specified directory from the file system.        //        case IOCTL_FS_REMOVEDIR:        {            //            // We do not support subdirectories, so return a failure.            //            return(0);        }        //        // Determine the total capacity of the file system.        //        case IOCTL_FS_TOTALSPACE:        {            //            // The total capacity of the file system is the number of good            // blocks minus 1, times the number of pages per block, minus 1,            // time 512 bytes per page.            //            return((((sNAND.usNumBlocks - sNAND.usNumBadBlocks - 1) *                     sNAND.ucPagesPerBlock) - 1) * 512);        }        //        // Determine the available capacity in the file system.        //        case IOCTL_FS_FREESPACE:        {            //            // The free space is the total capacity minus the space used by our            // one file.            //            return(((((sNAND.usNumBlocks - sNAND.usNumBadBlocks - 1) *                      sNAND.ucPagesPerBlock) - 1) * 512) - sNAND.ulFileLength);        }        //        // We should never get here, but just in case...        //        default:        {            //            // Return a failure.            //            return(0);        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产女主播一区| 久久激五月天综合精品| 午夜久久久久久电影| 国模套图日韩精品一区二区 | 国产精品久久福利| 五月综合激情日本mⅴ| 成人app在线| 久久久www成人免费无遮挡大片| 一区二区三区在线免费视频| 国产一区二区伦理片| 91精品欧美久久久久久动漫| 亚洲精品中文字幕乱码三区| 国产黄色91视频| 日韩午夜av一区| 亚洲综合免费观看高清在线观看| 国产xxx精品视频大全| 日韩一区二区三区视频在线| 亚洲综合色区另类av| 91丝袜美女网| 最近中文字幕一区二区三区| 国产乱色国产精品免费视频| 日韩无一区二区| 久久99在线观看| 欧美大尺度电影在线| 日本v片在线高清不卡在线观看| 在线视频你懂得一区| 亚洲猫色日本管| 色香蕉久久蜜桃| 一区二区三区.www| 欧美午夜视频网站| 亚洲国产精品久久艾草纯爱 | 亚洲乱码国产乱码精品精小说| 国产成人午夜精品影院观看视频 | 在线免费观看视频一区| 综合av第一页| 色婷婷av一区二区| 亚洲另类色综合网站| 91高清在线观看| 午夜久久久久久久久| 欧美一级高清片在线观看| 日韩精品成人一区二区三区| 91精品国产色综合久久ai换脸 | 一本色道a无线码一区v| 亚洲免费观看视频| 欧美综合色免费| 免费看欧美美女黄的网站| 日韩丝袜情趣美女图片| 国产麻豆视频精品| 成人免费一区二区三区视频| 日本精品免费观看高清观看| 水野朝阳av一区二区三区| 欧美一区二区三区在线| 国产精品综合二区| 亚洲天堂精品视频| 久久精品人人爽人人爽| 国产精品国产精品国产专区不蜜| 欧美在线影院一区二区| 国产精品色呦呦| 久久婷婷成人综合色| 欧美电影免费提供在线观看| 99国产精品视频免费观看| 久久精品99久久久| 五月天久久比比资源色| 亚洲永久精品大片| 亚洲激情在线播放| 日韩毛片高清在线播放| 国产精品午夜电影| 国产欧美一区二区三区在线看蜜臀| 日韩午夜激情av| 日韩欧美在线观看一区二区三区| 欧美剧情片在线观看| 在线观看精品一区| 日本高清不卡在线观看| 99re这里都是精品| 91在线精品秘密一区二区| 成人国产一区二区三区精品| 懂色av中文一区二区三区| 国产精品一品二品| 国产成人免费视频精品含羞草妖精 | 欧美一区二区三区免费在线看| 日本高清成人免费播放| 欧美羞羞免费网站| 欧美日韩国产综合一区二区| 欧美日韩午夜在线| 91麻豆精品国产自产在线观看一区 | 亚洲欧洲另类国产综合| 中国色在线观看另类| 国产精品视频看| 亚洲欧美另类小说| 一区二区国产视频| 亚洲午夜久久久| 日韩精品视频网| 精品一区二区三区在线观看国产| 极品销魂美女一区二区三区| 国产一区二区三区高清播放| 国产在线乱码一区二区三区| 国产成人精品综合在线观看 | 91黄色激情网站| 欧美三级电影在线观看| 3d成人动漫网站| 国产欧美综合在线| 亚洲欧美日韩国产手机在线| 无码av中文一区二区三区桃花岛| 久久精品免费看| 国产福利精品导航| 91久久奴性调教| 欧美一级日韩不卡播放免费| 日本一区二区三区久久久久久久久不 | 久久综合精品国产一区二区三区 | 天天综合色天天综合| 久久超碰97人人做人人爱| 国产成人综合亚洲网站| 99久久婷婷国产综合精品| 欧美三级在线看| 久久久久久免费网| 一区二区三区不卡视频在线观看 | 99久久99久久免费精品蜜臀| 欧美精品欧美精品系列| 久久九九国产精品| 亚洲影视资源网| 国产成人在线观看| 欧美三级欧美一级| 国产精品毛片大码女人| 视频在线观看91| 91一区二区三区在线播放| 欧美一级生活片| 亚洲已满18点击进入久久| 国产福利精品导航| 日韩一区二区三区在线视频| 国产精品久久久久久久裸模| 七七婷婷婷婷精品国产| 97久久超碰精品国产| 国产亚洲欧美色| 蜜臀av性久久久久蜜臀aⅴ流畅| av不卡免费电影| 26uuu色噜噜精品一区| 亚洲一区在线观看网站| 成人深夜福利app| 精品久久久久久久久久久久包黑料| 夜夜亚洲天天久久| 国产成人免费视频网站高清观看视频| 6080午夜不卡| 一区二区三区中文字幕电影| 国产成人精品影院| 日韩视频国产视频| 亚洲va欧美va人人爽| 91老司机福利 在线| 亚洲国产精品ⅴa在线观看| 免费高清成人在线| 欧美福利视频导航| 亚洲精品第1页| 91色视频在线| 亚洲私人黄色宅男| 99久久er热在这里只有精品15| 国产喂奶挤奶一区二区三区| 久久不见久久见免费视频1| 欧美巨大另类极品videosbest| 一区二区三区 在线观看视频| 99久久精品国产毛片| 欧美激情一区二区三区四区 | 激情综合色丁香一区二区| 欧美久久久一区| 同产精品九九九| 欧美日韩视频不卡| 午夜欧美一区二区三区在线播放| 欧洲一区在线观看| 亚洲精品成人精品456| 一本大道av伊人久久综合| 亚洲黄色片在线观看| 色菇凉天天综合网| 亚洲国产一区在线观看| 欧美色图片你懂的| 午夜精品久久久久久久久久| 亚洲精品在线三区| 精品一区二区精品| 久久久久国产精品人| 成人一区在线观看| 一区二区中文视频| 色狠狠一区二区三区香蕉| 亚洲一区二区在线观看视频| 欧美三片在线视频观看| 日本va欧美va欧美va精品| 日韩三级.com| 国产成人精品亚洲777人妖| 国产精品情趣视频| 91福利国产成人精品照片| 视频一区二区国产| 精品福利视频一区二区三区| 欧美亚洲综合另类| 日本亚洲三级在线| 久久久久一区二区三区四区| 成人爱爱电影网址| 亚洲午夜久久久久久久久电影网| 日韩一区二区三| 国产.精品.日韩.另类.中文.在线.播放 | 亚洲欧洲日产国码二区| 欧美日韩一卡二卡| 国产成人精品在线看| 亚洲一区自拍偷拍| 久久精品免视看|