📄 _flflash.h
字号:
FLStatus (*write)(FLFlash *, CardAddress, const void FAR1 *, dword, word);
/*----------------------------------------------------------------------*/
/* f l a s h . e r a s e */
/* */
/* Erase one or more contiguous Flash erasable blocks */
/* */
/* The default routine returns a write-protect error. */
/* */
/* Parameters: */
/* vol : Pointer identifying drive */
/* firstErasableBlock : Number of first block to erase */
/* numOfErasableBlocks : Number of blocks to erase */
/* */
/* Returns: */
/* FLStatus : 0 on success, failed otherwise */
/*----------------------------------------------------------------------*/
FLStatus (*erase)(FLFlash *, word, word);
/*----------------------------------------------------------------------*/
/* f l a s h . s e t P o w e r O n C a l l b a c k */
/* */
/* Register power on callback routine. Default: no routine is */
/* registered. */
/* */
/* Parameters: */
/* vol : Pointer identifying drive */
/* */
/*----------------------------------------------------------------------*/
void (*setPowerOnCallback)(FLFlash *);
/*----------------------------------------------------------------------*/
/* f l a s h . r e a d B B T */
/* */
/* MTD specific Flash routine returning the media units status */
/* Note that a unit can contain more then 1 erase block */
/* */
/* No default routine is implemented for this routine. */
/* */
/* Parameters: */
/* vol : Pointer identifying drive */
/* unitNo : Number of the first unit to check */
/* unitsToRead : Number of units to check */
/* blockMultiplier : Number of blocks per erase unit */
/* buffer : Buffer to return the units status */
/* reconstruct : TRUE for reconstruct BBT from virgin card */
/* */
/*----------------------------------------------------------------------*/
FLStatus (*readBBT)(FLFlash *, dword unitNo, dword unitsToRead,
byte blockMultiplier,byte FAR1 * buffer, FLBoolean reconstruct);
/*----------------------------------------------------------------------*/
/* 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: */
/* vol : Pointer identifying drive */
/* buffer : Buffer containing the data to write */
/* length : Length to write */
/* flags : Flags of write IPL operation (see obove) */
/* */
/*----------------------------------------------------------------------*/
FLStatus (*writeIPL)(FLFlash *, const void FAR1 * buffer, word length,
byte 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: */
/* vol : Pointer identifying drive */
/* buffer : Area to read into */
/* length : Length to read */
/* */
/*----------------------------------------------------------------------*/
FLStatus (*readIPL)(FLFlash *, void FAR1 * buffer, word length);
#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: */
/* vol : Pointer identifying drive */
/* buffer : buffer containing the data to write */
/* length : Length to write */
/* */
/*----------------------------------------------------------------------*/
FLStatus (*writeOTP)(FLFlash *, const void FAR1 * buffer,word 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: */
/* vol : Pointer identifying drive */
/* offset : Offset from the begining of the OTP arae */
/* buffer : Area to read into */
/* length : Length to read */
/* */
/*----------------------------------------------------------------------*/
FLStatus (*readOTP)(FLFlash *, word offset, void FAR1 * buffer, word 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: */
/* vol : Pointer identifying drive */
/* sectionSize : total size of the OTP area */
/* usedSize : Used (and locked) size of the OTP area */
/* locked : LOCKED_OTP flag stating the locked state */
/* */
/*----------------------------------------------------------------------*/
FLStatus (*otpSize)(FLFlash *, dword FAR2* sectionSize,
dword FAR2* usedSize, word 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: */
/* vol : Pointer identifying drive */
/* buffer : byte buffer to read unique ID into */
/* */
/*----------------------------------------------------------------------*/
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: */
/* vol : Pointer identifying drive */
/* areaNo : Protection area number to work on */
/* addressLow : Low boundary Address of protected area */
/* addressHigh : High boundary Address of protected area */
/* floorNo : The floor to work on. */
/* */
/*----------------------------------------------------------------------*/
FLStatus (*protectionBoundries)(FLFlash *, byte areaNo,
CardAddress* addressLow ,CardAddress* addressHigh, byte floorNo);
/*----------------------------------------------------------------------*/
/* 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. */
/* */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -