1 /*---------------------------------------------------------------------------*
2 Project: TwlSDK - WM - libraries
3 File: wm_common.c
4
5 Copyright 2007-2008 Nintendo. All rights reserved.
6
7 These coded instructions, statements, and computer programs contain
8 proprietary information of Nintendo of America Inc. and/or Nintendo
9 Company Ltd., and are protected by Federal copyright law. They may
10 not be disclosed to third parties or copied or duplicated in any form,
11 in whole or in part, without the prior written consent of Nintendo.
12
13 $Date:: 2008-09-18#$
14 $Rev: 8573 $
15 $Author: okubata_ryoma $
16 *---------------------------------------------------------------------------*/
17
18 #include "wm_common.h"
19
20 /*---------------------------------------------------------------------------*
21 Name: WM_CheckInitialized
22
23 Description: Checks whether the WM library is in use.
24
25 Arguments: None.
26
27 Returns: int: Returns WM_ERRCODE_* type processing results.
28 *---------------------------------------------------------------------------*/
WM_CheckInitialized(void)29 WMErrCode WM_CheckInitialized(void)
30 {
31 return WMi_CheckInitialized();
32 }
33
34 /*---------------------------------------------------------------------------*
35 Name: NWM_CheckInitialized
36
37 Description: Checks whether the new WM library is in use.
38
39 Arguments: None.
40
41 Returns: int: Returns an NWM_ERRCODE_* value for the processing results.
42 *---------------------------------------------------------------------------*/
NWM_CheckInitialized(void)43 NWMRetCode NWM_CheckInitialized(void)
44 {
45 #ifdef SDK_TWL
46 if(OS_IsRunOnTwl()) //Check the old wireless library state only when running on a TWL system
47 {
48 return NWMi_CheckInitialized();
49 }
50 #endif
51 //Simply return NWM_RETCODE_SUCCESS on a NITRO system because it does not have the new wireless chip
52 return NWM_RETCODE_ILLEGAL_STATE;
53 }
54