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
| Parameters | Description |
|---|---|
| handle | A 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.
