1 /*---------------------------------------------------------------------------*
2   Project:  TwlSDK - MB - demos - multiboot-wfs
3   File:     func.h
4 
5   Copyright 2005-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 __NITROSDK_DEMO_MB_MULTIBOOT_WFS_FUNC_H
18 #define __NITROSDK_DEMO_MB_MULTIBOOT_WFS_FUNC_H
19 
20 #ifdef SDK_TWL
21 #include	<twl.h>
22 #else
23 #include	<nitro.h>
24 #endif
25 
26 
27 /******************************************************************************/
28 /* macro */
29 
30 /*
31  * These macros redundantly increase the overlay module size.
32  * These can be used as follows: volatile int v; OVAERLAY_CODE_BY_10000(++v);
33 
34  * Be aware that build times will grow extremely long (particularly during optimization).
35  */
36 #define	OVAERLAY_CODE_BY_10(expr)		(expr), (expr), (expr), (expr), (expr), (expr), (expr), (expr), (expr), (expr)
37 #define	OVAERLAY_CODE_BY_100(expr)		OVAERLAY_CODE_BY_10(OVAERLAY_CODE_BY_10(expr))
38 #define	OVAERLAY_CODE_BY_1000(expr)		OVAERLAY_CODE_BY_10(OVAERLAY_CODE_BY_100(expr))
39 #define	OVAERLAY_CODE_BY_10000(expr)	OVAERLAY_CODE_BY_10(OVAERLAY_CODE_BY_1000(expr))
40 #define	OVAERLAY_CODE_BY_100000(expr)	OVAERLAY_CODE_BY_10(OVAERLAY_CODE_BY_10000(expr))
41 #define	OVAERLAY_CODE_BY_1000000(expr)	OVAERLAY_CODE_BY_10(OVAERLAY_CODE_BY_100000(expr))
42 #define	OVAERLAY_CODE_BY_10000000(expr)	OVAERLAY_CODE_BY_10(OVAERLAY_CODE_BY_1000000(expr))
43 
44 
45 /******************************************************************************/
46 /* Functions */
47 
48 #if	defined(__cplusplus)
49 extern  "C"
50 {
51 #endif
52 
53 
54 /* Get the string used to confirm that the overlay is working */
55     void    func_1(char *dst);
56     void    func_2(char *dst);
57     void    func_3(char *dst);
58 
59 
60 #if	defined(__cplusplus)
61 }                                      /* extern "C" */
62 #endif
63 
64 
65 /******************************************************************************/
66 
67 
68 #endif                                 /* __NITROSDK_DEMO_FS_OVERLAY_FUNC_H */
69