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

📄 _flflash.h

📁 M-System DOC(Disk on a Chip) Flash芯片的诊断工具, 可以从Flash芯片中获取特定的数据信息, 用于判断芯片当前的状态.
💻 H
📖 第 1 页 / 共 3 页
字号:
  FLStatus (*completeOperation)(FLFlash *);

  FLStatus (*setCallBack)(FLFlash *);
  FLStatus (*dismount)(FLFlash *);





  
  FLStatus (*clearCallBack)(FLFlash *);
  FLStatus (*flashCopy)(FLFlash *);


/*----------------------------------------------------------------------*/
/*                    f l a s h . w r i t e I P L                       */
/*                                                                      */
/* MTD specific Flash write IPL area routine                            */
/*                                                                      */
/* No default routine is implemented for this routine.                  */
/*                                                                      */
/* Parameters:                                                          */
/*                                                                      */
/*----------------------------------------------------------------------*/
  FLStatus (*writeIPL)(FLFlash * flash, const void FAR1* buffer, 
                       FLWord length, FLByte offset, unsigned flags);
/*----------------------------------------------------------------------*/
/*                     f l a s h . r e a d I P L                        */
/*                                                                      */
/* MTD specific Flash read area IPL routine                             */
/*                                                                      */
/* No default routine is implemented for this routine.                  */
/*                                                                      */
/* Parameters:                                                          */
/*                                                                      */
/*----------------------------------------------------------------------*/
  FLStatus (*readIPL)(FLFlash *, void FAR1*, FLWord);

#ifdef HW_OTP

/*----------------------------------------------------------------------*/
/*                        f l a s h . w r i t e O T P                   */
/*                                                                      */
/* MTD specific Flash write and lock OTP area routine                   */
/*                                                                      */
/* No default routine is implemented for this routine.                  */
/*                                                                      */
/* Parameters:                                                          */
/*                                                                      */
/*----------------------------------------------------------------------*/
  FLStatus (*writeOTP)(FLFlash *, const void FAR1 * buffer,FLWord length);

/*----------------------------------------------------------------------*/
/*                        f l a s h . r e a d O T P                     */
/*                                                                      */
/* MTD specific Flash read OTP area routine                             */
/*                                                                      */
/* No default routine is implemented for this routine.                  */
/*                                                                      */
/* Parameters:                                                          */
/*                                                                      */
/*----------------------------------------------------------------------*/
  FLStatus (*readOTP)(FLFlash *, FLWord offset, void FAR1 * buffer, FLWord length);

/*----------------------------------------------------------------------*/
/*                        f l a s h . otpSize                           */
/*                                                                      */
/* MTD specific Flash get OTP area size and state                       */
/*                                                                      */
/* No default routine is implemented for this routine.                  */
/*                                                                      */
/* Parameters:                                                          */
/*                                                                      */
/*----------------------------------------------------------------------*/
  FLStatus (*otpSize)(FLFlash *,  FLDword FAR2* sectionSize,
             FLDword FAR2* usedSize, FLWord FAR2* locked);
#endif /* HW_OTP */
/*----------------------------------------------------------------------*/
/*                  f l a s h . g e t U n i q u e I d                   */
/*                                                                      */
/* MTD specific Flash get the chip unique ID                            */
/*                                                                      */
/* No default routine is implemented for this routine.                  */
/*                                                                      */
/* Parameters:                                                          */
/*                                                                      */
/*----------------------------------------------------------------------*/
  FLStatus (*getUniqueId)(FLFlash *, void FAR1 * buffer);
#ifdef  HW_PROTECTION
/*----------------------------------------------------------------------*/
/*        f l a s h . p r o t e c t i o n B o u n d r i e s             */
/*                                                                      */
/* MTD specific Flash get protection boundries  routine                 */
/*                                                                      */
/* No default routine is implemented for this routine.                  */
/*                                                                      */
/* Parameters:                                                          */
/*                                                                      */
/*----------------------------------------------------------------------*/
  FLStatus (*protectionBoundries)(FLFlash *, FLByte areaNo,
            FLWord* addressLow ,FLWord* addressHigh,FLByte Floor);

/*----------------------------------------------------------------------*/
/*        f l a s h . p r o t e c t i o n K e y I n s e r t             */
/*                                                                      */
/* MTD specific Flash insert the protection key routine                 */
/*                                                                      */
/* No default routine is implemented for this routine.                  */
/*                                                                      */
/* Note the key is inserted only to protected areas and to all floors   */
/*                                                                      */
/* Parameters:                                                          */
/*                                                                      */
/*----------------------------------------------------------------------*/
  FLStatus (*protectionKeyInsert)(FLFlash *, FLByte areaNo, FLByte FAR1* key);

/*----------------------------------------------------------------------*/
/*        f l a s h . p r o t e c t i o n K e y R e m o v e             */
/*                                                                      */
/* MTD specific Flash remove the protection key routine                 */
/*                                                                      */
/* No default routine is implemented for this routine.                  */
/*                                                                      */
/* Note the key is removed from all floors.                             */
/*                                                                      */
/* Parameters:                                                          */
/*                                                                      */
/*----------------------------------------------------------------------*/
  FLStatus (*protectionKeyRemove)(FLFlash *,FLByte areaNo);

/*----------------------------------------------------------------------*/
/*        f l a s h . a c t i v a t e S t i c k y L o c k               */
/*                                                                      */
/* MTD specific Flash activate the sticky lock routine                  */
/*                                                                      */
/* No default routine is implemented for this routine.                  */
/*                                                                      */
/* Parameters:                                                          */
/*                                                                      */
/*----------------------------------------------------------------------*/
  FLStatus (*activateStickyLock)(FLFlash *);

/*----------------------------------------------------------------------*/
/*        f l a s h . p r o t e c t i o n T y p e                       */
/*                                                                      */
/* MTD specific Flash get protection type routine                       */
/*                                                                      */
/* No default routine is implemented for this routine.                  */
/*                                                                      */
/* Note the type is the combined attributes of all the floors.          */
/*                                                                      */
/* Parameters:                                                          */
/*                                                                      */
/*----------------------------------------------------------------------*/
  FLStatus (*protectionType)(FLFlash *,FLByte areaNo, FLWord* areaType);

/*----------------------------------------------------------------------*/
/*              f l a s h . p r o t e c t i o n S e t                   */
/*                                                                      */
/* MTD specific Flash get protection type routine                       */
/*                                                                      */
/* No default routine is implemented for this routine.                  */
/*                                                                      */
/* Parameters:                                                          */
/*                                                                      */
/*----------------------------------------------------------------------*/
  FLStatus (*protectionSet )( FLFlash *,FLByte areaNo, FLWord areaType ,
                              FLWord addressLow, FLWord addressHigh,
                              FLByte FAR1* key , FLByte modes,FLByte Floor );

#endif /* HW_PROTECTION */

/*----------------------------------------------------------------------*/
/*      f l a s h . e n t e r D e e p P o w e r D o w n M o d e         */
/*                                                                      */
/* MTD specific Flash enter deep power down mode routine                */
/*                                                                      */
/* No default routine is implemented for this routine.                  */
/*                                                                      */
/* Parameters:                                                          */
/*                                                                      */
/*----------------------------------------------------------------------*/
  FLStatus (*enterDeepPowerDownMode)(FLFlash *,FLWord state);

/*----------------------------------------------------------------------*/
/*                    f l a s h . d o w n l o a d                       */
/*                                                                      */
/* MTD specific - Reset download mechanizm to download IPL and          */
/*                protection attributes.                                */
/*                                                                      */
/* No default routine is implemented for this routine.                  */
/*                                                                      */
/* Parameters:                                                          */
/*                                                                      */
/*----------------------------------------------------------------------*/
  FLStatus (*download)(FLFlash *);

/*----------------------------------------------------------------------*/
/* DiskOnChip memory access routines type defintions                    */
/*----------------------------------------------------------------------*/

#ifndef FL_NO_USE_FUNC
  FLMemWindowSize FAR1* memWindowSize; /* Doc memory window size          */
  FLMemRead       FAR1* memRead;       /* Doc memory read routine         */
  FLMemWrite      FAR1* memWrite;      /* Doc memory write routine        */
  FLMemSet        FAR1* memSet;        /* Doc memory set routine          */
  FLMemRead8bit   FAR1* memRead8bit;   /* Doc memory 8 bit read routine   */
  FLMemWrite8bit  FAR1* memWrite8bit;  /* Doc memory 8 bit write routine  */
  FLMemRead16bit  FAR1* memRead16bit;  /* Doc memory 16 bit read routine  */
  FLMemWrite16bit FAR1* memWrite16bit; /* Doc memory 16 bit write routine */
  FLMemSetGetMode FAR1* memSetGetMode; /* Interleave change event -       */
                                       /* call back to plant new routines */
#endif /* FL_NO_USE_FUNC */
};

typedef FLStatus (*MTDidentifyRoutine) (FLFlash *);

extern MTDidentifyRoutine mtdTable[FL_MTDS];

/* Returns specific flash structure of the socket */

#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
extern TFFS_DLL_API FLFlash * NAMING_CONVENTION flFlashOf(FLByte volNo);
#ifdef __cplusplus
}
#endif /* __cplusplus */

/* See interface documentation of functions in flflash.c        */

extern FLStatus flIdentifyFlash(FLSocket *socket, FLFlash *flash);

extern FLStatus flDismountFlash(FLFlash * flash);

#endif /* _FLFLASH_H */

⌨️ 快捷键说明

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