Jump to main content

##

# 1.1.4.4.13 DRV_NAND_FLASH_SkipBlock_BlockTag Function

## C

    bool DRV_NAND_FLASH_SkipBlock_BlockTag(const DRV_HANDLE handle, uint16_t blockNum, bool badBlock)

## Summary

Tag NAND Flash block to bad or good.

## Description

This routine tags given block of NAND Flash device to bad or good.

## Preconditions

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

## Parameters

Param | Description
--- | ---
handle | A valid open-instance handle, returned from the driver's open routine
blockNum | Block number to be tagged
badBlock | 1 - Block to be tagged as bad block. 0 - If block to be tagged as good block.

## Returns

true - If given block is tagged as bad or good

false - If failed to tag a block

## Example

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

    if (DRV_NAND_FLASH_SkipBlock_BlockTag(handle, blockNum, 1))
    // Block is tagged as bad
    }

## Remarks

This routine will block for hardware access.