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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? fat.c

?? filesystem for at91sam9263ek,編輯器為keil for arm mdk
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/*****************************************************************************\*              efs - General purpose Embedded Filesystem library              **          --------------------- -----------------------------------          **                                                                             ** Filename : fat.c                                                            ** Description : This file contains all the functions dealing with the FAT     **               in a Microsoft FAT filesystem. It belongs under fs.c          **                                                                             ** This program is free software; you can redistribute it and/or               ** modify it under the terms of the GNU General Public License                 ** as published by the Free Software Foundation; version 2                     ** of the License.                                                             *                                                                              ** This program is distributed in the hope that it will be useful,             ** but WITHOUT ANY WARRANTY; without even the implied warranty of              ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               ** GNU General Public License for more details.                                **                                                                             ** As a special exception, if other files instantiate templates or             ** use macros or inline functions from this file, or you compile this          ** file and link it with other works to produce a work based on this file,     ** this file does not by itself cause the resulting work to be covered         ** by the GNU General Public License. However the source code for this         ** file must still be made available in accordance with section (3) of         ** the GNU General Public License.                                             **                                                                             ** This exception does not invalidate any other reasons why a work based       ** on this file might be covered by the GNU General Public License.            **                                                                             **                                                    (c)2006 Lennart Yseboodt **                                                    (c)2006 Michael De Nil   *\*****************************************************************************//*****************************************************************************/#include "fs.h"/*****************************************************************************//* ****************************************************************************   * unsigned long fat_getSectorAddressFatEntry(FileSystem *fs,unsigned long cluster_addr) * Description: Returns the sectornumber that holds the fat entry for cluster cluster_addr. * This works for all FAT types. * Return value: Sectornumber, or 0. Warning, no boundary check.*/euint32 fat_getSectorAddressFatEntry(FileSystem *fs,euint32 cluster_addr){ 	euint32 base = fs->volumeId.ReservedSectorCount,res;		switch(fs->type){		case FAT12:			res=(cluster_addr*3/1024);			if(res>=fs->FatSectorCount){				return(0);			}else{				return(base+res);			}			break;		case FAT16:			res=cluster_addr/256;			if(res>=fs->FatSectorCount){				return(0);			}else{				return(base+res);			}			break;		case FAT32:			res=cluster_addr/128;			if(res>=fs->FatSectorCount){				return(0);			}else{				return(base+res);			}			break; 	}	return(0);}/*****************************************************************************/ /* ****************************************************************************   * unsigned long fat_getNextClusterAddress(FileSystem *fs,unsigned long cluster_addr * Description: This function loads the sector of the fat which contains the entry * for cluster_addr. It then fetches and (if required) calculates it's value. * This value is the EoC marker -or- the number of the next cluster in the chain. * Return value: Clusternumber or EoC*/euint32 fat_getNextClusterAddress(FileSystem *fs,euint32 cluster_addr,euint16 *linear){	euint8 *buf; 	euint8 hb,lb;	euint16 offset;	euint32 sector;	euint32 nextcluster=0;		sector=fat_getSectorAddressFatEntry(fs,cluster_addr);	if( (fs->FatSectorCount <= (sector-fs->volumeId.ReservedSectorCount)) || sector==0 )	{		return(0);	}		buf=part_getSect(fs->part,sector,IOM_MODE_READONLY);			switch(fs->type)	{		case FAT12:			offset = ((cluster_addr%1024)*3/2)%512;			hb = buf[offset];			if(offset == 511){				part_relSect(fs->part,buf);				buf=part_getSect(fs->part,sector+1,IOM_MODE_READONLY);				lb = buf[0];			}else{				lb = buf[offset + 1];			}			if(cluster_addr%2==0){				nextcluster = ( ((lb&0x0F)<<8) + (hb) );			}else{				nextcluster = ( (lb<<4) + (hb>>4) );			}			break;		case FAT16:			offset=cluster_addr%256;			nextcluster = *((euint16 *)buf + offset);			break;		case FAT32:			offset=cluster_addr%128;			nextcluster = *((euint32 *)buf + offset);			break;	}		part_relSect(fs->part,buf);		return(nextcluster);}/*****************************************************************************/ /* ****************************************************************************   * void fat_setNextClusterAddress(FileSystem *fs,unsigned long cluster_addr,unsigned long next_cluster_addr) * Description: This function makes an entry in the fattable for cluster_addr. The value it puts there * is next_cluster_addr. */void fat_setNextClusterAddress(FileSystem *fs,euint32 cluster_addr,euint32 next_cluster_addr){	euint8 *buf,*buf2; 	euint16 offset;	euint32 sector;		sector=fat_getSectorAddressFatEntry(fs,cluster_addr);		if(( fs->FatSectorCount <= (sector - fs->volumeId.ReservedSectorCount )||(sector==0))){	    DBG((TXT("HARDERROR:::fat_getNextClusterAddress READ PAST FAT BOUNDARY\n")));	    return;	}		buf=part_getSect(fs->part,sector,IOM_MODE_READWRITE);			switch(fs->type){		case FAT12:			offset = ((cluster_addr%1024)*3/2)%512;			if(offset == 511){				if(cluster_addr%2==0){					buf[offset]=next_cluster_addr&0xFF;				}else{					buf[offset]=(buf[offset]&0xF)+((next_cluster_addr<<4)&0xF0);				}				buf2=part_getSect(fs->part,fat_getSectorAddressFatEntry(fs,cluster_addr)+1,IOM_MODE_READWRITE);				if(cluster_addr%2==0){					buf2[0]=(buf2[0]&0xF0)+((next_cluster_addr>>8)&0xF);				}else{					buf2[0]=(next_cluster_addr>>4)&0xFF;				}				part_relSect(fs->part,buf2);			}else{				if(cluster_addr%2==0){					buf[offset]=next_cluster_addr&0xFF;					buf[offset+1]=(buf[offset+1]&0xF0)+((next_cluster_addr>>8)&0xF);				}else{					buf[offset]=(buf[offset]&0xF)+((next_cluster_addr<<4)&0xF0);					buf[offset+1]=(next_cluster_addr>>4)&0xFF;				}			}			part_relSect(fs->part,buf);			break;		case FAT16:			offset=cluster_addr%256;			*((euint16*)buf+offset)=next_cluster_addr;			part_relSect(fs->part,buf);			break;		case FAT32:			offset=cluster_addr%128;			*((euint32*)buf+offset)=next_cluster_addr;			part_relSect(fs->part,buf);			break;	}	}/*****************************************************************************/ /* ****************************************************************************   * short fat_isEocMarker(FileSystem *fs,unsigned long fat_entry) * Description: Checks if a certain value is the EoC marker for the filesystem * noted in fs->type. * Return value: Returns 0 when it is the EoC marker, and 1 otherwise.*/eint16 fat_isEocMarker(FileSystem *fs,euint32 fat_entry){	switch(fs->type){		case FAT12:			if(fat_entry<0xFF8){				return(0);			}			break;		case FAT16:			if(fat_entry<0xFFF8){				return(0);			}			break;		case FAT32:			if((fat_entry&0x0FFFFFFF)<0xFFFFFF8){				return(0);			}			break;	}	return(1);}/*****************************************************************************/ /* ****************************************************************************   * unsigned long fat_giveEocMarker(FileSystem *fs) * Description: Returns an EoC markernumber valid for the filesystem noted in * fs->type. * Note, for FAT32, the upper 4 bits are set to zero, although they should be un * touched according to MicroSoft specifications. I didn't care. * Return value: The EoC marker cast to an ulong.*/euint32 fat_giveEocMarker(FileSystem *fs){	switch(fs->type)	{		case FAT12:			return(0xFFF);			break;		case FAT16:			return(0xFFFF);			break;		case FAT32:			return(0x0FFFFFFF);			break;	}	return(0);}/*****************************************************************************/ /* ****************************************************************************   * euint32 fat_getNextClusterAddressWBuf(FileSystem *fs,euint32 cluster_addr, euint8* buf) * Description: This function retrieves the contents of a FAT field. It does not fetch * it's own buffer, it is given as a parameter. (ioman makes this function rather obsolete) * Only in the case of a FAT12 crosssector data entry a sector is retrieved here. * Return value: The value of the clusterfield is returned.*/euint32 fat_getNextClusterAddressWBuf(FileSystem *fs,euint32 cluster_addr, euint8* buf){	euint8  *buf2; /* For FAT12 fallover only */	euint8 hb,lb;	euint16 offset;	euint32 nextcluster=0;		switch(fs->type)	{		case FAT12:			offset = ((cluster_addr%1024)*3/2)%512;			hb = buf[offset];			if(offset == 511){				buf2=part_getSect(fs->part,fat_getSectorAddressFatEntry(fs,cluster_addr)+1,IOM_MODE_READONLY);				lb = buf2[0];				part_relSect(fs->part,buf2);			}else{				lb = buf[offset + 1];			}			if(cluster_addr%2==0){				nextcluster = ( ((lb&0x0F)<<8) + (hb) );			}else{

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲免费观看高清完整版在线 | 久久精品在这里| 日韩经典一区二区| 成人ar影院免费观看视频| 欧美探花视频资源| 亚洲一区二区精品久久av| 在线观看不卡视频| 天堂蜜桃91精品| 精品理论电影在线| 国产福利一区二区三区视频| 国产精品三级视频| 色婷婷综合久久久中文字幕| 亚洲国产精品欧美一二99| 中文字幕日韩av资源站| 99久久久久免费精品国产 | 欧美国产禁国产网站cc| 成人av在线资源| 亚洲午夜精品久久久久久久久| 欧美日韩高清影院| 国产精品996| 一区二区不卡在线播放| 91精品黄色片免费大全| 国产精品99久久久久久有的能看| 一区在线中文字幕| 91 com成人网| 豆国产96在线|亚洲| 亚洲午夜电影网| 精品91自产拍在线观看一区| 成人黄色电影在线 | 欧美午夜精品久久久久久超碰| 日本美女一区二区| 欧美国产精品久久| 欧美丰满嫩嫩电影| 成人av网址在线观看| 亚洲第一电影网| 国产免费成人在线视频| 精品视频一区 二区 三区| 国产一区二区主播在线| 一区二区三区日韩欧美| 久久你懂得1024| 欧美三区在线观看| 风间由美一区二区av101| 视频一区中文字幕国产| 国产精品久久久久9999吃药| 日韩一卡二卡三卡| 一本久久a久久精品亚洲| 国产老肥熟一区二区三区| 亚洲国产成人av网| 国产精品久久久久久久久久免费看 | 91精品国产一区二区人妖| 成人性生交大片免费看中文| 日本中文字幕一区| 亚洲国产综合在线| 1区2区3区欧美| 久久久99精品久久| 日韩一级黄色大片| 欧美色手机在线观看| www.日韩av| 国产一区二区女| 免费观看91视频大全| 亚洲第一福利一区| 一区2区3区在线看| 亚洲欧美另类久久久精品 | 国产mv日韩mv欧美| 91国偷自产一区二区三区观看| 亚洲欧洲一区二区在线播放| 成人免费视频播放| 3751色影院一区二区三区| 亚洲自拍偷拍麻豆| 中文字幕一区二区三区在线观看| 欧美草草影院在线视频| 欧美精品高清视频| 欧美日韩国产高清一区| 欧美欧美欧美欧美首页| 欧美精品久久天天躁| 欧美日韩一区不卡| 欧美日韩视频第一区| 欧美三级中文字幕在线观看| 欧美三级电影在线观看| 在线观看国产精品网站| 欧美三级在线视频| 精品视频在线视频| 正在播放亚洲一区| 日韩一级黄色大片| 久久亚洲影视婷婷| 久久人人超碰精品| 国产欧美va欧美不卡在线| 亚洲国产精品成人久久综合一区| 国产精品久久久久久亚洲毛片| 欧美午夜精品久久久| 精品久久99ma| 久久视频一区二区| 久久久国产午夜精品| 国产午夜精品一区二区三区视频| 国产性做久久久久久| 国产精品二区一区二区aⅴ污介绍| 国产婷婷色一区二区三区四区| 国产精品免费久久| 亚洲日本电影在线| 天天色天天操综合| 久久电影网站中文字幕| 国产成人av电影在线| 91麻豆高清视频| 欧美群妇大交群中文字幕| 欧美一区二区精品| 日本一区二区三区四区| 亚洲综合精品自拍| 久久电影网电视剧免费观看| 国产成人精品一区二| 色八戒一区二区三区| 91精品国产91热久久久做人人| 2023国产精品| 亚洲综合丝袜美腿| 精品一区二区三区在线视频| 成人国产免费视频| 欧美日韩日日夜夜| 久久久国产精品午夜一区ai换脸| 玉足女爽爽91| 精品一区二区三区久久| 91视频在线观看免费| 在线成人小视频| 中文在线一区二区| 日韩激情中文字幕| www.成人网.com| 欧美一区日韩一区| 亚洲欧洲av另类| 卡一卡二国产精品| 欧美亚洲图片小说| 国产婷婷色一区二区三区四区| 亚洲国产一区二区三区| 国产成人精品三级| 欧美日韩国产综合久久| 国产精品免费久久久久| 麻豆国产精品视频| 欧美伊人久久久久久久久影院 | 99久久免费国产| 精品99一区二区三区| 午夜欧美大尺度福利影院在线看| 国产成人av电影在线播放| 51精品秘密在线观看| 日韩一区欧美一区| 国产精品一区二区男女羞羞无遮挡| 在线视频中文字幕一区二区| 国产色爱av资源综合区| 日本vs亚洲vs韩国一区三区| 91在线视频网址| 久久久亚洲精品一区二区三区| 天天爽夜夜爽夜夜爽精品视频| 91久久国产最好的精华液| 中文字幕 久热精品 视频在线| 国内久久婷婷综合| 欧美变态tickling挠脚心| 午夜精品一区二区三区电影天堂| 91蝌蚪porny成人天涯| 国产欧美日本一区二区三区| 韩国一区二区三区| 日韩美一区二区三区| 五月激情综合网| 欧美日韩1234| 午夜免费欧美电影| 欧美色图第一页| 亚洲妇女屁股眼交7| 一本色道久久综合亚洲精品按摩| 一区精品在线播放| 99久久99久久精品国产片果冻| 国产偷国产偷精品高清尤物| 国产高清不卡二三区| 久久久五月婷婷| 国产一区美女在线| 国产日韩精品一区二区浪潮av| 韩国成人福利片在线播放| 精品国产伦一区二区三区免费| 蜜桃久久久久久| 欧美大片一区二区| 国产一级精品在线| 久久久综合九色合综国产精品| 国产在线精品免费| 国产亚洲一区二区三区在线观看 | 国产精品一区二区久久精品爱涩| 久久久久国色av免费看影院| 国产精品99久久久久久久女警| 欧美激情综合网| 99精品欧美一区二区三区综合在线| 国产精品色哟哟网站| av一区二区三区黑人| 一区二区三区**美女毛片| 欧美体内she精高潮| 日韩电影在线免费看| 精品国产精品一区二区夜夜嗨| 国产精品一区三区| 亚洲图片你懂的| 欧美曰成人黄网| 美女视频网站久久| 久久久国产精华| 在线亚洲免费视频| 蜜桃一区二区三区在线| 欧美国产国产综合| 欧美视频中文字幕| 久久99久久久久久久久久久| 中文字幕电影一区|