1 /*---------------------------------------------------------------------------*
2   Project:  TwlSDK - include - snd - common
3   File:     main.h
4 
5   Copyright 2004-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 #ifndef NITRO_SND_COMMON_MAIN_H_
19 #define NITRO_SND_COMMON_MAIN_H_
20 
21 #include <nitro/types.h>
22 #include <nitro/os.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /******************************************************************************
29 	macro definition
30  ******************************************************************************/
31 
32 #define SND_PROC_INTERVAL 0xAA8        // = 5.2095 msec
33 
34 #define SND_MESSAGE_PERIODIC        1
35 #define SND_MESSAGE_WAKEUP_THREAD   2
36 
37 /******************************************************************************
38 	public function declaration
39  ******************************************************************************/
40 
41 #ifdef SDK_ARM9
42 
43 void    SND_Init(void);
44 
45 #else  /* SDK_ARM7 */
46 
47 void    SND_Init(u32 threadPrio);
48 
49 void    SND_CreateThread(u32 threadPrio);
50 BOOL    SND_SetThreadPriority(u32 prio);
51 
52 void    SND_InitIntervalTimer(void);
53 void    SND_StartIntervalTimer(void);
54 void    SND_StopIntervalTimer(void);
55 OSMessage SND_WaitForIntervalTimer(void);
56 BOOL    SND_SendWakeupMessage(void);
57 
58 #endif /* SDK_ARM7 */
59 
60 /******************************************************************************
61 	private function declaration
62  ******************************************************************************/
63 
64 void    SNDi_LockMutex(void);
65 void    SNDi_UnlockMutex(void);
66 
67 #ifdef __cplusplus
68 } /* extern "C" */
69 #endif
70 
71 #endif /* NITRO_SND_COMMON_MAIN_H_ */
72