mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-09 20:45:41 +08:00
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1245 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
1 parent
ef0d03aaff
commit
ac07efd463
18 files changed
+2699
No files matched your search
@@ -0,0 +1,126 @@
|
||||
Import('RTT_ROOT')
|
||||
Import('rtconfig')
|
||||
from building import *
|
||||
|
||||
# The set of source files associated with this SConscript file.
|
||||
dfs = Split("""
|
||||
src/dfs.c
|
||||
src/dfs_fs.c
|
||||
src/dfs_file.c
|
||||
src/dfs_posix.c
|
||||
""")
|
||||
|
||||
# DFS-ELMFAT options
|
||||
elmfat = Split("""
|
||||
filesystems/elmfat/dfs_elm.c
|
||||
filesystems/elmfat/ff.c
|
||||
""")
|
||||
|
||||
# DFS-ROMFS options
|
||||
romfs = Split("""
|
||||
filesystems/romfs/dfs_romfs.c
|
||||
filesystems/romfs/romfs.c
|
||||
""")
|
||||
|
||||
# DFS-DeviceFS options
|
||||
devfs = Split("""
|
||||
filesystems/devfs/devfs.c
|
||||
filesystems/devfs/console.c
|
||||
""")
|
||||
|
||||
# DFS-YAFFS2 options
|
||||
yaffs2_main = Split("""
|
||||
filesystems/yaffs2/direct/yaffscfg.c
|
||||
filesystems/yaffs2/direct/yaffs_fileem.c
|
||||
filesystems/yaffs2/direct/yaffsfs.c
|
||||
filesystems/yaffs2/direct/dfs_yaffs2.c
|
||||
""")
|
||||
|
||||
yaffs2_comm = Split("""
|
||||
filesystems/yaffs2/yaffs_ecc.c
|
||||
filesystems/yaffs2/yaffs_guts.c
|
||||
filesystems/yaffs2/yaffs_packedtags1.c
|
||||
filesystems/yaffs2/yaffs_tagscompat.c
|
||||
filesystems/yaffs2/yaffs_packedtags2.c
|
||||
filesystems/yaffs2/yaffs_tagsvalidity.c
|
||||
filesystems/yaffs2/yaffs_nand.c
|
||||
filesystems/yaffs2/yaffs_checkptrw.c
|
||||
filesystems/yaffs2/yaffs_qsort.c
|
||||
""")
|
||||
|
||||
nfs = Split('''
|
||||
filesystems/nfs/mount_clnt.c
|
||||
filesystems/nfs/mount_xdr.c
|
||||
filesystems/nfs/nfs_clnt.c
|
||||
filesystems/nfs/nfs_xdr.c
|
||||
filesystems/nfs/dfs_nfs.c
|
||||
filesystems/nfs/rpc/auth_none.c
|
||||
filesystems/nfs/rpc/clnt_generic.c
|
||||
filesystems/nfs/rpc/clnt_udp.c
|
||||
filesystems/nfs/rpc/rpc_prot.c
|
||||
filesystems/nfs/rpc/pmap.c
|
||||
filesystems/nfs/rpc/xdr.c
|
||||
filesystems/nfs/rpc/xdr_mem.c
|
||||
''')
|
||||
|
||||
uffs = Split('''
|
||||
filesystems/uffs/src/uffs/uffs_badblock.c
|
||||
filesystems/uffs/src/uffs/uffs_blockinfo.c
|
||||
filesystems/uffs/src/uffs/uffs_buf.c
|
||||
filesystems/uffs/src/uffs/uffs_debug.c
|
||||
filesystems/uffs/src/uffs/uffs_device.c
|
||||
filesystems/uffs/src/uffs/uffs_ecc.c
|
||||
filesystems/uffs/src/uffs/uffs_fd.c
|
||||
filesystems/uffs/src/uffs/uffs_find.c
|
||||
filesystems/uffs/src/uffs/uffs_flash.c
|
||||
filesystems/uffs/src/uffs/uffs_fs.c
|
||||
filesystems/uffs/src/uffs/uffs_init.c
|
||||
filesystems/uffs/src/uffs/uffs_mem.c
|
||||
filesystems/uffs/src/uffs/uffs_mtb.c
|
||||
filesystems/uffs/src/uffs/uffs_pool.c
|
||||
filesystems/uffs/src/uffs/uffs_public.c
|
||||
filesystems/uffs/src/uffs/uffs_tree.c
|
||||
filesystems/uffs/src/uffs/uffs_utils.c
|
||||
filesystems/uffs/src/uffs/uffs_version.c
|
||||
filesystems/uffs/dfs_uffs.c
|
||||
''')
|
||||
|
||||
others = '''
|
||||
filesystems/uffs/dfs_nand_if.c
|
||||
filesystems/uffs/uffs_ext.c
|
||||
filesystems/uffs/flash/k9f2g08.c
|
||||
filesystems/uffs/flash/nand_ids.c
|
||||
'''
|
||||
|
||||
src_local = dfs
|
||||
# The set of source files associated with this SConscript file.
|
||||
path = [RTT_ROOT + '/components/dfs', RTT_ROOT + '/components/dfs/include']
|
||||
|
||||
if GetDepend('RT_USING_DFS_YAFFS2'):
|
||||
src_local = src_local + yaffs2_main + yaffs2_comm
|
||||
path = path + [RTT_ROOT + '/components/dfs/filesystems/yaffs2', RTT_ROOT + '/components/dfs/filesystems/yaffs2/direct']
|
||||
|
||||
if GetDepend('RT_USING_DFS_ELMFAT'):
|
||||
if GetDepend('RT_DFS_ELM_USE_LFN'):
|
||||
elmfat += ['filesystems/elmfat/option/cc936.c']
|
||||
src_local = src_local + elmfat
|
||||
|
||||
if GetDepend(['RT_USING_DFS_NFS', 'RT_USING_LWIP']):
|
||||
src_local = src_local + nfs
|
||||
path = path + [RTT_ROOT + '/components/dfs/filesystems/nfs']
|
||||
|
||||
if GetDepend('RT_USING_DFS_ROMFS'):
|
||||
src_local = src_local + romfs
|
||||
path = path + [RTT_ROOT + '/components/dfs/filesystems/romfs']
|
||||
|
||||
if GetDepend('RT_USING_DFS_DEVFS'):
|
||||
src_local = src_local + devfs
|
||||
path = path + [RTT_ROOT + '/components/dfs/filesystems/devfs']
|
||||
|
||||
if GetDepend('RT_USING_DFS_DEVFS'):
|
||||
src_local = src_local + uffs
|
||||
path = path + [RTT_ROOT + '/components/dfs/filesystems/uffs/src/inc', RTT_ROOT + '/components/dfs/filesystems/uffs', RTT_ROOT + '/components/dfs/filesystems/uffs/flash']
|
||||
|
||||
group = DefineGroup('Filesystem', src_local, depend = ['RT_USING_DFS'], CPPPATH = path)
|
||||
|
||||
Return('group')
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,27 @@
|
||||
#ifndef __K9F2G08_H__
|
||||
#define __K9F2G08_H__
|
||||
|
||||
#include <rtdef.h>
|
||||
#include <nand.h>
|
||||
|
||||
void K9F2G08_Program(u32 blockIndex, u32 srcAddress, u32 fileSize);
|
||||
|
||||
//*************** H/W dependent functions ***************
|
||||
void K9F2G08_ReadChipID(u8* buf, UBOOL all);
|
||||
|
||||
int K9F2G08_Check_badblk(u32 block);
|
||||
int K9F2G08_EraseBlock (u32 block);
|
||||
int K9F2G08_Mark_badblk (u32 block);
|
||||
int K9F2G08_ReadPage (u32 block, u32 page, u8 *buffer, int len, u8 *ecc);
|
||||
int K9F2G08_WritePage (u32 block, u32 page, const u8 *buffer, int len, const u8 *ecc);
|
||||
int K9F2G08_ReadTags (u32 block, u32 page, u8 *spare, int ofs, int len);
|
||||
int K9F2G08_WriteTags (u32 block, u32 page, const u8 *spare, int ofs, int len);
|
||||
|
||||
void K9F2G08_Reset(void);
|
||||
|
||||
void K9F2G08_Init(void);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,77 @@
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
//
|
||||
// Use of this source code is subject to the terms of the Microsoft end-user
|
||||
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
|
||||
// If you did not accept the terms of the EULA, you are not authorized to use
|
||||
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
|
||||
// install media.
|
||||
//
|
||||
/*++
|
||||
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
PARTICULAR PURPOSE.
|
||||
--*/
|
||||
#ifndef __NAND_H__
|
||||
#define __NAND_H__
|
||||
|
||||
#include <s3c24x0.h>
|
||||
#include <uffs/uffs_types.h>
|
||||
|
||||
/* define low accessing value */
|
||||
#define TOTAL_BLOCKS 2048 /* total block of whole chip */
|
||||
#define PAGE_DATA_SIZE 2048 /* max size of page data */
|
||||
#define PAGE_SPARE_SIZE 64 /* max size of extended partition */
|
||||
#define PAGES_PER_BLOCK 64 /* max pages per block' */
|
||||
#define PAGE_SIZE (PAGE_DATA_SIZE+PAGE_SPARE_SIZE)/* max size per whole page */
|
||||
#define BLOCK_DATA_SIZE (PAGE_DATA_SIZE*PAGES_PER_BLOCK)/* max size per block' */
|
||||
|
||||
//bad flags offset in the oob area.
|
||||
#define NAND_SMALL_BADBLOCK_POS 5 //small page FLASH
|
||||
#define NAND_LARGE_BADBLOCK_POS 0 //large page FLASH
|
||||
|
||||
/* Option constants for bizarre disfunctionality and real
|
||||
* features
|
||||
*/
|
||||
/* Chip can not auto increment pages */
|
||||
#define NAND_NO_AUTOINCR 0x00000001
|
||||
/* Buswitdh is 16 bit */
|
||||
#define NAND_BUSWIDTH_16 0x00000002
|
||||
/* Device supports partial programming without padding */
|
||||
#define NAND_NO_PADDING 0x00000004
|
||||
/* Chip has cache program function */
|
||||
#define NAND_CACHEPRG 0x00000008
|
||||
/* Chip has copy back function */
|
||||
#define NAND_COPYBACK 0x00000010
|
||||
/* AND Chip which has 4 banks and a confusing page / block
|
||||
* assignment. See Renesas datasheet for further information */
|
||||
#define NAND_IS_AND 0x00000020
|
||||
/* Chip has a array of 4 pages which can be read without
|
||||
* additional ready /busy waits */
|
||||
#define NAND_4PAGE_ARRAY 0x00000040
|
||||
|
||||
/* Options valid for Samsung large page devices */
|
||||
#define NAND_SAMSUNG_LP_OPTIONS \
|
||||
(NAND_NO_PADDING | NAND_CACHEPRG | NAND_COPYBACK)
|
||||
|
||||
|
||||
struct nand_flash_dev
|
||||
|
||||
{
|
||||
char *name; //chip name
|
||||
int id; //chip ID
|
||||
unsigned long pagesize; //max pages
|
||||
unsigned long chipsize; //size of whole chip iMB
|
||||
unsigned long blocksize;//size of block
|
||||
unsigned long options; //option
|
||||
};
|
||||
|
||||
struct nand_manufacturers
|
||||
{
|
||||
int id;
|
||||
char * name;
|
||||
};
|
||||
|
||||
#endif /*__NAND_H__*/
|
||||
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
* drivers/mtd/nandids.c
|
||||
*
|
||||
* Copyright (C) 2002 Thomas Gleixner (tglx@linutronix.de)
|
||||
*
|
||||
* $Id: nand_ids.c,v 1.10 2004/05/26 13:40:12 gleixner Exp $
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <rtdef.h>
|
||||
|
||||
#include "flash/nand.h"
|
||||
|
||||
/*
|
||||
* Chip ID list
|
||||
*
|
||||
* name, ID, pagesize, chipsize in MegaByte, eraseblock size,options
|
||||
*
|
||||
* if 0, get this information from the extended chip ID
|
||||
*/
|
||||
struct nand_flash_dev nand_flash_ids[] =
|
||||
{
|
||||
{"NAND 1MiB 5V 8-bit", 0x6e, 256, 1, 0x1000, 0},
|
||||
{"NAND 2MiB 5V 8-bit", 0x64, 256, 2, 0x1000, 0},
|
||||
{"NAND 4MiB 5V 8-bit", 0x6b, 512, 4, 0x2000, 0},
|
||||
{"NAND 1MiB 3,3V 8-bit", 0xe8, 256, 1, 0x1000, 0},
|
||||
{"NAND 1MiB 3,3V 8-bit", 0xec, 256, 1, 0x1000, 0},
|
||||
{"NAND 2MiB 3,3V 8-bit", 0xea, 256, 2, 0x1000, 0},
|
||||
{"NAND 4MiB 3,3V 8-bit", 0xd5, 512, 4, 0x2000, 0},
|
||||
{"NAND 4MiB 3,3V 8-bit", 0xe3, 512, 4, 0x2000, 0},
|
||||
{"NAND 4MiB 3,3V 8-bit", 0xe5, 512, 4, 0x2000, 0},
|
||||
{"NAND 8MiB 3,3V 8-bit", 0xd6, 512, 8, 0x2000, 0},
|
||||
|
||||
{"NAND 8MiB 1,8V 8-bit", 0x39, 512, 8, 0x2000, 0},
|
||||
{"NAND 8MiB 3,3V 8-bit", 0xe6, 512, 8, 0x2000, 0},
|
||||
{"NAND 8MiB 1,8V 16-bit", 0x49, 512, 8, 0x2000, NAND_BUSWIDTH_16},
|
||||
{"NAND 8MiB 3,3V 16-bit", 0x59, 512, 8, 0x2000, NAND_BUSWIDTH_16},
|
||||
|
||||
{"NAND 16MiB 1,8V 8-bit", 0x33, 512, 16, 0x4000, 0},
|
||||
{"NAND 16MiB 3,3V 8-bit", 0x73, 512, 16, 0x4000, 0},
|
||||
{"NAND 16MiB 1,8V 16-bit", 0x43, 512, 16, 0x4000, NAND_BUSWIDTH_16},
|
||||
{"NAND 16MiB 3,3V 16-bit", 0x53, 512, 16, 0x4000, NAND_BUSWIDTH_16},
|
||||
|
||||
{"NAND 32MiB 1,8V 8-bit", 0x35, 512, 32, 0x4000, 0},
|
||||
{"NAND 32MiB 3,3V 8-bit", 0x75, 512, 32, 0x4000, 0},
|
||||
{"NAND 32MiB 1,8V 16-bit", 0x45, 512, 32, 0x4000, NAND_BUSWIDTH_16},
|
||||
{"NAND 32MiB 3,3V 16-bit", 0x55, 512, 32, 0x4000, NAND_BUSWIDTH_16},
|
||||
|
||||
{"NAND 64MiB 1,8V 8-bit", 0x36, 512, 64, 0x4000, 0},
|
||||
{"NAND 64MiB 3,3V 8-bit", 0x76, 512, 64, 0x4000, 0},
|
||||
{"NAND 64MiB 1,8V 16-bit", 0x46, 512, 64, 0x4000, NAND_BUSWIDTH_16},
|
||||
{"NAND 64MiB 3,3V 16-bit", 0x56, 512, 64, 0x4000, NAND_BUSWIDTH_16},
|
||||
|
||||
{"NAND 128MiB 1,8V 8-bit", 0x78, 512, 128, 0x4000, 0},
|
||||
{"NAND 128MiB 3,3V 8-bit", 0x79, 512, 128, 0x4000, 0},
|
||||
{"NAND 128MiB 1,8V 16-bit", 0x72, 512, 128, 0x4000, NAND_BUSWIDTH_16},
|
||||
{"NAND 128MiB 3,3V 16-bit", 0x74, 512, 128, 0x4000, NAND_BUSWIDTH_16},
|
||||
|
||||
{"NAND 256MiB 3,3V 8-bit", 0x71, 512, 256, 0x4000, 0},
|
||||
|
||||
/* {"NAND 512MiB 3,3V 8-bit", 0xDC, 512, 512, 0x4000, 0}, */
|
||||
{"NAND 512MiB 3,3V 8-bit", 0xDC, 0, 512, 0, 0},
|
||||
|
||||
/* These are the new chips with large page size. The pagesize
|
||||
* and the erasesize is determined from the extended id bytes
|
||||
*/
|
||||
/* 1 Gigabit */
|
||||
{"NAND 128MiB 1,8V 8-bit", 0xA1, 0, 128, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR},
|
||||
{"NAND 128MiB 3,3V 8-bit", 0xF1, 0, 128, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR},
|
||||
{"NAND 128MiB 1,8V 16-bit", 0xB1, 0, 128, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR},
|
||||
{"NAND 128MiB 3,3V 16-bit", 0xC1, 0, 128, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR},
|
||||
|
||||
/* 2 Gigabit */
|
||||
{"NAND 256MiB 1,8V 8-bit", 0xAA, 0, 256, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR},
|
||||
{"NAND 256MiB 3,3V 8-bit", 0xDA, 0, 256, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR},
|
||||
{"NAND 256MiB 1,8V 16-bit", 0xBA, 0, 256, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR},
|
||||
{"NAND 256MiB 3,3V 16-bit", 0xCA, 0, 256, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR},
|
||||
|
||||
/* 4 Gigabit */
|
||||
{"NAND 512MiB 1,8V 8-bit", 0xAC, 0, 512, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR},
|
||||
{"NAND 512MiB 3,3V 8-bit", 0xDC, 0, 512, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR},
|
||||
{"NAND 512MiB 1,8V 16-bit", 0xBC, 0, 512, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR},
|
||||
{"NAND 512MiB 3,3V 16-bit", 0xCC, 0, 512, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR},
|
||||
|
||||
/* 8 Gigabit */
|
||||
{"NAND 1GiB 1,8V 8-bit", 0xA3, 0, 1024, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR},
|
||||
{"NAND 1GiB 3,3V 8-bit", 0xD3, 0, 1024, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR},
|
||||
{"NAND 1GiB 1,8V 16-bit", 0xB3, 0, 1024, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR},
|
||||
{"NAND 1GiB 3,3V 16-bit", 0xC3, 0, 1024, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR},
|
||||
|
||||
/* 16 Gigabit */
|
||||
{"NAND 2GiB 1,8V 8-bit", 0xA5, 0, 2048, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR},
|
||||
{"NAND 2GiB 3,3V 8-bit", 0xD5, 0, 2048, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR},
|
||||
{"NAND 2GiB 1,8V 16-bit", 0xB5, 0, 2048, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR},
|
||||
{"NAND 2GiB 3,3V 16-bit", 0xC5, 0, 2048, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR},
|
||||
|
||||
/* Renesas AND 1 Gigabit. Those chips do not support extended id and have a strange page/block layout !
|
||||
* The chosen minimum erasesize is 4 * 2 * 2048 = 16384 Byte, as those chips have an array of 4 page planes
|
||||
* 1 block = 2 pages, but due to plane arrangement the blocks 0-3 consists of page 0 + 4,1 + 5, 2 + 6, 3 + 7
|
||||
* Anyway JFFS2 would increase the eraseblock size so we chose a combined one which can be erased in one go
|
||||
* There are more speed improvements for reads and writes possible, but not implemented now
|
||||
*/
|
||||
{"AND 128MiB 3,3V 8-bit", 0x01, 2048, 128, 0x4000, NAND_IS_AND | NAND_NO_AUTOINCR | NAND_4PAGE_ARRAY},
|
||||
|
||||
{RT_NULL,}
|
||||
};
|
||||
|
||||
/*
|
||||
* NAND Flash �끓낍소덜쯤
|
||||
*/
|
||||
#define NAND_MFR_TOSHIBA 0x98
|
||||
#define NAND_MFR_SAMSUNG 0xec
|
||||
#define NAND_MFR_FUJITSU 0x04
|
||||
#define NAND_MFR_NATIONAL 0x8f
|
||||
#define NAND_MFR_RENESAS 0x07
|
||||
#define NAND_MFR_STMICRO 0x20
|
||||
|
||||
/* 齡芚�ID죗깊 */
|
||||
struct nand_manufacturers nand_manuf_ids[] =
|
||||
{
|
||||
{NAND_MFR_TOSHIBA, "Toshiba"},
|
||||
{NAND_MFR_SAMSUNG, "Samsung"},
|
||||
{NAND_MFR_FUJITSU, "Fujitsu"},
|
||||
{NAND_MFR_NATIONAL,"National"},
|
||||
{NAND_MFR_RENESAS, "Renesas"},
|
||||
{NAND_MFR_STMICRO, "ST Micro"},
|
||||
{0x0, "Unknown"}
|
||||
};
|
||||
|
||||
|
||||
|
||||
Whitespace-only changes.
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
This file is part of UFFS, the Ultra-low-cost Flash File System.
|
||||
|
||||
Copyright (C) 2005-2009 Ricky Zheng <ricky_gz_zheng@yahoo.co.nz>
|
||||
|
||||
UFFS is free software; you can redistribute it and/or modify it under
|
||||
the GNU Library General Public License as published by the Free Software
|
||||
Foundation; either version 2 of the License, or (at your option) any
|
||||
later version.
|
||||
|
||||
UFFS 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
|
||||
or GNU Library General Public License, as applicable, for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
and GNU Library General Public License along with UFFS; if not, write
|
||||
to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
|
||||
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 v2.
|
||||
|
||||
This exception does not invalidate any other reasons why a work based
|
||||
on this file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file uffs_fileem.h
|
||||
* \brief Emulate NAND flash with host file.
|
||||
* \author Ricky Zheng
|
||||
*/
|
||||
|
||||
#ifndef _UFFS_FILEEM_H_
|
||||
#define _UFFS_FILEEM_H_
|
||||
|
||||
#include "uffs_device.h"
|
||||
|
||||
typedef struct uffs_FileEmuSt {
|
||||
int initCount;
|
||||
FILE *fp;
|
||||
u8 *em_monitor_page;
|
||||
u8 * em_monitor_spare;
|
||||
const char *emu_filename;
|
||||
} uffs_FileEmu;
|
||||
|
||||
void uffs_fileem_setup_device(uffs_Device *dev);
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,11 @@
|
||||
|
||||
#ifndef __UFFS_EXT_H__
|
||||
#define __UFFS_EXT_H__
|
||||
|
||||
int CountFileUnder(const char *dir);
|
||||
int uffs_ls(const char *name);
|
||||
int uffs_format(const char *name);
|
||||
int uffs_mkfile(const char *name);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
About uffs_demo_win32.exe?
|
||||
Compile OS: Windows XP SP3
|
||||
Compile Tools:Visul C++ 6.0
|
||||
|
||||
This is a uffs filesystem demo applet.
|
||||
you can make it ,in accordance with you resource.
|
||||
Use document :
|
||||
\uffs\src\emu\*.*
|
||||
@@ -0,0 +1 @@
|
||||
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Line truncated
|
||||
Binary file not shown.
Reference in new issue
Block a user