<< Previous | Next >> | |
|
int nf_eraseBlock( nf_device * dev, long page );
Description
- Erases the block that contains the specified page on the specified NAND flash device. Check for completion of the erase operation using either
nf_isBusyRBHW()
ornf_isBusyStatus()
.
- Normally, this function will not allow a bad block to be erased. However, when
NFLASH_CANERASEBADBLOCKS
is defined by the application, the bad block check is not performed, and the application is allowed to erase any block, regardless of whether it is marked good or bad.Parameters
- dev
- Pointer to an initialized
nf_device
structure
- page
- Page specifies the zero-based number of a NAND flash page in the block to be erased, relative to the first "good" page.
Return value
0
: Success, or the first error result encountered
-1
: NAND flash device is busy
-2
: Block check time out error
-3
: Page is in a bad block
Library
- NFLASH.LIB (This function was introduced in Dynamic C 9.01)
See Also
- CalculateECC256, ChkCorrectECC256, xCalculateECC256, xChkCorrectECC256
Dynamic C Functions | << Previous | Next >> | rabbit.com |