DWC_Init

Syntax

#include <dwc.h>

int DWC_Init( void* work );

Description

This function initializes the DWC library. It creates and checks the user ID to be saved on the DS system. Call this function once before calling other functions included in the DWC library.

Display an appropriate message that corresponds to the return value. For details on creating this error message, refer to the Nintendo Wi-Fi Connection Programming Guidelines.

The buffer specified in work may be deallocated after this function is closed.Because this buffer is accessed from ARM7, in the main memory specify a region that can be accessed from ARM7.

One of the following functions must be called prior to this function: OS_Init, OS_InitTick, OS_InitAlarm, or RTC_Init.

DWC_Init requires a PXI interrupt for synchronization; do not call it when PXI interrupts are prohibited.

Arguments

work Pointer to the initialization buffer.
Specify a buffer that is 32-byte-aligned and has the size of DWC_INIT_WORK_SIZE.

Return Values

DWC_INIT_RESULT_NOERROR Initialization succeeded.
DWC_INIT_RESULT_CREATE_USERID Generated temporary user ID on the DS system.
DWC_INIT_RESULT_DESTROY_USERID Generated a temporary user ID because the user ID on the DS system may have been deleted.
DWC_INIT_RESULT_DESTROY_OTHER_SETTING The DS system connection target settings may be corrupted.

See Also

DWC_CreateUserData

Revision History

2006/08/02 Added cautions on buffer for initialization and the PXI interrupt.
2006/03/07 Added description of functions which need to be called in advance.
2006/02/24 Changed the reference document name.
2005/12/16 Revisions.
2005/10/20 Revisions.
2005/07/22 Initial version.


CONFIDENTIAL