-
大小: 4.7MB文件類型: .rar金幣: 2下載: 0 次發(fā)布日期: 2023-09-30
- 語言: 其他
- 標(biāo)簽:
資源簡介
嵌入式FAT文件系統(tǒng)免費(fèi)源碼下載
本版本代碼完全兼容FAT16/FAT32文件系統(tǒng)總共兩種格式,兼容長文件名,
兼容文字編碼GB2312/UNICODE漢字編碼(文件名完全支持中文),
實現(xiàn)了支持子目錄,實現(xiàn)了支持文件的讀取,寫入,刪除,創(chuàng)建等文件系統(tǒng)常用功能。
總之,本文件系統(tǒng)代碼全部使用C代碼編寫,可以移植去各種單片機(jī)平臺上面實現(xiàn)文件系統(tǒng)模塊。
(本代碼為我們的免費(fèi)代碼,用戶可免費(fèi)測試,研究,應(yīng)用。用戶如需用于商業(yè)產(chǎn)品上,
請與作者聯(lián)系,購買許可。
作者的聯(lián)系方式: qq:292942278,E-MAIL:292942278@qq.com

代碼片段和文件信息
/*
+FHDR------------------------------------------------------------------
Copyright?(c)
Tony?Yang?–specialized?in?fat?usb?firmware?development??
Contact:qq?292942278??e-mail:tony_yang123@sina.com.cn
;;;;;;;;;;
Abstract:
$Id:?fat.cv?1.14?2007/05/11?03:00:55?design?Exp?$
-FHDR-------------------------------------------------------------------
*/??????
#include
#include
#include???
#include??
#include
#include“time.h“?????????????????????
//Current?Directory?Entry?
static?struct?Directory_Entry_?Directory_Entry;
//CORE?of?FAT?filesystem
static?struct?core_?CORE[maximum_disks];
//BPB
static?struct?partition_bpb?BPB[maximum_disks];?
//Define?FCBs?for?FileRead/Write??
struct?FileControlBlock?FCB[MaximumFCB];
/*
===============================================================================
函數(shù)
字符串轉(zhuǎn)換為大寫
入口:*string:字符串首地址
出口:SUCC
===============================================================================
*/?
static?u8?UPCASE(u8*?string)?
{?
?while(*string)?
?{?
?if((*string?&?0x80)?&&?((*(string+1))?!=?0))
?{
string++;?
string++;?
continue;
?}
?????if(*string?>=‘a(chǎn)‘?&&?*string?<=?‘z‘)
??????{
?? ???*string?-=?32;
? ???
??????}
?string++;?
???}????
?return(SUCC);
}
/*
===============================================================================
函數(shù)
測試字符串長度
入口:*string:字符串首地址
出口:字符串長度
===============================================================================
*/?
static?u32?LengthofString(u8?*?string)
{?
?u32?i;
?i?=?0;
?while(*string)
??{
????i++;
????string++;
??}
?return(i);
}?
/*
===============================================================================
函數(shù)
連接字符串2到字符串1之后連接后字符串2無變化
入口:*string1:字符串1首地址*string2:字符串2首地址
出口:SUCCFAIL
===============================================================================
*/?
static?u8?concanenateString(u8?*string1u8?*string2)
{
??u8?leni;
??len?=?LengthofString(string1);
??i?=?0;
??while(string2[i])
??{
????string1[len]?=?string2[i];??
????len++;
i++;
??}
??string1[len]?=?0;
??return(SUCC);
}
/*
===============================================================================
函數(shù)
字符串copy
入口:*string1:源字符串首地址;*string2:目標(biāo)字符串首地址
出口:SUCC
===============================================================================
*/?
static?u8?stringcpy(u8?*string1u8?*string2)
{
?while(*string1)?
???{?
?????*string2?=?*string1;
?????string1++;
?????string2++;
???}??
?*string2?=?0;
?return(SUCC);
}
/*
===============================================================================
函數(shù)
字符串比較(不區(qū)分大小寫)
入口:*string1:字符串1首地址;*string2:字符串2首地址
出口:SUCCFAIL
===============================================================================
*/?
static?u8?stringcmp(u8?*string1u8?*string2)
{
?UPCASE(string1);
?UPCASE(string2);??
?while((*string1)?&&?(*string2))?
???{
?????if((*string1
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
????..A.SH.????????76??2017-05-02?16:29??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\Desktop.ini
?????文件?????639879??2014-12-10?00:52??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\K9F1G08U0B.pdf
?????文件?????436224??2017-04-29?15:42??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\NandFlash文件系統(tǒng)CODE的使用說明.doc
?????文件?????496354??2015-06-18?17:50??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\NandFlash管理系統(tǒng)(32BIT).doc
?????文件??????73728??2013-02-20?20:05??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\嵌入式FAT16_32文件系統(tǒng).doc
?????文件????????853??2017-05-02?17:14??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\版本說明.txt
?????文件???????5130??2016-07-04?05:46??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\fat_filesystem.dsp
?????文件????????536??2016-04-22?18:28??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\fat_filesystem.dsw
?????文件?????918528??2017-04-11?07:55??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\fat_filesystem.ncb
?????文件??????53760??2017-04-11?07:55??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\fat_filesystem.opt
?????文件???????1988??2017-04-11?07:51??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\fat_filesystem.plg
?????文件??????30015??2017-04-11?07:46??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\main.C
?????文件??????32768??2015-07-08?08:32??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\~VC728.tmp
?????文件??????20428??2017-04-30?10:22??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\nandflash\nandflash.c
?????文件???????5018??2017-04-30?10:22??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\nandflash\nandflash.h
?????文件??????12946??2016-09-22?09:02??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\include\fat_cfg.h
?????文件?????697857??2011-02-21?14:47??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\include\gb2312_to_unicode_table.h
?????文件???????1744??2017-04-29?15:53??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\include\types.h
?????文件?????????88??2007-03-31?22:25??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\include\CVS\Entries
?????文件?????????28??2007-03-31?22:25??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\include\CVS\Entries.Extra
?????文件?????????32??2007-03-11?18:25??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\include\CVS\Repository
?????文件?????????23??2007-03-11?18:25??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\include\CVS\Root
?????文件????????726??2007-02-17?09:15??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\Flash_Management\ecc_cfg.h
?????文件??????34932??2017-04-29?15:48??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\Flash_Management\flash_management.c
?????文件???????1110??2017-04-29?15:48??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\Flash_Management\flash_management.h
?????文件???????6941??2017-04-29?15:48??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\Flash_Management\yaffs_ecc.c
?????文件???????2057??2017-04-29?15:48??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\Flash_Management\yaffs_ecc.h
?????文件????????115??2007-02-26?22:02??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\Flash_Management\CVS\Entries
?????文件?????????48??2007-02-26?22:02??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\Flash_Management\CVS\Entries.Extra
?????文件?????????41??2007-02-26?22:02??NANDFLASH_文件系統(tǒng)_中頁版(2112字節(jié)per頁)\fat_filesytem_with_nand_driver_for_page_2112_bytes_32bit_ecc\Flash_Management\CVS\Repository
............此處省略79個文件信息
- 上一篇:Pixhawk2原理圖
- 下一篇:Chameleon 算法 實現(xiàn) ppt
評論
共有 條評論