CARDWriteAsync

C Specification

#include <revolution/card.h>

typedef void (*CARDCallback)( s32 chan, s32 result );
s32  CARDWriteAsync( CARDFileInfo* fileInfo, const void* buf, s32 length, s32 offset,
CARDCallback callback );

Arguments

fileInfo Pointer to the file info of the file to write. fileInfo must be valid file info that was initialized using the CARD[Fast]Open or CARDCreate[Async] function.
buf Buffer address (32-byte alignment).
length Number of bytes to write. The length must be a multiple of the card sector size returned by the CARDGetSectorSize function.
offset The position of the file to start write. The offset must be a multiple of the card sector size returned by the CARDGetSectorSize function.
callback Callback function to notify about the result.

Return Values

One of the following codes:

CARD_RESULT_FATAL_ERROR
CARD_RESULT_NOCARD
CARD_RESULT_BUSY
CARD_RESULT_NOFILE
CARD_RESULT_NOPERM
CARD_RESULT_IOERROR
CARD_RESULT_LIMIT
CARD_RESULT_CANCELED
CARD_RESULT_READY

Description

Asynchronously writes data to a file.

See Also

CARD[Fast]Open, CARDCreate[Async], CARDCancel, CARDGetResultCode, CARDGetSectorSize

Revision History

2006/03/01 Initial version.


CONFIDENTIAL