uffs_public.h File Reference

public data structures for uffs More...

#include "uffs/uffs_types.h"
#include "uffs/uffs_config.h"
#include "uffs_device.h"

Go to the source code of this file.

Data Structures

struct  uffs_DiskInfoSt
struct  uffs_fileInfoSt
struct  uffs_mountTableSt
struct  uffs_PartitionInfoSt
struct  uffs_StorageSt
struct  uffs_TagsSt

Defines

#define FILE_ATTR_DIR   (1 << 24)
 attribute for directory
#define FILE_ATTR_WRITE   (1 << 0)
 writable
#define MAX_FILENAME_LENGTH   128
#define TAG_CLEAR   1
#define TAG_DIRTY   0
#define TAG_INVALID   1
#define TAG_VALID   0
#define UFFS_ALL_PAGES   (0xffff)
 UFFS_ALL_PAGES if this value presented, that means the objects are all pages in the block.
#define UFFS_DBG_LEVEL   UFFS_ERR_NOISY
#define UFFS_DISK_INFO_SIZE   64
#define UFFS_DISK_MARK   0x53464655
#define UFFS_ERR_DEAD   2
#define UFFS_ERR_NOISY   -1
#define UFFS_ERR_NORMAL   0
#define UFFS_ERR_SERIOUS   1
#define UFFS_INVALID_BLOCK   (0xfffe)
#define UFFS_INVALID_PAGE   (0xfffe)
 macro for invalid page number
#define UFFS_INVALID_SERIAL   0xffff
#define UFFS_PARTITION_INFO_SIZE   32

Typedefs

typedef uffs_fileInfoSt uffs_fileInfo
typedef uffs_mountTableSt uffs_mountTable

Functions

URET uffs_BlockRecover (uffs_Device *dev, uffs_blockInfo *old, u16 newBlock)
u8 uffs_CalTagCheckSum (uffs_Tags *tag)
 Calculate tag checksum.
URET uffs_CreateNewFile (uffs_Device *dev, u16 father, u16 serial, uffs_blockInfo *bc, uffs_fileInfo *fi)
u16 uffs_FindBestPageInBlock (uffs_Device *dev, uffs_blockInfo *bc, u16 page)
 find a best page than given page from page.
u16 uffs_FindFirstFreePage (uffs_Device *dev, uffs_blockInfo *bc, u16 pageFrom)
u16 uffs_FindFirstValidPage (uffs_Device *dev, uffs_blockInfo *bc)
int uffs_FindFreePageInBlock (uffs_Device *dev, uffs_blockInfo *bc)
u16 uffs_FindPageInBlockWithPageId (uffs_Device *dev, uffs_blockInfo *bc, u16 pageID)
 find a valid page with given pageID
int uffs_GetBlockFileDataLength (uffs_Device *dev, uffs_blockInfo *bc, u8 type)
 calculate data length of a file block
int uffs_GetBlockTimeStamp (uffs_Device *dev, uffs_blockInfo *bc)
int uffs_GetDeviceFree (uffs_Device *dev)
int uffs_GetDeviceTotal (uffs_Device *dev)
int uffs_GetDeviceUsed (uffs_Device *dev)
int uffs_GetFirstBlockTimeStamp (void)
int uffs_GetFreePagesCount (uffs_Device *dev, uffs_blockInfo *bc)
uffs_mountTableuffs_GetMountTable (void)
int uffs_GetNextBlockTimeStamp (int prev)
URET uffs_InitDevice (uffs_Device *dev)
URET uffs_InitFlashClass (uffs_Device *dev)
URET uffs_initMountTable (struct uffs_mountTableSt *tbl)
UBOOL uffs_IsBlockBad (uffs_Device *dev, uffs_blockInfo *bc)
UBOOL uffs_IsDataBlockReguFull (uffs_Device *dev, uffs_blockInfo *bc)
 Is this block the last block of file ? (no free pages, and full filled with full pageID).
UBOOL uffs_IsPageErased (uffs_Device *dev, uffs_blockInfo *bc, u16 page)
 Is the block erased ?
UBOOL uffs_IsSrcNewerThanObj (int src, int obj)
URET uffs_LoadPageSpare (uffs_Device *dev, int block, int page, uffs_Tags *tag)
URET uffs_MakePageValid (uffs_Device *dev, int block, int page, uffs_Tags *tag)
u16 uffs_MakeSum16 (void *p, int len)
u8 uffs_MakeSum8 (void *p, int len)
 recover a page in block
URET uffs_NewBlock (uffs_Device *dev, u16 block, uffs_Tags *tag, uffs_Buf *buf)
URET uffs_PageRecover (uffs_Device *dev, uffs_blockInfo *bc, u16 oldPage, u16 newPage, uffs_Buf *buf)
void uffs_Perror (int level, const char *errFmt,...)
URET uffs_ReleaseDevice (uffs_Device *dev)
URET uffs_releaseMountTable (struct uffs_mountTableSt *tbl)
URET uffs_WriteDataToNewPage (uffs_Device *dev, u16 block, u16 page, uffs_Tags *tag, uffs_Buf *buf)
URET uffs_WritePageSpare (uffs_Device *dev, int block, int page, uffs_Tags *tag)


Detailed Description

public data structures for uffs

Author:
Ricky Zheng

Definition in file uffs_public.h.


Define Documentation

#define FILE_ATTR_DIR   (1 << 24)

attribute for directory

Definition at line 63 of file uffs_public.h.

Referenced by cmdLs().

#define FILE_ATTR_WRITE   (1 << 0)

writable

Definition at line 64 of file uffs_public.h.

#define MAX_FILENAME_LENGTH   128

Note:
Be careful: it's part of the physical format. see: uffs_fileInfoSt.name

Definition at line 61 of file uffs_public.h.

#define TAG_CLEAR   1

Definition at line 48 of file uffs_public.h.

Referenced by uffs_IsPageErased().

#define TAG_DIRTY   0

uffs_TagsSt.valid

Definition at line 47 of file uffs_public.h.

Referenced by uffs_FindBestPageInBlock(), uffs_IsBlockPagesFullUsed(), and uffs_IsThisBlockUsed().

#define TAG_INVALID   1

Definition at line 44 of file uffs_public.h.

Referenced by uffs_IsPageErased().

#define TAG_VALID   0

uffs_TagsSt.dirty

Definition at line 43 of file uffs_public.h.

Referenced by uffs_FindBestPageInBlock().

#define UFFS_ALL_PAGES   (0xffff)

UFFS_ALL_PAGES if this value presented, that means the objects are all pages in the block.

Definition at line 149 of file uffs_public.h.

Referenced by uffs_BufFlush(), uffs_CompareFileNameWithTreeNode(), uffs_ExpireAllBlockInfo(), uffs_ExpireBlockInfo(), uffs_FindBestPageInBlock(), uffs_GetBlockFileDataLength(), uffs_LoadBlockInfo(), uffs_RecoverBadBlock(), and uffs_TruncateObject().

#define UFFS_DBG_LEVEL   UFFS_ERR_NOISY

Definition at line 133 of file uffs_public.h.

Referenced by uffs_Perror().

#define UFFS_DISK_INFO_SIZE   64

Definition at line 85 of file uffs_public.h.

#define UFFS_DISK_MARK   0x53464655

Definition at line 84 of file uffs_public.h.

#define UFFS_ERR_DEAD   2

Definition at line 130 of file uffs_public.h.

Referenced by uffs_InitBlockInfoCache(), and uffs_InitDevice().

#define UFFS_ERR_NOISY   -1

Definition at line 127 of file uffs_public.h.

Referenced by Samsung_MakeBadBlockMark(), uffs_BufInit(), uffs_CheckBadBlock(), uffs_InitBlockInfoCache(), uffs_InitDevice(), uffs_initMountTable(), uffs_OpenFindObject(), uffs_ReadObject(), uffs_RecoverBadBlock(), uffs_RenameObject(), uffs_SeekObject(), and uffs_WriteObject().

#define UFFS_ERR_NORMAL   0

Definition at line 128 of file uffs_public.h.

Referenced by uffs_BufInit(), uffs_BufPut(), uffs_BufReleaseAll(), uffs_CheckBadBlock(), uffs_CompareFileNameWithTreeNode(), uffs_DeleteObject(), uffs_FormatDevice(), and uffs_RecoverBadBlock().

#define UFFS_ERR_SERIOUS   1

Definition at line 129 of file uffs_public.h.

Referenced by Samsung_WritePageSpare(), uffs_BreakFromEntry(), uffs_BufClone(), uffs_BufFlush(), uffs_BufFreeClone(), uffs_BufGetEx(), uffs_BufNew(), uffs_BufWrite(), uffs_BuildTree(), uffs_CheckBadBlock(), uffs_CloseObject(), uffs_CompareFileNameWithTreeNode(), uffs_CreateNewFile(), uffs_FindFromTree(), uffs_FormatDevice(), uffs_GetBlockInfo(), uffs_InitDevice(), uffs_InitTreeBuf(), uffs_InsertNodeToTree(), uffs_IsSrcNewerThanObj(), uffs_LoadBlockInfo(), uffs_OpenFindObject(), uffs_PutBlockInfo(), uffs_ReadObject(), uffs_RecoverBadBlock(), uffs_ReleaseBlockInfoCache(), uffs_ReleaseDevice(), uffs_RenameObject(), uffs_TruncateObject(), and uffs_WriteObject().

#define UFFS_INVALID_BLOCK   (0xfffe)

Definition at line 156 of file uffs_public.h.

Referenced by uffs_CheckBadBlock(), uffs_InitBadBlock(), uffs_InitBlockInfoCache(), and uffs_RecoverBadBlock().

#define UFFS_INVALID_PAGE   (0xfffe)

macro for invalid page number

Definition at line 155 of file uffs_public.h.

Referenced by uffs_BufGetEx(), uffs_FindFirstFreePage(), uffs_FindFirstValidPage(), uffs_FindPageInBlockWithPageId(), and uffs_RecoverBadBlock().

#define UFFS_INVALID_SERIAL   0xffff

Definition at line 158 of file uffs_public.h.

#define UFFS_PARTITION_INFO_SIZE   32

Definition at line 86 of file uffs_public.h.


Typedef Documentation

typedef struct uffs_fileInfoSt uffs_fileInfo

Definition at line 78 of file uffs_public.h.

typedef struct uffs_mountTableSt uffs_mountTable


Function Documentation

URET uffs_BlockRecover ( uffs_Device dev,
uffs_blockInfo old,
u16  newBlock 
)

u8 uffs_CalTagCheckSum ( uffs_Tags tag  ) 

Calculate tag checksum.

Parameters:
[in] tag input tag
Returns:
checksum of tag

Definition at line 58 of file uffs_public.c.

References NULL.

Referenced by uffs_CheckPageSpare(), and uffs_WriteDataToNewPage().

URET uffs_CreateNewFile ( uffs_Device dev,
u16  father,
u16  serial,
uffs_blockInfo bc,
uffs_fileInfo fi 
)

create a new file on a free block

Parameters:
[in] dev uffs device
[in] father father dir serial num
[in] serial serial num of this new file
[in] bc block information
[in] fi file information
Note:
father, serial, bc must be provided before, and all information in fi should be filled well before.

Definition at line 354 of file uffs_public.c.

References uffs_fileInfoSt::createTime, uffs_BufSt::data, uffs_BufSt::dataLen, uffs_TagsSt::dataLength, uffs_TagsSt::dataSum, uffs_TagsSt::father, uffs_fileInfoSt::lastModify, uffs_fileInfoSt::name, uffs_fileInfoSt::name_len, NULL, PFX, uffs_TagsSt::serial, uffs_blockInfoSt::spares, uffs_pageSpareSt::tag, U_FAIL, uffs_BufGet(), uffs_BufPut(), UFFS_ERR_SERIOUS, uffs_GetCurDateTime(), uffs_LoadBlockInfo(), uffs_MakeSum16(), and uffs_Perror().

u16 uffs_FindBestPageInBlock ( uffs_Device dev,
uffs_blockInfo bc,
u16  page 
)

find a best page than given page from page.

Parameters:
[in] dev uffs device
[in] bc block info
[in] page page number to be compared with
Returns:
the better page number, could be the same with given page

Definition at line 80 of file uffs_public.c.

References uffs_DeviceSt::attr, uffs_TagsSt::dirty, uffs_TagsSt::father, uffs_TagsSt::pageID, uffs_storageAttrSt::pages_per_block, uffs_TagsSt::serial, uffs_blockInfoSt::spares, uffs_pageSpareSt::tag, TAG_DIRTY, TAG_VALID, UFFS_ALL_PAGES, uffs_LoadBlockInfo(), and uffs_TagsSt::valid.

Referenced by uffs_BufGetEx(), uffs_CompareFileNameWithTreeNode(), uffs_GetBlockFileDataLength(), and uffs_RecoverBadBlock().

u16 uffs_FindFirstFreePage ( uffs_Device dev,
uffs_blockInfo bc,
u16  pageFrom 
)

find first free page from 'pageFrom'

Parameters:
[in] dev uffs device
[in] bc block info
[in] pageFrom search from this page
Returns:
return first free page number from 'pageFrom'
Return values:
UFFS_INVALID_PAGE no free page found
>=0 the first free page number

Definition at line 191 of file uffs_public.c.

References uffs_DeviceSt::attr, uffs_storageAttrSt::pages_per_block, U_TRUE, UFFS_INVALID_PAGE, uffs_IsPageErased(), and uffs_LoadBlockInfo().

u16 uffs_FindFirstValidPage ( uffs_Device dev,
uffs_blockInfo bc 
)

Find first valid page from a block, just used in mounting a partition

Definition at line 207 of file uffs_public.c.

References uffs_DeviceSt::attr, uffs_pageSpareSt::checkOk, uffs_storageAttrSt::pages_per_block, uffs_blockInfoSt::spares, UFFS_INVALID_PAGE, and uffs_LoadBlockInfo().

int uffs_FindFreePageInBlock ( uffs_Device dev,
uffs_blockInfo bc 
)

u16 uffs_FindPageInBlockWithPageId ( uffs_Device dev,
uffs_blockInfo bc,
u16  pageID 
)

find a valid page with given pageID

Parameters:
[in] dev uffs device
[in] bc block info
[in] pageID pageID to be find
Returns:
the valid page number which has given pageID
Return values:
>=0 page number
UFFS_INVALID_PAGE page not found

Definition at line 126 of file uffs_public.c.

References uffs_DeviceSt::attr, uffs_TagsSt::pageID, uffs_storageAttrSt::pages_per_block, uffs_blockInfoSt::spares, uffs_pageSpareSt::tag, UFFS_INVALID_PAGE, and uffs_LoadBlockInfo().

Referenced by uffs_BufGetEx(), and uffs_RecoverBadBlock().

int uffs_GetBlockFileDataLength ( uffs_Device dev,
uffs_blockInfo bc,
u8  type 
)

calculate data length of a file block

Parameters:
[in] dev uffs device
[in] bc block info

Definition at line 387 of file uffs_public.c.

References uffs_DeviceSt::attr, uffs_DeviceSt::com, uffs_TagsSt::dataLength, uffs_TagsSt::pageID, uffs_storageAttrSt::pages_per_block, uffs_commInfoSt::pgDataSize, uffs_blockInfoSt::spares, uffs_pageSpareSt::tag, uffs_TagsSt::type, UFFS_ALL_PAGES, uffs_FindBestPageInBlock(), uffs_LoadBlockInfo(), UFFS_TYPE_DATA, and UFFS_TYPE_FILE.

int uffs_GetBlockTimeStamp ( uffs_Device dev,
uffs_blockInfo bc 
)

get block time stamp from a exist block

Parameters:
[in] dev uffs device
[in] bc block info

Definition at line 171 of file uffs_public.c.

References uffs_TagsSt::blockTimeStamp, uffs_blockInfoSt::spares, uffs_pageSpareSt::tag, U_FALSE, uffs_GetFirstBlockTimeStamp(), uffs_IsThisBlockUsed(), and uffs_LoadBlockInfo().

int uffs_GetDeviceFree ( uffs_Device dev  ) 

get partition free (bytes)

Definition at line 505 of file uffs_public.c.

References uffs_DeviceSt::attr, uffs_storageAttrSt::block_data_size, uffs_treeSt::erasedCount, and uffs_DeviceSt::tree.

Referenced by cmdSt().

int uffs_GetDeviceTotal ( uffs_Device dev  ) 

get partition total size (bytes)

Definition at line 513 of file uffs_public.c.

References uffs_DeviceSt::attr, uffs_storageAttrSt::block_data_size, uffs_partitionSt::end, uffs_DeviceSt::par, and uffs_partitionSt::start.

Referenced by cmdSt().

int uffs_GetDeviceUsed ( uffs_Device dev  ) 

get partition used (bytes)

Definition at line 496 of file uffs_public.c.

References uffs_DeviceSt::attr, uffs_treeSt::badCount, uffs_storageAttrSt::block_data_size, uffs_partitionSt::end, uffs_treeSt::erasedCount, uffs_DeviceSt::par, uffs_partitionSt::start, and uffs_DeviceSt::tree.

Referenced by cmdSt().

int uffs_GetFirstBlockTimeStamp ( void   ) 

Definition at line 18 of file uffs_public.c.

Referenced by uffs_GetBlockTimeStamp().

int uffs_GetFreePagesCount ( uffs_Device dev,
uffs_blockInfo bc 
)

get free pages number

Parameters:
[in] dev uffs device
[in] bc block info

Definition at line 442 of file uffs_public.c.

References uffs_DeviceSt::attr, uffs_storageAttrSt::pages_per_block, U_TRUE, uffs_IsPageErased(), and uffs_LoadBlockInfo().

Referenced by uffs_BufFlush().

uffs_mountTable* uffs_GetMountTable ( void   ) 

Definition at line 33 of file uffs_emuDevice.c.

Referenced by InitFileSystem(), ReleaseFileSystem(), uffs_GetDevice(), and uffs_GetDeviceMountPoint().

int uffs_GetNextBlockTimeStamp ( int  prev  ) 

Definition at line 23 of file uffs_public.c.

Referenced by uffs_RecoverBadBlock().

URET uffs_InitDevice ( uffs_Device dev  ) 

Definition at line 17 of file uffs_init.c.

References MAX_CACHED_BLOCK_INFO, MAX_DIRTY_PAGES_IN_A_BLOCK, MAX_PAGE_BUFFERS, PFX, uffs_DeviceSt::st, U_FAIL, U_SUCC, uffs_BufInit(), uffs_BuildTree(), UFFS_ERR_DEAD, UFFS_ERR_NOISY, UFFS_ERR_SERIOUS, uffs_InitBadBlock(), uffs_InitBlockInfoCache(), uffs_InitFlashClass(), uffs_InitTreeBuf(), and uffs_Perror().

Referenced by uffs_initMountTable().

URET uffs_InitFlashClass ( uffs_Device dev  ) 

Definition at line 25 of file uffs_class.c.

References uffs_DeviceSt::attr, uffs_DeviceSt::flash, uffs_FlashClassSt::flash, uffs_storageAttrSt::id, uffs_FlashClassSt::id_list, uffs_storageAttrSt::maker, uffs_FlashClassSt::maker, MAX_CHIP_ID_LIST, NULL, U_FAIL, and U_SUCC.

Referenced by uffs_InitDevice().

URET uffs_initMountTable ( struct uffs_mountTableSt tbl  ) 

Definition at line 82 of file uffs_init.c.

References uffs_DeviceSt::attr, uffs_mountTableSt::dev, uffs_partitionSt::end, uffs_mountTableSt::endBlock, uffs_DeviceSt::Init, NULL, uffs_DeviceSt::par, PFX, uffs_partitionSt::start, uffs_mountTableSt::startBlock, uffs_storageAttrSt::total_blocks, U_FAIL, U_SUCC, UFFS_ERR_NOISY, uffs_InitDevice(), uffs_InitObjectBuf(), and uffs_Perror().

Referenced by InitFileSystem().

UBOOL uffs_IsBlockBad ( uffs_Device dev,
uffs_blockInfo bc 
)

UBOOL uffs_IsDataBlockReguFull ( uffs_Device dev,
uffs_blockInfo bc 
)

Is this block the last block of file ? (no free pages, and full filled with full pageID).

Definition at line 483 of file uffs_public.c.

References uffs_DeviceSt::attr, uffs_DeviceSt::com, uffs_TagsSt::dataLength, uffs_TagsSt::pageID, uffs_storageAttrSt::pages_per_block, uffs_commInfoSt::pgDataSize, uffs_blockInfoSt::spares, uffs_pageSpareSt::tag, U_FALSE, U_TRUE, and uffs_LoadBlockInfo().

UBOOL uffs_IsPageErased ( uffs_Device dev,
uffs_blockInfo bc,
u16  page 
)

Is the block erased ?

Parameters:
[in] dev uffs device
[in] bc block info
[in] page page number to be check
Return values:
U_TRUE block is erased, ready to use
U_FALSE block is dirty, maybe use by file

Definition at line 464 of file uffs_public.c.

References uffs_TagsSt::checkSum, uffs_TagsSt::dirty, uffs_blockInfoSt::spares, uffs_pageSpareSt::tag, TAG_CLEAR, TAG_INVALID, U_FALSE, U_TRUE, uffs_LoadBlockInfo(), and uffs_TagsSt::valid.

Referenced by uffs_FindFirstFreePage(), and uffs_GetFreePagesCount().

UBOOL uffs_IsSrcNewerThanObj ( int  src,
int  obj 
)

Definition at line 28 of file uffs_public.c.

References PFX, U_FALSE, U_TRUE, UFFS_ERR_SERIOUS, and uffs_Perror().

URET uffs_LoadPageSpare ( uffs_Device dev,
int  block,
int  page,
uffs_Tags tag 
)

URET uffs_MakePageValid ( uffs_Device dev,
int  block,
int  page,
uffs_Tags tag 
)

u16 uffs_MakeSum16 ( void *  p,
int  len 
)

calculate sum of datam, 16bit version

Parameters:
[in] p data pointer
[in] len length of data
Returns:
return sum of data, 16bit

Definition at line 331 of file uffs_public.c.

Referenced by uffs_CreateNewFile(), and uffs_RenameObject().

u8 uffs_MakeSum8 ( void *  p,
int  len 
)

recover a page in block

calculate sum of data, 8bit version

Parameters:
[in] p data pointer
[in] len length of data
Returns:
return sum of data, 8bit

Definition at line 314 of file uffs_public.c.

URET uffs_NewBlock ( uffs_Device dev,
u16  block,
uffs_Tags tag,
uffs_Buf buf 
)

URET uffs_PageRecover ( uffs_Device dev,
uffs_blockInfo bc,
u16  oldPage,
u16  newPage,
uffs_Buf buf 
)

void uffs_Perror ( int  level,
const char *  errFmt,
  ... 
)

Definition at line 27 of file uffs_debug.c.

References NULL, and UFFS_DBG_LEVEL.

Referenced by Samsung_MakeBadBlockMark(), Samsung_WritePageSpare(), uffs_BreakFromEntry(), uffs_BufClone(), uffs_BufFlush(), uffs_BufFreeClone(), uffs_BufGetEx(), uffs_BufInit(), uffs_BufNew(), uffs_BufPut(), uffs_BufReleaseAll(), uffs_BufWrite(), uffs_BuildTree(), uffs_CheckBadBlock(), uffs_CloseObject(), uffs_CompareFileNameWithTreeNode(), uffs_CreateNewFile(), uffs_DeleteObject(), uffs_FindFromTree(), uffs_FormatDevice(), uffs_GetBlockInfo(), uffs_InitBlockInfoCache(), uffs_InitDevice(), uffs_initMountTable(), uffs_InitTreeBuf(), uffs_InsertNodeToTree(), uffs_IsSrcNewerThanObj(), uffs_LoadBlockInfo(), uffs_OpenFindObject(), uffs_PutBlockInfo(), uffs_ReadObject(), uffs_RecoverBadBlock(), uffs_ReleaseBlockInfoCache(), uffs_ReleaseDevice(), uffs_RenameObject(), uffs_SeekObject(), uffs_TruncateObject(), and uffs_WriteObject().

URET uffs_ReleaseDevice ( uffs_Device dev  ) 

Definition at line 56 of file uffs_init.c.

References PFX, U_FAIL, U_SUCC, uffs_BufReleaseAll(), UFFS_ERR_SERIOUS, uffs_Perror(), uffs_ReleaseBlockInfoCache(), and uffs_ReleaseTreeBuf().

Referenced by uffs_releaseMountTable().

URET uffs_releaseMountTable ( struct uffs_mountTableSt tbl  ) 

Definition at line 107 of file uffs_init.c.

References uffs_mountTableSt::dev, NULL, uffs_DeviceSt::Release, U_SUCC, and uffs_ReleaseDevice().

Referenced by ReleaseFileSystem().

URET uffs_WriteDataToNewPage ( uffs_Device dev,
u16  block,
u16  page,
uffs_Tags tag,
uffs_Buf buf 
)

write data to a new page

Parameters:
[in] dev uffs device
[in] block block number to be wrote to
[in] page page number to be wrote to
[in] tag new page tag
[in] buf new page data

Definition at line 225 of file uffs_public.c.

References uffs_TagsSt::checkSum, uffs_DeviceSt::com, uffs_BufSt::data, uffs_TagsSt::dirty, uffs_BufSt::ecc, uffs_DeviceSt::flash, uffs_FlashOpsSt::MakeEcc, uffs_FlashOpsSt::MakePageValid, uffs_DeviceSt::ops, uffs_commInfoSt::pgSize, U_SUCC, uffs_CalTagCheckSum(), uffs_TagsSt::valid, uffs_DeviceOpsSt::WritePageData, and uffs_FlashOpsSt::WritePageSpare.

Referenced by uffs_RecoverBadBlock().

URET uffs_WritePageSpare ( uffs_Device dev,
int  block,
int  page,
uffs_Tags tag 
)


Generated on Sat Mar 17 15:45:45 2007 for uffs-doc by  doxygen 1.5.0