1 /*---------------------------------------------------------------------------*
2 Project: Wii Connect 24 API demos
3 File: base.h
4
5 Copyright 2006 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 $Log: base.h,v $
14 Revision 1.1 2006/08/24 12:32:28 terui
15 new additions
16
17 $NoKeywords: $
18 *---------------------------------------------------------------------------*/
19
20 #ifndef __DEMOS_NWC24DEMO_BASE_H__
21 #define __DEMOS_NWC24DEMO_BASE_H__
22
23 #include <revolution/types.h>
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 /*===========================================================================*/
29
30 /*
31 * Network setting set by the end user are saved in NAND flash memory.
32 * Typically, this stored network setting will be read
33 * automatically through the firmware, so there is no need to change the setting.
34 * If you wish to match the development environment settings without rewriting the NAND flash memory,
35 * you may make debug setting change temporarily.
36 */
37 #ifdef NDEBUG
38 #undef TEMPORARY_CONFIG
39 #else
40 #define TEMPORARY_CONFIG 1
41 #endif
42
43 /*---------------------------------------------------------------------------*/
44 static inline void
SetInAddr(u8 * addr,u8 para0,u8 para1,u8 para2,u8 para3)45 SetInAddr( u8* addr, u8 para0, u8 para1, u8 para2, u8 para3 )
46 {
47 addr[ 0 ] = para0;
48 addr[ 1 ] = para1;
49 addr[ 2 ] = para2;
50 addr[ 3 ] = para3;
51 }
52
53 static inline void
SetInAddr32(u8 * addr,u32 para)54 SetInAddr32( u8* addr, u32 para )
55 {
56 addr[ 0 ] = (u8)( ( para >> 24 ) & 0x0ff );
57 addr[ 1 ] = (u8)( ( para >> 16 ) & 0x0ff );
58 addr[ 2 ] = (u8)( ( para >> 8 ) & 0x0ff );
59 addr[ 3 ] = (u8)( ( para >> 0 ) & 0x0ff );
60 }
61
62 /*---------------------------------------------------------------------------*/
63
64 u8 GetConfigId( void );
65
66
67 /*===========================================================================*/
68 #ifdef __cplusplus
69 }
70 #endif
71 #endif /* __DEMOS_NWC24DEMO_BASE_H__ */
72
73 /*---------------------------------------------------------------------------*
74 End of file
75 *---------------------------------------------------------------------------*/
76