DRV_W25_UnlockFlash Function

C

bool DRV_W25_UnlockFlash( const DRV_HANDLE handle );

Summary

Unlocks the flash device for Erase and Program operations.

Description

This function schedules a blocking operation for unlocking the flash blocks globally. This allows to perform erase and program operations on the flash.

Preconditions

The DRV_W25_Open() routine must have been called for the specified W25 driver instance.

Parameters

ParamDescription
handleA valid open-instance handle, returned from the driver's open routine

Returns

true - if the unlock is successfully completed

false - if Write enable fails before sending unlock command to flash or if Unlock flash command itself fails

Example

DRV_HANDLE handle;  // Returned from DRV_W25_Open

if(DRV_W25_UnlockFlash(handle) == false)
{
    // Error handling here
}

Remarks

None.