DRV_W25_TransferStatusGet Function

C

DRV_W25_TRANSFER_STATUS DRV_W25_TransferStatusGet( const DRV_HANDLE handle );

Summary

Gets the current status of the transfer request.

Description

This routine gets the current status of the transfer request. The application must use this routine where the status of a scheduled request needs to be polled on.

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

DRV_W25_TRANSFER_ERROR_UNKNOWN - If the flash status register read request fails

DRV_W25_TRANSFER_BUSY - If the current transfer request is still being processed

DRV_W25_TRANSFER_COMPLETED - If the transfer request is completed

Example

DRV_HANDLE handle; // Returned from DRV_W25_Open

if (DRV_W25_TransferStatusGet(handle) == DRV_W25_TRANSFER_COMPLETED)
{
    // Operation Done
}

Remarks

This routine will block for hardware access.