HIORead

Syntax

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

HIOStatus HIORead(HIOHandle handle, u32 sizeInBytes, void *pData);

Parameters

handle Handle of the channel from which to read.
sizeInBytes Number of bytes to read.
pData Pointer to the destination of the data read.

Return Values

>= 0 The number of bytes read
HIO_STATUS_NO_CLIENT_TXN_BUF_AVAILABLE The read request was not able to be submitted. Retry the request as the condition is temporary.
< 0 The read failed.

Description

Reads the specified number of bytes from the channel indicated by handle. Reading from a channel which has been opened with the write-only option (HIO_CHANNEL_OPTION_WRITE) will cause this function to return without any data.

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

HIOReadAsync
HIOReadAsyncEx
HIOWrite
HIOWriteAsync
HIOWriteAsyncEx

Revision History

2013-05-08 Automated cleanup pass.
2011-11-04 Updated return values.
2011-02-21 Initial version.


CONFIDENTIAL