127 lines
4.5 KiB
C
127 lines
4.5 KiB
C
#ifndef LFS_TRACE_H
|
|
#define LFS_TRACE_H
|
|
/*===========================================================================
|
|
|
|
LFS trace Header File
|
|
|
|
DESCRIPTION
|
|
This header file contains all the definitions necessary for
|
|
clients to interface with the Dial module.
|
|
|
|
Copyright (c) 2011 by MARVELL INCORPORATED. All Rights Reserved.
|
|
|
|
Export of this technology or software is regulated by the U.S. Government.
|
|
Diversion contrary to U.S. law prohibited.
|
|
|
|
===========================================================================*/
|
|
|
|
/*===========================================================================
|
|
|
|
EDIT HISTORY FOR FILE
|
|
|
|
This section contains comments describing changes made to the module.
|
|
Notice that changes are listed in reverse chronological order.
|
|
|
|
when who what, where, why
|
|
-------- ------ -------------------------------------------------------
|
|
11/16/08 zhoujin Create lfs trace header file
|
|
|
|
===========================================================================*/
|
|
|
|
//#include "utils.h"
|
|
#include "utilities.h"
|
|
|
|
/*===========================================================================
|
|
|
|
PUBLIC DATA DECLARATIONS
|
|
|
|
===========================================================================*/
|
|
|
|
/* -------------------------------------------------------------------
|
|
** LFS log printf.
|
|
** -------------------------------------------------------------------
|
|
*/
|
|
#define CRANE_SPI_BASE_ADDRESS 0x90000000
|
|
#define CRANE_QSPI_BASE_ADDRESS 0x80000000
|
|
#define fatIO_RDONLY 0x01
|
|
#define fatIO_RDWR 0x02
|
|
#define fatIO_WRONLY 0x04
|
|
#define fatIO_APPEND 0x08
|
|
#define fatIO_CREATE 0x10
|
|
#define fatIO_EXCLUSIVE 0x20
|
|
#define fatIO_TRUNCATE 0x40
|
|
|
|
#define fatIO_SEEK_SET 0x01
|
|
#define fatIO_SEEK_CUR 0x02
|
|
#define fatIO_SEEK_END 0x03
|
|
|
|
|
|
typedef enum fatTYPE_eAttributes
|
|
{
|
|
fatTYPE_NORMAL = 0, /* Writable file */
|
|
fatTYPE_RDONLY = 0x01, /* Read Only file */
|
|
fatTYPE_HIDDEN = 0x02, /* Hidden from directory view */
|
|
fatTYPE_SYSTEM = 0x04, /* Owned by the operating system */
|
|
fatTYPE_VOLUME = 0x08, /* Volume label entry */
|
|
fatTYPE_DIR = 0x10, /* Sub-directory */
|
|
fatTYPE_ARCHIVE = 0x20, /* Copy of the file exists on this or another medium */
|
|
fatTYPE_LONG_NAME = fatTYPE_RDONLY | fatTYPE_HIDDEN | fatTYPE_SYSTEM | fatTYPE_VOLUME
|
|
} fatTYPE_eAttributes;
|
|
|
|
typedef unsigned long fatTYPE_tSize;
|
|
typedef unsigned int time_t;
|
|
|
|
typedef struct
|
|
{
|
|
fatTYPE_eAttributes st_mode; /* File or directory attributes */
|
|
fatTYPE_tSize st_size; /* File size in bytes */
|
|
time_t st_time; /* Timestamp of last modification,the seconds from 00:00:00 2000/1/1 */
|
|
} fatTYPE_sStat;
|
|
|
|
/* -------------------------------------------------------------------
|
|
** FATSYS trace debug.
|
|
** -------------------------------------------------------------------
|
|
*/
|
|
|
|
#define FATSYS_TRACE(fmt,args...) \
|
|
{ \
|
|
if (0) \
|
|
{ \
|
|
uart_printf("lfs: "fmt, ##args); \
|
|
} \
|
|
}
|
|
|
|
/* -------------------------------------------------------------------
|
|
** FAT system ASSERT.
|
|
** -------------------------------------------------------------------
|
|
*/
|
|
|
|
#define FAT_ASSERT(cOND) { if (!(cOND)) { utilsAssertFail(#cOND, __FILE__, __LINE__, 1);}}
|
|
|
|
/* -------------------------------------------------------------------
|
|
** LFS debug flag.
|
|
** -------------------------------------------------------------------
|
|
*/
|
|
#define LFS_TRACE_ENABLE LfsTraceEnable
|
|
|
|
/*===========================================================================
|
|
|
|
EXTERN DECLARATIONS FOR MODULE
|
|
|
|
===========================================================================*/
|
|
extern BOOL LfsTraceEnable;
|
|
|
|
/*===========================================================================
|
|
|
|
EXTERN FUNCTION DECLARATIONS
|
|
|
|
===========================================================================*/
|
|
|
|
/*===========================================================================
|
|
|
|
INTERNAL FUNCTION DECLARATIONS
|
|
|
|
===========================================================================*/
|
|
|
|
#endif /* LFS_TRACE_H */
|