1.1.4.4.9 DRV_NAND_FLASH_FeatureGet Function

C

bool DRV_NAND_FLASH_FeatureGet(const DRV_HANDLE handle, uint8_t *featureData, uint8_t featureDataSize, uint8_t featureAddress)

Summary

Read target specific features.

Description

This routine reads target specific features from NAND Flash.

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
featureDataPointer to destination buffer into which subfeature data to be placed from NAND Flash
featureDataSizeTotal number of subfeature data bytes to be read
featureAddressSpecific feature address to be send after command cycle.

Returns

true - If specific feature is read successfully from the flash

false - If invalid handle

Example

i.e. Read NAND Flash ECC controller if NAND Flash supports internal ECC controller
#define NAND_FLASH_TARGET_DISABLE_INTERNAL_ECC 0x90
uint8_t featureData[4];
DRV_HANDLE handle; // Returned from DRV_NAND_FLASH_Open

if (DRV_NAND_FLASH_FeatureGet(handle, featureData, sizeof(featureData), NAND_FLASH_TARGET_DISABLE_INTERNAL_ECC))
{
    // Feature data read successfully
}

Remarks

This routine will block for hardware access.