1.1.4.4.12 DRV_NAND_FLASH_SkipBlock_BlockCheck Function

C

bool DRV_NAND_FLASH_SkipBlock_BlockCheck(const DRV_HANDLE handle, uint16_t blockNum)

Summary

Checks whether NAND Flash block is bad or good.

Description

This routine returns false if the given block of NAND Flash device is bad otherwise true.

Preconditions

The DRV_NAND_FLASH_Open() routine must have been called for the specified NAND FLASH driver instance.

Parameters

ParamDescription
handleA valid open-instance handle, returned from the driver's open routine
blockNumBlock number to check

Returns

true - If block is good

false - If block is bad

Example

uint16_t blockNum = 0;
DRV_HANDLE handle; // Returned from DRV_NAND_FLASH_Open

if (DRV_NAND_FLASH_SkipBlock_BlockCheck(handle, blockNum))
// Block is good
}

Remarks

This routine will block for hardware access.