Jump to main content

##

# 1.1.4.4.17 DRV_NAND_FLASH_SkipBlock_PageRead Function

## C

    bool DRV_NAND_FLASH_SkipBlock_PageRead(
        const DRV_HANDLE handle,
        uint16_t blockNum,
        uint16_t pageNum,
        uint8_t *data,
        uint8_t *spare,
        bool disableBlockCheck
    );

## Summary

Reads the data and/or the spare area of a page of given block from NAND Flash.

## Description

This function schedules a blocking operation for reading the data and/or the spare area of a page of given block from NAND Flash.

## Precondition

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 read page from
pageNum | Page number to read inside the given block
data | Pointer to destination data buffer
spare | Pointer to destination spare buffer.
disableBlockCheck | 0 - Block will be checked as good before reading a page. 1 - Block will not check before reading a page.

## Returns

true - If Page read is successfully completed

false - If Page read fails

## Example

    DRV_HANDLE handle; // Returned from DRV_NAND_FLASH_Open
    uint16_t blockNum = 3;
    uint16_t pageNum = 0;
    static uint8_t pageBuffer[4096 + 224];

    if (DRV_NAND_FLASH_SkipBlock_PageRead(handle, blockNum, pageNum, pageBuffer, 0, 0))
    {
        // Page read successfully completed
    }

## Remarks

This routine will block waiting until read request is completed successfully.