Jump to main content

##

# 1.1.3.4.15 DRV_MEMORY_TransferStatusGet Function

## C

    MEMORY_DEVICE_TRANSFER_STATUS DRV_MEMORY_TransferStatusGet
    (
        const DRV_HANDLE handle
    );

## Summary

Gets the current status of the transfer request on attached device.

## 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.

The application can alternatively register a transfer handler to receive the transfer completion events.

## Preconditions

DRV_MEMORY_Open() must have been called to obtain a valid opened device handle.

## Parameters

Param | Description
--- | ---
handle | A valid open-instance handle, returned from the driver's open function

## Returns

- MEMORY_DEVICE_TRANSFER_ERROR_UNKNOWN

  - If the handle is invalid
  - If the status read request fails

- MEMORY_DEVICE_TRANSFER_BUSY

  - If the current transfer request is still being processed

- MEMORY_DEVICE_TRANSFER_COMPLETED

  - If the transfer request is completed

## Example

    // memoryHandle is the handle returned by the DRV_MEMORY_Open function.

    if (MEMORY_DEVICE_TRANSFER_COMPLETED == DRV_MEMORY_TransferStatusGet(memoryHandle))
    {
        // Operation Done
    }

## Remarks

This routine will block for hardware access. Used in Async mode of operation.