1 /*---------------------------------------------------------------------------*
2 Project: TwlSDK - include - PXI
3 File: compparam.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
18 #ifndef NITRO_PXI_COMMON_COMPPARAM_H_
19 #define NITRO_PXI_COMMON_COMPPARAM_H_
20
21 #ifdef SDK_NITRO
22 #include <nitro/types.h>
23 #include <nitro/memorymap.h>
24 #else
25 #include <twl/types.h>
26 #include <twl/memorymap.h>
27 #endif
28
29 #include <nitro/mi.h>
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 /*---------------------------------------------------------------------------*
36 Name: PXI_SetComponentParam
37
38 Description: Set component parameter for other processor sync
39 - This parameter should be set before OS_InitLock() for safety
40 FYI. OS_InitLock are called in OS_Init, take care!!!
41
42 Arguments: param : parameter to be set
43
44 Returns: None
45 *---------------------------------------------------------------------------*/
PXI_SetComponentParam(u32 param)46 static inline void PXI_SetComponentParam(u32 param)
47 {
48 MI_WriteWord(HW_COMPONENT_PARAM, param);
49 }
50
51 /*---------------------------------------------------------------------------*
52 Name: PXI_GetComponentParam
53
54 Description: Get component parameter from other processor
55
56 Arguments: None
57
58 Returns: parameter
59 *---------------------------------------------------------------------------*/
PXI_GetComponentParam(void)60 static inline u32 PXI_GetComponentParam(void)
61 {
62 return MI_ReadWord(HW_COMPONENT_PARAM);
63 }
64
65 #ifdef __cplusplus
66 } /* extern "C" */
67 #endif
68 /* NITRO_PXI_COMMON_COMPPARAM_H_ */
69 #endif
70