1 /*---------------------------------------------------------------------------*
2   Project:  TwlSDK - SPI - include
3   File:     config.h
4 
5   Copyright 2003-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 #ifndef NITRO_SPI_COMMON_CONFIG_H_
18 #define NITRO_SPI_COMMON_CONFIG_H_
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 /*===========================================================================*/
25 
26 #include <nitro/types.h>
27 #include <nitro/memorymap.h>
28 #include <nitro/spec.h>
29 
30 // userInfo definition
31 //#if ( SDK_NVRAM_FORMAT >= 300 )
32 #include <nitro/spi/common/userInfo_ts_300.h>
33 //#else
34 //#include <nitro/spi/common/userInfo_ts_200.h>
35 //#endif
36 
37 // Storage position of userInfo in NVRAM
38 //#ifdef SDK_TS
39 #undef  NVRAM_CONFIG_CONST_ADDRESS     // User info position is obtained from header offset
40 //#else
41 //#define NVRAM_CONFIG_CONST_ADDRESS     // Place user information at a fixed address
42 //#endif
43 
44 //#ifdef  NVRAM_CONFIG_CONST_ADDRESS
45 //#define NVRAM_CONFIG_DATA_ADDRESS_DUMMY     0x3fe00
46 //#else
47 #define NVRAM_CONFIG_DATA_OFFSET_ADDRESS    0x0020
48 #define NVRAM_CONFIG_DATA_OFFSET_SIZE       2
49 #define NVRAM_CONFIG_DATA_OFFSET_SHIFT      3
50 //#endif
51 
52 #define NVRAM_CONFIG_SAVE_COUNT_MAX         0x0080      // Max value of NitroConfigData.saveCount
53 #define NVRAM_CONFIG_SAVE_COUNT_MASK        0x007f      // Masks the range of NitroConfigData.saveCount values (0x00-0x7f)
54 
55 // MAC address storage location in NVRAM
56 #define NVRAM_CONFIG_MACADDRESS_ADDRESS     0x00036
57 #define NVRAM_CONFIG_ENABLECHANNEL_ADDRESS  0x0003c
58 
59 /*===========================================================================*/
60 
61 #ifdef  __cplusplus
62 }       /* extern "C" */
63 #endif
64 
65 #endif /* NITRO_SPI_COMMON_CONFIG_H_ */
66 
67 /*---------------------------------------------------------------------------*
68   End of file
69  *---------------------------------------------------------------------------*/
70