HIOWriteAsyncEx

Syntax

#include <cafe.h>
#include <cafe/hio.h>

HIOStatus HIOWriteAsyncEx(HIOHandle       handle, 
                          u32             sizeInBytes, 
                          const void       *pData,
                          HIOAsyncStruct   *asyncStruct);

Parameters

handle Channel to write.
sizeInBytes Number of bytes to write.
pData Pointer to the data to write.
asyncStruct This parameter contains the callback function that will be called when the write completes or an error occurs.

Return Values

HIO_STATUS_OK Successfully submitted the asynchronous write request.
HIO_STATUS_NO_CLIENT_TXN_BUF_AVAILABLE The asynchronous write request could not be submitted. Retry the request as the condition is temporary.
< 0 The asynchronous write request failed to be submitted.

Description

Invokes a write operation for the specified number of bytes on the channel designated by handle and returns immediately.

The callback function embedded in the asyncStruct parameter will be provided the number of bytes successfully written. The user must ensure that the number of bytes written matches the number of bytes specified by sizeInBytes. The user may have to issue another call to write the remaining data.

The asyncStruct parameter contains a pointer to the application callback function as well as the OSMessageQueue to use for communications that are internal to the HostIO driver.

NOTE:
The callback specified by asyncStruct will not receive status notifications indicating that the connection has ended. Only the callbacks for HIOOpen or HIOOpenEx will receive the HIO_STATUS_NO_CONNECTIONS status code.

Do Not Call From

Callbacks Do not call this function from any callback function.
Interrupt handler Do not call this function from any interrupt handler.
Exception handler Do not call this function from any exception handler.
Production code Do not call this function in production code. It is available only for debugging purposes.

See Also

HIORead
HIOReadAsync
HIOReadAsyncEx
HIOWrite
HIOWriteAsync

Revision History

2013/05/08 Automated cleanup pass.
2012/04/11 Added const before void *.
2011/12/06 Added note regarding callback status code.
2011/11/04 Updated return values.
2011/02/21 Initial version.


CONFIDENTIAL