1.1.4.4.16 DRV_NAND_FLASH_SkipBlock_BlockWrite Function
C
bool DRV_NAND_FLASH_SkipBlock_BlockWrite(const DRV_HANDLE handle, uint16_t blockNum, uint8_t *data, bool disableBlockCheck)
Summary
Writes the data of a whole block to NAND Flash.
Description
This function schedules a blocking operation for writing the data of a whole block to 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 write |
data | Pointer to source data buffer |
disableBlockCheck | 0 - Block will be checked as good before writing a given block. 1 - Block will not check before writing a given block. |
Returns
true - If Block write is successfully completed
false - If Block write fails
Example
DRV_HANDLE handle; // Returned from DRV_NAND_FLASH_Open uint16_t blockNum = 3; static uint8_t blockBuffer[262144 + 14336]; memset(blockBuffer, 0x55, sizeof(blockBuffer)); if (DRV_NAND_FLASH_SkipBlock_BlockWrite(handle, blockNum, blockBuffer, 0)) { // Block write successfully completed }
Remarks
This routine will block wait until write request is submitted successfully. Client should wait until write is complete to send next transfer request.