📄 flashfslib.h
字号:
/* ############################################################################ (c) Copyright Virata Limited 1998-1999## Virata Limited Confidential and Proprietary## The following software source code ("Software") is strictly confidential and# is proprietary to Virata Limited ("Virata"). It may only be read, used,# copied, adapted, modified or otherwise dealt with by you if you have# entered into a confidentiality agreement with Virata and then subject to the# terms of that confidentiality agreement and any other applicable agreement# between you and Virata. If you are in any doubt as to whether you are# entitled to access, read, use, copy, adapt, modify or otherwise deal with# the Software or whether you are entitled to disclose the Software to any# other person you should contact Virata. If you have not entered into a# confidentiality agreement with Virata granting access to this Software you# should forthwith return all media, copies and printed listings containing# the Software to Virata.## Virata reserves the right to take legal action against you should you breach# the above provisions.## If you are unsure, or to report violations, please contact# support@virata.com# ##########################################################################*//*********************************************************************** * * * ATMOS FLASH Filing System library header * * * * FLASHFSLIB.H * * * * * * This source provides a low level API through which an FLASHFS * * format file area may be accessed. * * Important note: This code may be used by the System Kernel * * during image initialisation. As such, it must be non-blocking * * and may not use general system services (including the standard * * C library). * * This library is intended for use as an alternative to the * * FLASHFS process: concurrent use may result in memory corruption. * * * ***********************************************************************/#ifndef FLASHFSLIB_H#define FLASHFSLIB_H#include "atypes.h"#include "flash_types.h"/*-------------------------------------------------------------------------*//* *//* Type definitions *//* *//*-------------------------------------------------------------------------*//*** Tokens to pass to flashfs_readdir*/#define TOKEN_ALL_FILES 0#define TOKEN_DYNAMIC_ONLY 0x40000000/*** Tokens to pass to flashfs_find_validfs*/#define TOKEN_FIRST_FLASHFS 0#define TOKEN_SECOND_FLASHFS 1/*-------------------------------------------------------------------------*//* *//* External function interface *//* *//*-------------------------------------------------------------------------*/#ifdef __cplusplusextern "C" {#endif /* __cplusplus */extern void flashfslib_initialise (void);extern U32 flashfs_initialise (U32 startOffset, U32 totalSize);extern U32 flashfs_find_file (char *name, U32 *len);extern void flashfs_read_data (U32 src, BYTE *dest, U32 len);extern int flashfs_write_data (BYTE *src, U32 dest, U32 len);extern U32 flashfs_readdir (U32 token, FLASHFS_DIRENT *entry);extern U32 flashfs_find_validfs (U32 token, int *returnCode);extern int flashfs_program_root (U32 firstFixed, U32 firstDynamic);extern int flashfs_program_header (void);extern int flash_ready_for_update (void);extern int flash_write_fs_data (BYTE *s, U32 d, U32 n);extern void flash_read_fs_data (U32 s, BYTE *d, U32 n);extern U32 flashfslib_PartitionCount (void);extern int flashfslib_PartitionCheck (U32 partition, BOOL fullCheck, U32 *errorCode);extern const char *flashfslib_PartitionCheckErrorText (U32 err);extern int flashfslib_PartitionDetails (U32 partition, U32 *start, U32 *end);extern int flashfslib_PartitionFormat (U32 partition);extern int flashfslib_PartitionActivate (U32 partition);extern int flashfslib_PartitionValid (U32 partition);extern int flashfslib_PartitionInvalidate (U32 partition);extern int flashfslib_PartitionErase (U32 partition);extern int flashfslib_PartitionCheckOffset (U32 partition);#ifdef __cplusplus}#endif /* __cplusplus */#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -