NANDWrite

C Specification


#include <revolution/nand.h>

s32 NANDWrite(NANDFileInfo *info, const void *buf, u32 length);

Arguments

info Pointer to a NANDFileInfo structure.
buf Pointer to the start of the buffer that contains the data to be written to the internal flash memory. The buffer storing the data must be 32-byte aligned.
length Number of bytes of data to write to the internal flash memory. This value must be a multiple of 32.

Return Values

Returns the number of bytes for the written data when the write is successful. When the write fails, one of the following codes is returned:

NAND_RESULT_ACCESS
NAND_RESULT_AUTHENTICATION
NAND_RESULT_CORRUPT
NAND_RESULT_INVALID
NAND_RESULT_MAXBLOCKS
NAND_RESULT_UNKNOWN
NAND_RESULT_FATAL_ERROR

Description

Writes data to a file.

See Also

NANDRead, NANDReadAsync, NANDWriteAsync, NANDSeek, NANDSeekAsync

Revision History

06/16/2006 Initial version.
08/15/2006 Added AUTHENTICATION result code.


CONFIDENTIAL