⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tmfat32generic.h

📁 PNX1500上Fat32文件系统源代码
💻 H
字号:
/* -------------------------------------------------------------------------- */
/* (C) Copyright 2000,2002, 2003 Koninklijke Philips Electronics N.V.,        */
/*     All rights reserved                                                    */
/*                                                                            */
/* This source code and any compilation or derivative thereof is the          */
/* proprietary information of Konlinklijke Philips Electronics N.V. and is    */
/* Confidential in nature.                                                    */
/* Under no circumstances is this software to be exposed to or placed under an*/
/* Open Source License of any type without the expressed written permission of*/
/* Koninklijke Philips Electronics N.V.                                       */
/* -------------------------------------------------------------------------- */
/* FILE NAME:    tmFat32Generic.h                                             */
/*                                                                            */
/* DESCRIPTION:  Definitions for generic C version of tmFat32.                */
/*                                                                            */
/* DOCUMENT REF: tbd                                                          */
/* 																			  */
/* NOTES:        tbd                                                          */
/*                                                                            */
/* -------------------------------------------------------------------------- */

#ifndef _TMFAT32GENERIC_H_
#define _TMFAT32GENERIC_H_

/* -------------------------------------------------------------------------- */
/* Define extern c for C++ prototypes                                         */
/* -------------------------------------------------------------------------- */

#if defined(__cplusplus)
extern "C"{
#endif

#define USE_MML         0      // If true use tmml memspace, otherwise use malloc/free.
#define USE_ERRNO       1      // If true set errno values.
#define USE_REENTRANCY  1      // If true support reentrancy
#define USE_SIMULATOR   0      // To get debug output

#define	Null		        0
#define	False		        0
#define	True		        1

// Max length of a path. Normally we get this from syslimits.h or
// limits.h but Cygwin confuses this with FILENAME_MAX which is the
// max length of a file name. So we set it here.

#ifdef PATH_MAX
#undef PATH_MAX
#endif
#define	PATH_MAX	1024	/* max number of bytes in pathname	*/

// Error codes

#define TM_OK                       0U     /* Global success return status   */
#define CID_COMP_IDE                0x0A000000  // Pick a number
#define CID_LAYER_DEVLIB            0x000B0000  // Pick another number
#define TM_ERR_COMP_UNIQUE_START    0x800U /* 0x800-0xBFF: Component unique    */
#define TM_ERR_INIT_FAILED          0x014U /* Initialization failed        */
#define TM_ERR_OUT_OF_MEMORY        0x01CU /* Memory allocation failed     */
#define TM_ERR_BAD_PARAMETER        0x009U /* Invalid input parameter      */
#define TM_ERR_READ                 0x017U /* Read error                   */
#define TM_ERR_WRITE                0x018U /* Write error                  */
#define TM_ERR_NOT_INITIALIZED      0x011U /* Component is not initialized */
#define TM_ERR_NOT_SUPPORTED        0x013U /* Function is not supported    */
#define TM_ERR_NULL_PARAMETER       0x028U /* Null input parameter         */

// Define some types

typedef char *		        Address;	/* ready for address-arithmetic */
typedef char		        Char;		/* machine-natural character */
typedef unsigned int	    Bool;
typedef char *		        String;		/* guaranteed null-terminated */
typedef char const *	    ConstString;
typedef signed char         Int8;
typedef signed short	    Int16;
typedef signed long	        Int32;
typedef int		            Int;		/* machine-natural integer */
typedef unsigned int	    UInt;		/* machine-natural unsigned integer */
typedef unsigned char	    UInt8;
typedef unsigned short	    UInt16;
typedef unsigned long	    UInt32;
typedef signed long long    Int64;
typedef unsigned long long  UInt64;
typedef UInt32              tmErrorCode_t;
typedef void *		        Pointer;	/* pointer to anonymous object */
typedef UInt32              tmosalTaskHandle_t, *ptmosalTaskHandle_t;

typedef struct tmSWVersion
{
    UInt32      compatibilityNr;        /* Interface compatibility number */
    UInt32      majorVersionNr;         /* Interface major version number */
    UInt32      minorVersionNr;         /* Interface minor version number */

}   tmSWVersion_t, *ptmSWVersion_t;

typedef struct tmosalDateTime_Label
{
    UInt32  year; 
    UInt32  month; 
    UInt32  day; 
    UInt32  hour; 
    UInt32  minute; 
    UInt32  second; 
    UInt32  millisecond; 
} tmosalDateTime_t, *ptmosalDateTime_t; 

void tmFat32_Lock(void);
void tmFat32_Unlock(void);
void tmFat32_Create_Lock(void);
void tmFat32_Destroy_Lock(void);

tmErrorCode_t tmosalGetDateTime(ptmosalDateTime_t t);

/* -------------------------------------------------------------------------- */
/* End of extern c for C++ prototypes                                         */
/* -------------------------------------------------------------------------- */

#if defined(__cplusplus)
}
#endif

#endif	/* !defined(_TMFAT32GENERIC_H_) */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -