DWC_GdbDownloadFileAsync

Syntax

#include <dwc.h>

DWCGdbError DWC_GdbDownloadFileAsync(int file_id,
                                     int buf_size,
                                     BOOL clear_buf,
                                     DWCGdbDownloadFileCallback callback,
                                     void *user_param);

Arguments

file_id The file ID of the file to get.
buf_size Specifies the size of the receive buffer that will store the file being downloaded. When 0 is specified, the size will be enlarged in 2048-byte units. Because this has a heavy processing burden, it is optimal to specify a size here if you know the maximum size in advance.
clear_buf Indicates whether to deallocate the receive buffer after the callback ends.
callback The callback that receives the downloaded file.
user_param Arbitrary value passed to the callback.

Return Values

Error information.

Description

If the process is successful, the callback function specified by the callback argument is called and the file with the ID specified by file_id is obtained. Be aware that if the process fails, the callback will not be called.

If the DWC_GDB_ERROR_NONE value is returned, the asynchronous process has started. Wait until the DWC_GdbGetState function stops returning DWC_GDB_STATE_IN_ASYNC_PROCESS.

You can get the result using the DWC_GdbGetAsyncResult function.

Revision History


CONFIDENTIAL