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

📄 fdi_type.h

📁 Flash file system
💻 H
📖 第 1 页 / 共 3 页
字号:
 * FDI has been optimized to work with the Phone.com UP.Browser(tm). If the 
 * browser is installed, you should not use Type 14. It is reserved for the 
 * browser. If the browser is not installed, Type 14 is available to your 
 * application.
 */  
#define NUM_TYPE14_PARMS              33


#if (FILE_MANAGER == TRUE)
/* !!! DO NOT MODIFY DEFINES BELOW IF FILE_MANAGER == TRUE.     !!! */
/* !!! NUM_FILES will override user defined values for types    !!! */
/* !!! FILE_SUPPORT_INFO_TYPE and FILE_SUPPORT_DATA_TYPE.       !!! */
#if ((FILE_SUPPORT_INFO_TYPE == 0) || (FILE_SUPPORT_DATA_TYPE == 0))
#undef  NUM_TYPE0_PARMS
#define NUM_TYPE0_PARMS  NUM_FILES
#endif
#if ((FILE_SUPPORT_INFO_TYPE == 1) || (FILE_SUPPORT_DATA_TYPE == 1))
#undef  NUM_TYPE1_PARMS
#define NUM_TYPE1_PARMS  NUM_FILES
#endif
#if ((FILE_SUPPORT_INFO_TYPE == 2) || (FILE_SUPPORT_DATA_TYPE == 2))
#undef  NUM_TYPE2_PARMS
#define NUM_TYPE2_PARMS  NUM_FILES
#endif
#if ((FILE_SUPPORT_INFO_TYPE == 3) || (FILE_SUPPORT_DATA_TYPE == 3))
#undef  NUM_TYPE3_PARMS
#define NUM_TYPE3_PARMS  NUM_FILES
#endif
#if ((FILE_SUPPORT_INFO_TYPE == 4) || (FILE_SUPPORT_DATA_TYPE == 4))
#undef  NUM_TYPE4_PARMS
#define NUM_TYPE4_PARMS  NUM_FILES
#endif
#if ((FILE_SUPPORT_INFO_TYPE == 5) || (FILE_SUPPORT_DATA_TYPE == 5))
#undef  NUM_TYPE5_PARMS
#define NUM_TYPE5_PARMS  NUM_FILES
#endif
#if ((FILE_SUPPORT_INFO_TYPE == 6) || (FILE_SUPPORT_DATA_TYPE == 6))
#undef  NUM_TYPE6_PARMS
#define NUM_TYPE6_PARMS  NUM_FILES
#endif
#if ((FILE_SUPPORT_INFO_TYPE == 7) || (FILE_SUPPORT_DATA_TYPE == 7))
#undef  NUM_TYPE7_PARMS
#define NUM_TYPE7_PARMS  NUM_FILES
#endif
#if ((FILE_SUPPORT_INFO_TYPE == 8) || (FILE_SUPPORT_DATA_TYPE == 8))
#undef  NUM_TYPE8_PARMS
#define NUM_TYPE8_PARMS  NUM_FILES
#endif
#if ((FILE_SUPPORT_INFO_TYPE == 9) || (FILE_SUPPORT_DATA_TYPE == 9))
#undef  NUM_TYPE9_PARMS
#define NUM_TYPE9_PARMS  NUM_FILES
#endif
#if ((FILE_SUPPORT_INFO_TYPE == 10) || (FILE_SUPPORT_DATA_TYPE == 10))
#undef  NUM_TYPE10_PARMS
#define NUM_TYPE10_PARMS NUM_FILES
#endif
#if ((FILE_SUPPORT_INFO_TYPE == 11) || (FILE_SUPPORT_DATA_TYPE == 11))
#undef  NUM_TYPE11_PARMS
#define NUM_TYPE11_PARMS NUM_FILES
#endif
#if ((FILE_SUPPORT_INFO_TYPE == 12) || (FILE_SUPPORT_DATA_TYPE == 12))
#undef  NUM_TYPE12_PARMS
#define NUM_TYPE12_PARMS NUM_FILES
#endif
#if ((FILE_SUPPORT_INFO_TYPE == 13) || (FILE_SUPPORT_DATA_TYPE == 13))
#undef  NUM_TYPE13_PARMS
#define NUM_TYPE13_PARMS NUM_FILES
#endif
#if ((FILE_SUPPORT_INFO_TYPE == 14) || (FILE_SUPPORT_DATA_TYPE == 14))
#undef  NUM_TYPE14_PARMS
#define NUM_TYPE14_PARMS NUM_FILES
#endif
/* !!! DO NOT MODIFY DEFINES ABOVE IF FILE_MANAGER == TRUE.     !!! */
/* !!! NUM_FILES will override user defined values for types    !!! */
/* !!! FILE_SUPPORT_INFO_TYPE and FILE_SUPPORT_DATA_TYPE.       !!! */
#endif


#define NUM_OPEN_PARAMS               16 /* Number of simultaneous open streams
                                          * supported.  If FILE_MANAGER is set
                                          * to FALSE, then NUM_OPEN_PARAMS must
                                          * be greater than 0 and less than or
                                          * equal to 127.
                                          * If FILE_MANAGER is set to TRUE,
                                          * then (NUM_OPEN_FILES +
                                          * NUM_OPEN_PARAMS) must be greater
                                          * than 0 and less than or equal to
                                          * 127.                             */

#define WEARLEVELING_LIMIT          1000 /* difference between most and least
                                          * erased block for reclamation     */
    


/* 
 * ### FDI abstraction typedefs and macros section:
 * ############################################################################
 */

#define JJS_INCLUDE_OSTYPE_H	/*The following #ifdef was added by jjs*/ /*This line was added by jjs*/

#ifndef JJS_INCLUDE_OSTYPE_H    /*This line was added by jjs*/
/*
 * If your system does not have definition for the following you must define 
 * them here 
 */
 
/* typedef void * SEM_ID; */

#ifndef CUSTOM_SEM_MTX  
#define SEM_MTX_ID SEM_ID
#else
   typedef  struct
   {
	  int  current_task_id;
      WORD wait_count; 
      SEM_ID binary_sem;
      BYTE used; 
      BYTE reserved;
   } SEM_MTX;

   typedef SEM_MTX * SEM_MTX_ID;
#endif
/*E.5.0.598.START*/
/* Semaphore Routine Macros: */
/*
 * TASK_CREATE_DESTROY - If TRUE, FDI can dynamically create and destroy
 * the BKGD_Task and the RECL_Task.  Customers using operating systems that
 * don't allow dynamic creation and destruction of tasks can statically
 * define their tasks.  Test_GSM will create and destroy these two tasks
 * on startup and shutdown if this is FALSE
 */
#define TASK_CREATE_DESTROY TRUE       /* default is TRUE */

/*
 * SEM_CREATE_DESTROY - If TRUE, FDI can dynamically create and destroy
 * the semaphores for background and reclaim.  Customers using operating 
 * systems that don't allow dynamic creation and destruction of semaphores
 * can statically define their semaphores.  Test_GSM will create and destroy
 * these semaphores on startup and shutdown if this is FALSE
 */
#define SEM_CREATE_DESTROY TRUE        /* default is TRUE */

/*
 * Static tasks and dynamic semaphores is not supported at this time.
 * Do not set TASK_CREATE_DESTROY to FALSE and SEM_CREATE_DESTROY to
 * TRUE.
 */

/* 
 * The following macro, OS_MACROS, should initialy be undefined 
 * for stand alone FDI and customer use. Define it only if the following 
 * macros are defined else where.
 */
#if(SEM_CREATE_DESTROY == TRUE)
#ifndef OS_MACROS
#define SEM_TRY_WAIT(a)                semTake(a, NO_WAIT)
#define SEM_WAIT(a)                    semTake(a, WAIT_FOREVER)
#define SEM_WAIT_TIME(a,b)             semTake(a, b)
#define SEM_POST(a)                    semGive(a)
#define SEM_BIN_CREATE()               semBCreate(SEM_Q_FIFO, SEM_EMPTY)
#define SEM_DESTROY(a)                 semDelete(a); a = SEM_NULL
#endif  /*OS_MACROS*/
#endif /* SEM_CREATE_DESTROY */

#ifndef SEM_MTX_CREATE
#ifndef OS_MACROS
#define SEM_MTX_CREATE()               Sem_Mtx_Create()
#define SEM_MTX_POST(a)                Sem_Mtx_Post(a)
#define SEM_MTX_TRY_WAIT(a)            Sem_Mtx_Try_Wait(a)
#define SEM_MTX_WAIT(a)                Sem_Mtx_Wait(a)
#define SEM_MTX_DESTROY(a)             Sem_Mtx_Destroy(a); a = SEM_NULL
#define Q_STATIC_SEM_CNT                9
#endif  /*OS_MACROS*/
#endif /*SEM_MTX_CREATE*/

#if (TASK_CREATE_DESTROY == TRUE)
#ifndef OS_MACROS
#define SPAWN(a,b,c,d,e)               taskSpawn(a,b,c,d,(FUNCPTR)e, 0,0,0,0,\
                                                 0,0,0,0,0,0)
#define SPAWN_ERROR                    ERROR
#define TASK_OPTIONS                   VX_FP_TASK
#define TASK_DESTROY(a)                taskDelete(a); a = 0
#endif /* OS_MACROS */
#endif /*TASK_CREATE_DESTROY*/
/*E.5.0.598.END*/
#else /* !JJS_INCLUDE_OSTYPE_H */ /*This line was added by jjs*/
#include "ostype.h"               /*This line was added by jjs*/
#endif /*JJS_INCLUDE_OSTYPE_H*/   /*This line was added by jjs*/

//#ifndef offsetof
//#define offsetof(type, member)         ((unsigned int)&((type *)0)->member)
//#endif

#ifndef mFDI_MemberSize
#define mFDI_MemberSize(type, member)  (sizeof(((type *)0)->member))
#endif

#ifndef JJS_INCLUDE_OSTYPE_H    /*THIS LINE WAS ADDED BY JJS*/
#define Current_Task_Pointer()         taskIdSelf()
#define Interupt_Level_Set             intLevelSet
#define TaskDelay(a)                   taskDelay(a)
#else /* !JJS_INCLUDE_OSTYPE_H *//*This line was added by jjs*/
   /* The MACROs have been defined in the ostype.h included before. */
#endif /*JJS_INCLUDE_OSTYPE_H*/ /*This line was added by jjs*/

/* size_t is defined in stdio.h.  If your OS does not have this
 * uncomment the following 
 */
/* typedef unsigned int size_t */

/* 
 * ### Debug section:
 * ############################################################################
 */
/*#define writeToFile*/                  /* If logMsgs from screen need to be 
                                          * logged to a file. If you want the 
                                          * timing info logged, you have to 
                                          * also uncomment TIMING define 
                                          * above                            */
#ifdef TESTING
#ifdef writeToFile
   FILE *rw;
#endif
#endif

/* #define TIMING */                     /* uncomment this if timing needs to
                                          * occur - requires FDI_DEVELOPMENT */
/* #define TEST_MSGS 1 */                /* uncomment this to display test 
                                          * messages.                        */
/* 
 * ### Globaly used includes:
 * ############################################################################
 */
#include "fdi_err.h"

#define CPU32                       0    /*added by jjs*/
#define ARM7TDMI                    1    /*added by jjs*/
#define CPU ARM7TDMI                     /*added by jjs*/

#endif /* Sentry Header */



/*****************************************************************************
* $Log: fdi_type.h $
* Revision 1.8  2003/04/08 20:16:39  vtc
* extends FDI memory space to 15 blocks. 
* changes FDI start address to 0x07300000. --- Jingsong Jin
* Revision 1.7  2003/01/22 13:15:41  wavis
* Set PACKET_DATA compile flag to FALSE.
* Revision 1.5  2003/01/04 09:35:46  Bing
* Check in for JJS, fix the fdi format problem
* Revision 1.4  2002/12/16 18:06:38  jjs
* extends the queue size from 1KB to 8KB. 
* extends type0 & type1 parameters.
* Initial version - jjs
*****************************************************************************/

⌨️ 快捷键说明

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