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

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

?? ioman.c

?? filesystem for at91sam9263ek,編輯器為keil for arm mdk
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*****************************************************************************\*                     libfat - General purpose FAT library                    **                      ----------------------------------                     **                                                                             ** Filename : ioman.c                                                          ** Description : The IO Manager receives all requests for sectors in a central **               allowing it to make smart decision regarding caching.         **               The IOMAN_NUMBUFFER parameter determines how many sectors     **               ioman can cache. ioman also supports overallocating and       **               backtracking sectors.                                         **                                                                             ** 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 "ioman.h"/*****************************************************************************/esint8 ioman_init(IOManager *ioman, hwInterface *iface, euint8* bufferarea){	ioman->iface=iface;		ioman->bufptr = ioman_getBuffer(ioman,bufferarea);	ioman->numbuf = IOMAN_NUMBUFFER;	ioman->numit  = IOMAN_NUMITERATIONS;		ioman_reset(ioman);	return(0);}/*****************************************************************************/void ioman_reset(IOManager *ioman){	euint16 nb,ni;		memClr(ioman->sector,sizeof(euint32)*ioman->numbuf);	memClr(ioman->status,sizeof(euint8) *ioman->numbuf);	memClr(ioman->usage ,sizeof(euint8) *ioman->numbuf);	memClr(ioman->itptr ,sizeof(euint8) *ioman->numbuf);	ioman_setError(ioman,IOMAN_NOERROR);			for(nb=0;nb<ioman->numbuf;nb++){		for(ni=0;ni<ioman->numit;ni++){			ioman->stack[nb][ni].sector=0;			ioman->stack[nb][ni].status=0;			ioman->stack[nb][ni].usage =0;		}	}}/*****************************************************************************/euint8* ioman_getBuffer(IOManager *ioman,euint8* bufferarea){#ifdef IOMAN_DO_MEMALLOC	return(ioman->cache_mem);#else	return(bufferarea);#endif}/*****************************************************************************/void ioman_setAttr(IOManager *ioman,euint16 bufplace,euint8 attribute,euint8 val){	if(bufplace>=ioman->numbuf){		ioman_setError(ioman,IOMAN_ERR_SETATTROUTOFBOUNDS);		return; /* Out of bounds */	}		if(val){		ioman->status[bufplace]|=1<<attribute;	}else{		ioman->status[bufplace]&=~(1<<attribute);	}}/*****************************************************************************/euint8 ioman_getAttr(IOManager *ioman,euint16 bufplace,euint8 attribute){	if(bufplace>=ioman->numbuf){		ioman_setError(ioman,IOMAN_ERR_GETATTROUTOFBOUNDS);		return(0xFF); /* Out of bounds */	}	return(ioman->status[bufplace]&(1<<attribute));}/*****************************************************************************/euint8 ioman_getUseCnt(IOManager *ioman,euint16 bufplace){	if(bufplace>=ioman->numbuf){		ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);		return(0x00);	}	return(ioman->usage[bufplace]);}/*****************************************************************************/void ioman_incUseCnt(IOManager *ioman,euint16 bufplace){	if(bufplace>=ioman->numbuf){		ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);		return;	}	if(ioman->usage[bufplace]==0xFF)return;	else ioman->usage[bufplace]++;}/*****************************************************************************/void ioman_decUseCnt(IOManager *ioman,euint16 bufplace){	if(bufplace>=ioman->numbuf){		ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);		return;	}	if(ioman->usage[bufplace]==0x0)return;	else ioman->usage[bufplace]--;}/*****************************************************************************/void ioman_resetUseCnt(IOManager *ioman,euint16 bufplace){	if(bufplace>=ioman->numbuf){		ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);		return;	}	ioman->usage[bufplace]=0x00;}/*****************************************************************************/euint8 ioman_getRefCnt(IOManager *ioman,euint16 bufplace){	if(bufplace>=ioman->numbuf){		ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);		return(0x00);	}	return(ioman->reference[bufplace]);}/*****************************************************************************/void ioman_incRefCnt(IOManager *ioman,euint16 bufplace){	if(bufplace>=ioman->numbuf){		ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);		return;	}	if(ioman->reference[bufplace]==0xFF)return;	else ioman->reference[bufplace]++;}/*****************************************************************************/void ioman_decRefCnt(IOManager *ioman,euint16 bufplace){	if(bufplace>=ioman->numbuf){		ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);		return;	}	if(ioman->reference[bufplace]==0x00)return;	else ioman->reference[bufplace]--;}/*****************************************************************************/void ioman_resetRefCnt(IOManager *ioman,euint16 bufplace){	if(bufplace>=ioman->numbuf){		ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);		return;	}	ioman->reference[bufplace]=0x00;}/*****************************************************************************/esint8 ioman_pop(IOManager *ioman,euint16 bufplace){	if(bufplace>=ioman->numbuf){		ioman_setError(ioman,IOMAN_ERR_POPEMPTYSTACK);		return(-1);	}	if(ioman->itptr[bufplace]==0 || ioman->itptr[bufplace]>IOMAN_NUMITERATIONS)return(-1);	ioman->sector[bufplace] = ioman->stack[bufplace][ioman->itptr[bufplace]].sector;	ioman->status[bufplace] = ioman->stack[bufplace][ioman->itptr[bufplace]].status;	ioman->usage[bufplace]  = ioman->stack[bufplace][ioman->itptr[bufplace]].usage; 	ioman->itptr[bufplace]--;	return(0);}/*****************************************************************************/esint8 ioman_push(IOManager *ioman,euint16 bufplace){	if(bufplace>=ioman->numbuf){		ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);		return(-1);	}	if(ioman->itptr[bufplace]>=IOMAN_NUMITERATIONS){		ioman_setError(ioman,IOMAN_ERR_PUSHBEYONDSTACK);			return(-1);	}	ioman->itptr[bufplace]++;	ioman->stack[bufplace][ioman->itptr[bufplace]].sector = ioman->sector[bufplace];	ioman->stack[bufplace][ioman->itptr[bufplace]].status = ioman->status[bufplace];	ioman->stack[bufplace][ioman->itptr[bufplace]].usage  = ioman->usage[bufplace];	return(0);}/*****************************************************************************/euint8* ioman_getPtr(IOManager *ioman,euint16 bufplace){	if(bufplace>=ioman->numbuf){		ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);		return(0);	}	return(ioman->bufptr+bufplace*512);}/*****************************************************************************/esint16 ioman_getBp(IOManager *ioman,euint8* buf){	if(buf<(ioman->bufptr) || buf>=( ioman->bufptr+(ioman->numbuf*512) )){		ioman_setError(ioman,IOMAN_ERR_CACHEPTROUTOFRANGE);		return(-1);	}	return((buf-(ioman->bufptr))/512);}/*****************************************************************************/esint8 ioman_readSector(IOManager *ioman,euint32 address,euint8* buf){	esint8 r;	if(buf==0){		return(-1);	}		r=if_readBuf(ioman->iface,address,buf);		if(r!=0){		ioman_setError(ioman,IOMAN_ERR_READFAIL);		return(-1);	}	return(0);}/*****************************************************************************/esint8 ioman_writeSector(IOManager *ioman, euint32 address, euint8* buf){	esint8 r;	if(buf==0)return(-1);		r=if_writeBuf(ioman->iface,address,buf);	if(r<=0){		ioman_setError(ioman,IOMAN_ERR_WRITEFAIL);		return(-1);	}	return(0);}/*****************************************************************************/void ioman_resetCacheItem(IOManager *ioman,euint16 bufplace){	if(bufplace>=ioman->numbuf){		ioman_setError(ioman,IOMAN_ERR_OPOUTOFBOUNDS);		return;	}	ioman->sector[bufplace]    = 0;	ioman->status[bufplace]    = 0;	ioman->usage[bufplace]     = 0;	ioman->reference[bufplace] = 0;}/*****************************************************************************/esint32 ioman_findSectorInCache(IOManager *ioman, euint32 address){	euint16 c;	

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人av免费网站| 日韩主播视频在线| 成人高清av在线| 欧美韩国日本综合| 92国产精品观看| 亚洲精品老司机| 欧美日韩国产首页在线观看| 日韩影视精彩在线| 久久在线免费观看| 成人美女视频在线观看18| 亚洲欧洲国产日韩| 欧美日韩一区中文字幕| 蜜桃一区二区三区四区| 国产日韩综合av| 一本大道久久a久久精二百| 午夜精品久久久久久久久| 日韩一级黄色片| 国产丶欧美丶日本不卡视频| 亚洲女人****多毛耸耸8| 在线播放亚洲一区| 国产精品一区二区三区四区| 中文字幕一区二区三区av| 欧美日韩国产综合一区二区| 黄色成人免费在线| 亚洲精品国产成人久久av盗摄 | 久久99国产精品免费| 久久视频一区二区| 91同城在线观看| 日韩电影在线观看电影| 中文字幕乱码一区二区免费| 色噜噜偷拍精品综合在线| 免费精品99久久国产综合精品| 久久免费精品国产久精品久久久久 | 激情丁香综合五月| 亚洲精品免费一二三区| 精品国产乱码久久久久久图片| 99久久免费精品| 久久成人精品无人区| 一区精品在线播放| 欧美sm极限捆绑bd| 欧美亚洲国产一区二区三区| 国产成人在线视频播放| 亚洲电影第三页| 日本一区二区动态图| 日韩午夜av电影| 色噜噜夜夜夜综合网| 国产成人99久久亚洲综合精品| 日本不卡一二三| 亚洲尤物视频在线| 自拍偷拍欧美激情| 久久精品一区二区三区不卡| 欧美蜜桃一区二区三区| 91免费国产在线| 粉嫩欧美一区二区三区高清影视| 视频在线观看一区二区三区| 亚洲欧美成人一区二区三区| 国产精品久久久久影院亚瑟 | 亚洲成a人片在线不卡一二三区| 国产欧美精品在线观看| 欧美成人a视频| 欧美日韩国产一二三| 欧美在线免费观看视频| 99视频有精品| 成人app下载| 成人va在线观看| 丁香网亚洲国际| 欧美色中文字幕| 91福利社在线观看| 色综合天天做天天爱| 99久久精品国产导航| 不卡免费追剧大全电视剧网站| 激情欧美日韩一区二区| 久久精品国产亚洲5555| 免费欧美日韩国产三级电影| 视频一区欧美精品| 天堂影院一区二区| 天天射综合影视| 视频一区视频二区中文| 日韩成人一区二区三区在线观看| 香蕉加勒比综合久久| 三级影片在线观看欧美日韩一区二区| 一区二区三区.www| 亚洲蜜桃精久久久久久久| 亚洲精品伦理在线| 亚洲成人综合网站| 日韩电影在线观看一区| 乱一区二区av| 国产传媒日韩欧美成人| 成人免费黄色在线| 色综合视频在线观看| 欧美色图激情小说| 在线综合+亚洲+欧美中文字幕| 日韩欧美在线综合网| 精品88久久久久88久久久| 久久久精品人体av艺术| 国产欧美精品国产国产专区| 中文字幕五月欧美| 亚洲综合丝袜美腿| 免费高清在线一区| 高清不卡在线观看| 91成人在线观看喷潮| 337p亚洲精品色噜噜噜| 精品成人a区在线观看| 中文字幕不卡在线播放| 一区二区日韩电影| 午夜在线成人av| 久久精品免费看| 成人av资源在线| 欧美日韩成人在线一区| 亚洲精品一区二区三区蜜桃下载| 国产午夜精品一区二区三区四区 | 日韩一区二区三区电影在线观看| 日韩一级完整毛片| 日韩美女啊v在线免费观看| 亚洲成人免费视频| 国产麻豆91精品| 99热精品国产| 日韩欧美一级精品久久| 自拍偷拍欧美精品| 黄色资源网久久资源365| 色婷婷一区二区三区四区| 欧美一区二区三区人| 国产精品福利av| 六月丁香综合在线视频| 91丨九色丨尤物| 精品国产91亚洲一区二区三区婷婷| 亚洲欧洲国产日本综合| 老司机午夜精品| 欧美亚洲另类激情小说| 国产精品视频第一区| 奇米一区二区三区| 99久久综合国产精品| 欧美成人精品3d动漫h| 亚洲第一在线综合网站| 丁香一区二区三区| 欧美性猛片xxxx免费看久爱| 精品国产免费一区二区三区香蕉| 亚洲激情欧美激情| 国产成人在线观看免费网站| 欧美日本在线一区| 亚洲区小说区图片区qvod| 国产福利一区二区三区视频| 在线播放欧美女士性生活| 亚洲精品中文在线| 成人性色生活片| 久久你懂得1024| 精品一区二区三区在线播放视频| 欧美亚洲动漫另类| 亚洲欧洲成人自拍| 国产精品一区二区在线播放| 91精品国产综合久久久久久| 亚洲一区二区在线视频| 99久久综合国产精品| 日本一区二区三区四区| 久久99精品一区二区三区 | 欧美电影免费观看完整版| 亚洲18影院在线观看| 色国产综合视频| 亚洲男人的天堂在线观看| av成人老司机| 欧美激情一区在线观看| 欧美日韩mp4| 性感美女久久精品| 欧美色精品在线视频| 亚洲成在人线在线播放| 欧美色综合影院| 天天综合色天天综合色h| 欧美三电影在线| 亚洲午夜久久久久久久久电影网| 91精品办公室少妇高潮对白| 亚洲免费观看高清完整版在线观看| av福利精品导航| 亚洲欧美欧美一区二区三区| 一本到一区二区三区| 亚洲精品成人精品456| 色妹子一区二区| 亚洲国产一二三| 欧美美女黄视频| 麻豆视频观看网址久久| 69堂国产成人免费视频| 免费在线欧美视频| 26uuuu精品一区二区| 从欧美一区二区三区| 中文字幕第一区第二区| 色欧美日韩亚洲| 日产欧产美韩系列久久99| 日韩免费看的电影| 国产乱码精品一区二区三区五月婷 | 国产精品自产自拍| 国产精品午夜在线| 欧美专区在线观看一区| 亚洲最大成人网4388xx| 欧美精品在线观看一区二区| 美女看a上一区| 欧美韩日一区二区三区| 欧美自拍偷拍午夜视频| 乱一区二区av| 亚洲精品一二三| 日韩一区二区三| 99久久综合国产精品|