📄 zfsdef.h
字号:
/*
* File : zfsdef.h
* Description: This file contains the data types for the ZiLOG File System
* Author : Mahadev K C
* Created on : 30-APR-2003
*
* Copyright 2002 ZiLOG Inc. ALL RIGHTS RESERVED.
*
* This file contains unpublished confidential and proprietary information
* of ZiLOG, Inc.
* NO PART OF THIS WORK MAY BE DUPLICATED, STORED, PUBLISHED OR DISCLOSED
* IN ANY FORM WITHOUT THE PRIOR WRITTEN CONSENT OF ZiLOG, INC.
* This is not a license and no use of any kind of this work is authorized
* in the absence of a written license granted by ZiLOG, Inc. in ZiLOG's
* sole discretion
*/
#ifndef _ZFSDEF_H_
#define _ZFSDEF_H_
// different sector types
#define ZFS_SEC_TYPE_FIT ((UINT8)(0x01))
#define ZFS_SEC_TYPE_DATA ((UINT8)(0x02))
#define ZFS_SEC_TYPE_AB ((UINT8)(0x04))
#define ZFS_SEC_TYPE_TB ((UINT8)(0x08))
#define ZFS_SEC_TYPE_NEW_AB ((UINT8)(0x10))
// sector allocated/Free/dirty
#define ZFS_SEC_FREE ((UINT8)(0x00))
#define ZFS_SEC_ALLOCATED ((UINT8)(0x01))
#define ZFS_SEC_DIRTY ((UINT8)(0x02))
// These flags are used for power-fail safe recovery mechanism algorithm
#define ZFS_SEC_DUP ((UINT8)(0x04))
#define ZFS_SEC_NO_DUP ((UINT8)(0x08))
#define ZFS_SEC_LINK_START ((UINT8)(0x01))
#define ZFS_SEC_LINK_END ((UINT8)(0x02))
// sector allocated/deallocated
#define ZFS_FIR_FREE ((UINT8)(0x00))
#define ZFS_FIR_ALLOCATED ((UINT8)(0x01))
#define ZFS_FIR_DIRTY ((UINT8)(0x02))
// different file types
//#define ZFS_DIR_TYPE ((UINT8)(0x04))
//#define ZFS_FILE_TYPE ((UINT8)(0x08))
// These flags are used for power-fail safe recovery mechanism algorithm
#define ZFS_FIR_DUP ((UINT8)(0x10))
#define ZFS_FIR_NOT_DUP ((UINT8)(0x20))
#define ZFS_FIR_DIRTY_START ((UINT8)(0x40))
#define ZFS_FIR_DIRTY_STOP ((UINT8)(0x80))
// file related
//#define ZFS_FILE_BEGIN ((UINT8)(0x02))
//#define ZFS_FILE_CURRENT ((UINT8)(0x00))
//#define ZFS_FILE_END ((UINT8)(0x01))
/*
#define SEEK_CUR 0
#define SEEK_END 1
#define SEEK_SET 2
*/
// file modes
//#define ZFS_READ ((UINT8)(0x01))
//#define ZFS_WRITE ((UINT8)(0x02))
//#define ZFS_APPEND ((UINT8)(0x04))
//#define ZFS_READ_WRITE ((UINT8)(0x08))
//#define ZFS_MODE_ASCII ((UINT8)(0x00))
//#define ZFS_MODE_BINARY ((UINT8)(0x01))
#define ZFS_NOT_STARTED (0x00)
#define ZFS_STARTED (0x01)
#define ZFS_COMPLETED (0x01)
//#define ZFS_MAX_FILE_NAME_SIZE (16)
#define ZFS_MAX_FILE_DIR_IN_A_DIR (255)
#define ZFS_OR_MAGIC_NUM ((UINT8)(0x5F))
#define ZFS_OR_INVALID_MAGIC_NUM ((UINT8)(0x00))
#define ZFS_BLOCK_MAGIC_NUM ((UINT8)(0x33))
#define ZFS_SEC_HDR_WRITTEN ((UINT16)0xFFFE)
//#define ZFS_SEC_SIZE (512)
#endif //_ZFSDEF_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -