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

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

?? tff.c

?? at91sam9263 keilv3 一級啟動代碼,其中晶振頻率為16m
?? C
?? 第 1 頁 / 共 4 頁
字號:
#endif

	*nclust = n;
	return FR_OK;
}




/*-----------------------------------------------------------------------*/
/* Delete a File or Directory                                            */
/*-----------------------------------------------------------------------*/

FRESULT f_unlink (
	const char *path		/* Pointer to the file or directory path */
)
{
	FRESULT res;
	DIR dj;
	BYTE *dir, *sdir;
	DWORD dsect;
	char fn[8+3+1];
	CLUST dclust;


	res = auto_mount(&path, 1);
	if (res != FR_OK) return res;
	res = trace_path(&dj, fn, path, &dir);	/* Trace the file path */
	if (res != FR_OK) return res;			/* Trace failed */
	if (!dir) return FR_INVALID_NAME;		/* It is the root directory */
	if (dir[DIR_Attr] & AM_RDO) return FR_DENIED;	/* It is a R/O object */
	dsect = dj.fs->winsect;
	dclust =
#if _FAT32
		((DWORD)LD_WORD(&dir[DIR_FstClusHI]) << 16) |
#endif
		LD_WORD(&dir[DIR_FstClusLO]);
	if (dir[DIR_Attr] & AM_DIR) {			/* It is a sub-directory */
		dj.clust = dclust;					/* Check if the sub-dir is empty or not */
		dj.sect = clust2sect(dclust);
		dj.index = 2;
		do {
			if (!move_window(dj.sect)) return FR_RW_ERROR;
			sdir = &dj.fs->win[(dj.index & 15) * 32];
			if (sdir[DIR_Name] == 0) break;
			if (sdir[DIR_Name] != 0xE5 && !(sdir[DIR_Attr] & AM_VOL))
				return FR_DENIED;	/* The directory is not empty */
		} while (next_dir_entry(&dj));
	}

	if (!move_window(dsect)) return FR_RW_ERROR;	/* Mark the directory entry 'deleted' */
	dir[DIR_Name] = 0xE5;
	dj.fs->winflag = 1;
	if (!remove_chain(dclust)) return FR_RW_ERROR;	/* Remove the cluster chain */

	return sync();
}




/*-----------------------------------------------------------------------*/
/* Create a Directory                                                    */
/*-----------------------------------------------------------------------*/

FRESULT f_mkdir (
	const char *path		/* Pointer to the directory path */
)
{
	FRESULT res;
	DIR dj;
	BYTE *dir, *fw, n;
	char fn[8+3+1];
	DWORD sect, dsect, tim;
	CLUST dclust, pclust;


	res = auto_mount(&path, 1);
	if (res != FR_OK) return res;
	res = trace_path(&dj, fn, path, &dir);	/* Trace the file path */
	if (res == FR_OK) return FR_EXIST;		/* Any file or directory is already existing */
	if (res != FR_NO_FILE) return res;

	res = reserve_direntry(&dj, &dir); 		/* Reserve a directory entry */
	if (res != FR_OK) return res;
	sect = dj.fs->winsect;
	dclust = create_chain(0);				/* Allocate a cluster for new directory table */
	if (dclust == 1) return FR_RW_ERROR;
	dsect = clust2sect(dclust);
	if (!dsect) return FR_DENIED;
	if (!move_window(dsect)) return FR_RW_ERROR;

	fw = dj.fs->win;
	memset(fw, 0, 512U);					/* Clear the directory table */
	for (n = 1; n < dj.fs->csize; n++) {
		if (disk_write(0, fw, ++dsect, 1) != RES_OK)
			return FR_RW_ERROR;
	}

	memset(&fw[DIR_Name], ' ', 8+3);		/* Create "." entry */
	fw[DIR_Name] = '.';
	fw[DIR_Attr] = AM_DIR;
	tim = get_fattime();
	ST_DWORD(&fw[DIR_WrtTime], tim);
	memcpy(&fw[32], &fw[0], 32); fw[33] = '.';	/* Create ".." entry */
	pclust = dj.sclust;
#if _FAT32
	ST_WORD(&fw[   DIR_FstClusHI], dclust >> 16);
	if (dj.fs->fs_type == FS_FAT32 && pclust == dj.fs->dirbase) pclust = 0;
	ST_WORD(&fw[32+DIR_FstClusHI], pclust >> 16);
#endif
	ST_WORD(&fw[   DIR_FstClusLO], dclust);
	ST_WORD(&fw[32+DIR_FstClusLO], pclust);
	dj.fs->winflag = 1;

	if (!move_window(sect)) return FR_RW_ERROR;
	memset(&dir[0], 0, 32);						/* Clean-up the new entry */
	memcpy(&dir[DIR_Name], fn, 8+3);			/* Name */
	dir[DIR_NTres] = fn[11];
	dir[DIR_Attr] = AM_DIR;						/* Attribute */
	ST_DWORD(&dir[DIR_WrtTime], tim);			/* Crated time */
	ST_WORD(&dir[DIR_FstClusLO], dclust);		/* Table start cluster */
#if _FAT32
	ST_WORD(&dir[DIR_FstClusHI], dclust >> 16);
#endif

	return sync();
}




/*-----------------------------------------------------------------------*/
/* Change File Attribute                                                 */
/*-----------------------------------------------------------------------*/

FRESULT f_chmod (
	const char *path,	/* Pointer to the file path */
	BYTE value,			/* Attribute bits */
	BYTE mask			/* Attribute mask to change */
)
{
	FRESULT res;
	DIR dj;
	BYTE *dir;
	char fn[8+3+1];


	res = auto_mount(&path, 1);
	if (res == FR_OK) {
		res = trace_path(&dj, fn, path, &dir);	/* Trace the file path */
		if (res == FR_OK) {				/* Trace completed */
			if (!dir) {
				res = FR_INVALID_NAME;	/* Root directory */
			} else {
				mask &= AM_RDO|AM_HID|AM_SYS|AM_ARC;	/* Valid attribute mask */
				dir[DIR_Attr] = (value & mask) | (dir[DIR_Attr] & (BYTE)~mask);	/* Apply attribute change */
				res = sync();
			}
		}
	}
	return res;
}




/*-----------------------------------------------------------------------*/
/* Change Timestamp                                                      */
/*-----------------------------------------------------------------------*/

FRESULT f_utime (
	const char *path,		/* Pointer to the file/directory name */
	const FILINFO *finfo	/* Pointer to the timestamp to be set */
)
{
	FRESULT res;
	DIR dj;
	BYTE *dir;
	char fn[8+3+1];


	res = auto_mount(&path, 1);
	if (res == FR_OK) {
		res = trace_path(&dj, fn, path, &dir);	/* Trace the file path */
		if (res == FR_OK) {				/* Trace completed */
			if (!dir) {
				res = FR_INVALID_NAME;	/* Root directory */
			} else {
				ST_WORD(&dir[DIR_WrtTime], finfo->ftime);
				ST_WORD(&dir[DIR_WrtDate], finfo->fdate);
				res = sync();
			}
		}
	}
	return res;
}




/*-----------------------------------------------------------------------*/
/* Rename File/Directory                                                 */
/*-----------------------------------------------------------------------*/

FRESULT f_rename (
	const char *path_old,	/* Pointer to the old name */
	const char *path_new	/* Pointer to the new name */
)
{
	FRESULT res;
	DWORD sect_old;
	BYTE *dir_old, *dir_new, direntry[32-11];
	DIR dj;
	char fn[8+3+1];


	res = auto_mount(&path_old, 1);
	if (res != FR_OK) return res;

	res = trace_path(&dj, fn, path_old, &dir_old);	/* Check old object */
	if (res != FR_OK) return res;				/* The old object is not found */
	if (!dir_old) return FR_NO_FILE;
	sect_old = dj.fs->winsect;					/* Save the object information */
	memcpy(direntry, &dir_old[DIR_Attr], 32-11);

	res = trace_path(&dj, fn, path_new, &dir_new);	/* Check new object */
	if (res == FR_OK) return FR_EXIST;			/* The new object name is already existing */
	if (res != FR_NO_FILE) return res;			/* Is there no old name? */
	res = reserve_direntry(&dj, &dir_new); 		/* Reserve a directory entry */
	if (res != FR_OK) return res;

	memcpy(&dir_new[DIR_Attr], direntry, 32-11);	/* Create new entry */
	memcpy(&dir_new[DIR_Name], fn, 8+3);
	dir_new[DIR_NTres] = fn[11];
	dj.fs->winflag = 1;

	if (!move_window(sect_old)) return FR_RW_ERROR;	/* Delete old entry */
	dir_old[DIR_Name] = 0xE5;

	return sync();
}

#endif /* !_FS_READONLY */
#endif /* _FS_MINIMIZE == 0 */
#endif /* _FS_MINIMIZE <= 1 */
#endif /* _FS_MINIMIZE <= 2 */


#if _USE_FORWARD
/*-----------------------------------------------------------------------*/
/* Forward data to the stream directly                                   */
/*-----------------------------------------------------------------------*/

FRESULT f_forward (
	FIL *fp, 						/* Pointer to the file object */
	UINT (*func)(const BYTE*,UINT),	/* Pointer to the streaming function */
	UINT btr,						/* Number of bytes to forward */
	UINT *br						/* Pointer to number of bytes forwarded */
)
{
	FRESULT res;
	DWORD remain;
	UINT rcnt;
	CLUST clust;


	*br = 0;
	res = validate(fp->fs, fp->id);					/* Check validity of the object */
	if (res != FR_OK) return res;
	if (fp->flag & FA__ERROR) return FR_RW_ERROR;	/* Check error flag */
	if (!(fp->flag & FA_READ)) return FR_DENIED;	/* Check access mode */
	remain = fp->fsize - fp->fptr;
	if (btr > remain) btr = (UINT)remain;			/* Truncate btr by remaining bytes */

	for ( ;  btr && (*func)(NULL, 0);				/* Repeat until all data transferred */
		fp->fptr += rcnt, *br += rcnt, btr -= rcnt) {
		if ((fp->fptr % 512U) == 0) {				/* On the sector boundary? */
			if (fp->csect >= fp->fs->csize) {		/* On the cluster boundary? */
				clust = (fp->fptr == 0) ?			/* On the top of the file? */
					fp->org_clust : get_cluster(fp->curr_clust);
				if (clust < 2 || clust >= fp->fs->max_clust) goto ff_error;
				fp->curr_clust = clust;				/* Update current cluster */
				fp->csect = 0;						/* Reset sector address in the cluster */
			}
			fp->csect++;							/* Next sector address in the cluster */
		}
		if (!move_window(clust2sect(fp->curr_clust) + fp->csect - 1))	/* Move sector window */
			goto ff_error;
		rcnt = 512U - (WORD)(fp->fptr % 512U);		/* Forward data from sector window */
		if (rcnt > btr) rcnt = btr;
		rcnt = (*func)(&fp->fs->win[(WORD)fp->fptr % 512U], rcnt);
		if (rcnt == 0) goto ff_error;
	}

	return FR_OK;

ff_error:	/* Abort this function due to an unrecoverable error */
	fp->flag |= FA__ERROR;
	return FR_RW_ERROR;
}
#endif /* _USE_FORWARD */



#if _USE_STRFUNC >= 1
/*-----------------------------------------------------------------------*/
/* Get a string from the file                                            */
/*-----------------------------------------------------------------------*/
char* fgets (
	char* buff,	/* Pointer to the string buffer to read */
	int len,	/* Size of string buffer */
	FIL* fil	/* Pointer to the file object */
)
{
	int i = 0;
	char *p = buff;
	UINT rc;


	while (i < len - 1) {			/* Read bytes until buffer gets filled */
		f_read(fil, p, 1, &rc);
		if (rc != 1) break;			/* Break when no data to read */
#if _USE_STRFUNC >= 2
		if (*p == '\r') continue;	/* Strip '\r' */
#endif
		i++;
		if (*p++ == '\n') break;	/* Break when reached end of line */
	}
	*p = 0;
	return i ? buff : 0;			/* When no data read (eof or error), return with error. */
}



#if !_FS_READONLY
#include <stdarg.h>
/*-----------------------------------------------------------------------*/
/* Put a character to the file                                           */
/*-----------------------------------------------------------------------*/
int fputc (
	int chr,	/* A character to be output */
	FIL* fil	/* Ponter to the file object */
)
{
	UINT bw;
	char c;


#if _USE_STRFUNC >= 2
	if (chr == '\n') fputc ('\r', fil);	/* LF -> CRLF conversion */
#endif
	if (!fil) {	/* Special value may be used to switch the destination to any other device */
	/*	put_console(chr);	*/
		return chr;
	}
	c = (char)chr;
	f_write(fil, &c, 1, &bw);	/* Write a byte to the file */
	return bw ? chr : EOF;		/* Return the resulut */
}




/*-----------------------------------------------------------------------*/
/* Put a string to the file                                              */
/*-----------------------------------------------------------------------*/
int fputs (
	const char* str,	/* Pointer to the string to be output */
	FIL* fil			/* Pointer to the file object */
)
{
	int n;


	for (n = 0; *str; str++, n++) {
		if (fputc(*str, fil) == EOF) return EOF;
	}
	return n;
}




/*-----------------------------------------------------------------------*/
/* Put a formatted string to the file                                    */
/*-----------------------------------------------------------------------*/
int fprintf (
	FIL* fil,			/* Pointer to the file object */
	const char* str,	/* Pointer to the format string */
	...					/* Optional arguments... */
)
{
	va_list arp;
	UCHAR c, f, r;
	ULONG val;
	char s[16];
	int i, w, res, cc;


	va_start(arp, str);

	for (cc = res = 0; cc != EOF; res += cc) {
		c = *str++;
		if (c == 0) break;			/* End of string */
		if (c != '%') {				/* Non escape cahracter */
			cc = fputc(c, fil);
			if (cc != EOF) cc = 1;
			continue;
		}
		w = f = 0;
		c = *str++;
		if (c == '0') {				/* Flag: '0' padding */
			f = 1; c = *str++;
		}
		while (c >= '0' && c <= '9') {	/* Precision */
			w = w * 10 + (c - '0');
			c = *str++;
		}
		if (c == 'l') {				/* Prefix: Size is long int */
			f |= 2; c = *str++;
		}
		if (c == 's') {				/* Type is string */
			cc = fputs(va_arg(arp, char*), fil);
			continue;
		}
		if (c == 'c') {				/* Type is character */
			cc = fputc(va_arg(arp, char), fil);
			if (cc != EOF) cc = 1;
			continue;
		}
		r = 0;
		if (c == 'd') r = 10;		/* Type is signed decimal */
		if (c == 'u') r = 10;		/* Type is unsigned decimal */
		if (c == 'X') r = 16;		/* Type is unsigned hexdecimal */
		if (r == 0) break;			/* Unknown type */
		if (f & 2) {				/* Get the value */
			val = (ULONG)va_arg(arp, long);
		} else {
			val = (c == 'd') ? (ULONG)(long)va_arg(arp, int) : (ULONG)va_arg(arp, unsigned int);
		}
		/* Put numeral string */
		if (c == 'd') {
			if (val >= 0x80000000) {
				val = 0 - val;
				f |= 4;
			}
		}
		i = sizeof(s) - 1; s[i] = 0;
		do {
			c = (UCHAR)(val % r + '0');
			if (c > '9') c += 7;
			s[--i] = c;
			val /= r;
		} while (i && val);
		if (i && (f & 4)) s[--i] = '-';
		w = sizeof(s) - 1 - w;
		while (i && i > w) s[--i] = (f & 1) ? '0' : ' ';
		cc = fputs(&s[i], fil);
	}

	va_end(arp);
	return (cc == EOF) ? cc : res;
}

#endif /* !_FS_READONLY */
#endif /* _USE_STRFUNC >= 1*/

#endif /* _FATFS_TINY */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美视频在线观看| 日韩在线一区二区| 日韩福利视频网| av一二三不卡影片| 日韩情涩欧美日韩视频| 亚洲最新视频在线观看| 国产aⅴ综合色| 26uuu亚洲婷婷狠狠天堂| 亚洲成人动漫在线免费观看| av电影天堂一区二区在线| 久久久五月婷婷| 日本不卡视频在线| 欧美日韩国产免费一区二区| 国产精品传媒在线| 国产69精品一区二区亚洲孕妇| 69久久99精品久久久久婷婷| 亚洲综合色丁香婷婷六月图片| 国产ts人妖一区二区| 久久亚洲一区二区三区明星换脸| 视频一区二区中文字幕| 欧美精品一级二级三级| 一区二区久久久久久| 91视视频在线直接观看在线看网页在线看 | 一区二区在线观看视频 | 日韩电影在线免费观看| 欧美亚洲精品一区| 一区二区三区精品久久久| 99精品视频一区| 亚洲图片另类小说| 99久久夜色精品国产网站| 中文字幕五月欧美| 成人教育av在线| 日韩美女精品在线| 欧洲精品视频在线观看| 一区二区三区四区高清精品免费观看| 成人黄色软件下载| 国产精品成人在线观看| 色先锋aa成人| 亚洲国产精品久久久久婷婷884 | 久久蜜桃av一区二区天堂| 奇米四色…亚洲| 26uuu亚洲| 国产不卡视频在线播放| 亚洲天堂av老司机| 色婷婷综合久久久久中文一区二区| 尤物在线观看一区| 欧美一区二区三区在线观看视频| 麻豆91精品视频| 国产精品视频yy9299一区| 91同城在线观看| 天堂一区二区在线免费观看| 欧美刺激午夜性久久久久久久 | 久久久www成人免费毛片麻豆| 国产剧情av麻豆香蕉精品| 亚洲欧洲另类国产综合| 欧美精品第一页| 国产精品伊人色| 夜夜嗨av一区二区三区四季av| 欧美一二三区精品| 成人午夜看片网址| 亚洲午夜久久久久久久久久久| 日韩欧美成人激情| 成人激情午夜影院| 午夜久久久久久久久| 久久精品视频免费| 91官网在线免费观看| 老司机免费视频一区二区三区| 国产精品久线观看视频| 欧美日韩免费一区二区三区| 国产一区二区免费看| 一区二区三区欧美视频| 2欧美一区二区三区在线观看视频| 91免费小视频| 精品制服美女丁香| 一区二区三区免费网站| 久久久亚洲高清| 欧美福利视频导航| 91色在线porny| 国产在线麻豆精品观看| 亚洲444eee在线观看| 国产精品久久影院| 久久中文娱乐网| 制服丝袜中文字幕一区| 91视频免费播放| 国产一区二区调教| 日韩福利电影在线观看| 亚洲精品大片www| 国产人伦精品一区二区| 日韩无一区二区| 欧美亚洲动漫另类| 成人精品小蝌蚪| 国产一区欧美日韩| 蜜臀精品一区二区三区在线观看| 一区二区三区欧美日韩| 国产精品灌醉下药二区| 久久蜜桃一区二区| 26uuu色噜噜精品一区| 欧美成人女星排名| 欧美精选在线播放| 欧美性猛交xxxxxx富婆| 色一情一伦一子一伦一区| 成人教育av在线| 成人网在线播放| 高清av一区二区| 国产福利精品一区| 国产一区三区三区| 国产一区二区在线视频| 国模大尺度一区二区三区| 日本伊人精品一区二区三区观看方式| 亚洲成人在线观看视频| 亚洲综合免费观看高清完整版 | 国产精品夜夜嗨| 韩国三级电影一区二区| 国产麻豆精品95视频| 国产一区二区三区四区五区美女 | 日韩电影在线观看电影| 视频在线在亚洲| 日韩国产欧美在线观看| 久久精品国内一区二区三区| 九色综合国产一区二区三区| 蜜臀a∨国产成人精品| 看片的网站亚洲| 国产精品综合视频| 成人高清视频免费观看| 成人免费三级在线| 97精品久久久午夜一区二区三区 | 久久精品噜噜噜成人88aⅴ| 久久电影网站中文字幕| 国产传媒一区在线| 不卡影院免费观看| 欧美日韩综合在线| 欧美成人一区二区三区在线观看 | 亚洲第一电影网| 午夜电影久久久| 韩国v欧美v亚洲v日本v| 成人免费视频网站在线观看| 色8久久精品久久久久久蜜| 欧美久久婷婷综合色| 久久久精品影视| 一区二区三区免费看视频| 蜜臀久久99精品久久久久久9| 国产精品一卡二| 91久久久免费一区二区| 日韩欧美卡一卡二| 最近中文字幕一区二区三区| 日韩av网站免费在线| 成人午夜私人影院| 3atv一区二区三区| 国产精品乱人伦一区二区| 亚洲午夜久久久久久久久久久 | 国产在线看一区| 色噜噜狠狠成人中文综合| 日韩视频在线永久播放| 中文字幕亚洲区| 奇米888四色在线精品| 成人黄色电影在线| 91麻豆精品国产自产在线| 国产精品理论片| 美女视频一区在线观看| 91一区二区在线| 精品欧美乱码久久久久久| 亚洲精品国产品国语在线app| 精品一区二区免费看| 欧美日韩国产大片| 1000精品久久久久久久久| 看电视剧不卡顿的网站| 欧美中文字幕一区二区三区亚洲| 精品毛片乱码1区2区3区| 亚洲午夜久久久| 99久久婷婷国产综合精品电影| 日韩免费观看高清完整版 | 91福利在线看| 国产日产欧美一区二区视频| 毛片基地黄久久久久久天堂| 在线观看欧美精品| 国产精品全国免费观看高清| 国内精品伊人久久久久av影院| 欧美日韩国产精品成人| 亚洲精品中文在线观看| 国产suv精品一区二区6| 日韩欧美成人午夜| 男人的天堂亚洲一区| 欧美三级电影网站| 亚洲精品免费播放| 91小宝寻花一区二区三区| 国产清纯白嫩初高生在线观看91| 精品一区二区国语对白| 日韩一级二级三级精品视频| 亚洲专区一二三| 91福利精品视频| 亚洲一区二区三区四区在线| 色综合色综合色综合色综合色综合| 久久亚洲精品国产精品紫薇| 久久精品噜噜噜成人av农村| 日韩亚洲欧美成人一区| 日本欧美加勒比视频| 欧美一级一区二区| 久99久精品视频免费观看| 久久综合色天天久久综合图片| 亚洲午夜久久久久中文字幕久|