USB Libraries Help > USB Host Libraries > USB MSD Host Client Driver Library > Library Interface > a) Data Transfer Functions > USB_HOST_MSD_TransferErrorTasks Function
MPLAB Harmony USB Stack
USB_HOST_MSD_TransferErrorTasks Function

This function maintains the MSD transfer error handling state machine. This function should be called periodically after the USB_HOST_MSD_Transfer function has been called to schedule a transfer. The function should be called periodically atleast till the transfer completion event has been received. Calling this function while a BOT transfer is in progress allows the MSD Host Client driver to perform BOT error handling in a non-blocking manner. 

Calling this function when there is no BOT transfer in progress will not have any effect. In case of BOT error handling, calling this function will eventually result in a BOT transfer event. It is not necessary to call this function after this event has occurred (till the next BOT transfer has been scheduled).

C
void USB_HOST_MSD_TransferErrorTasks(
    USB_HOST_MSD_LUN_HANDLE lunHandle
);
Preconditions

The lunHandle should be valid.

Parameters
Parameters 
Description 
lunHandle 
handle to valid LUN. 
Returns

None.

Remarks

While running in an RTOS application, this function should be called in the same thread that requested the BOT Transfer and operating the logical unit.