1 //////////////////////////////////////////////////////////////////////////////
2 //  Project:      PPC shim for Input Manager RM
3 //  File:         im_shim.c
4 //  Description:  IM thread and RM interface
5 //
6 //  Copyright (C) Nintendo.  All rights reserved.
7 //
8 //  These coded instructions, statements, and computer programs contain
9 //  proprietary information of Nintendo of America Inc. and/or Nintendo
10 //  Company Ltd., and are protected by Federal copyright law.  They may
11 //  not be disclosed to third parties or copied or duplicated in any form,
12 //  in whole or in part, without the prior written consent of Nintendo.
13 //////////////////////////////////////////////////////////////////////////////
14 #ifndef __IM_H__
15 #define __IM_H__
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 //////////////////////////////////////////////////////////////////////////////
22 
23 #define IM_DISABLE      0
24 #define IM_ENABLE       1
25 
26 //////////////////////////////////////////////////////////////////////////////
27 //  IM error codes
28 //////////////////////////////////////////////////////////////////////////////
29 #define IM_ERROR_CODE   int
30 #define IM_ERROR_NONE   0
31 
32 
33 //////////////////////////////////////////////////////////////////////////////
34 //  function prototypes
35 //
36 //  WARNING: the im only carries one transaction buffer for public APIs, these
37 //  blocking functions should be called from same thread
38 //////////////////////////////////////////////////////////////////////////////
39 
40 typedef struct
41 {
42 
43     u32 inactive_seconds;
44     u32 dim_enable;
45     u32 dim_seconds;
46     u32 apd_enable;
47     u32 apd_seconds;
48 
49 } IMParameters;
50 
51 IM_ERROR_CODE IM_GetParameters           (IMParameters *p_params);
52 
53 // For Dimming
54 IM_ERROR_CODE IMDisableDim          (void);
55 IM_ERROR_CODE IMEnableDim           (void);
56 IM_ERROR_CODE IMGetDimPeriod        (u32 *second);
57 IM_ERROR_CODE IMIsDimEnabled        (u32 *enabled);
58 IM_ERROR_CODE IMGetTimeBeforeDimming(u32 *second);
59 
60 IM_ERROR_CODE IMGetTimeBeforeAPD    (u32 *second);
61 IM_ERROR_CODE IMGetAPDPeriod        (u32 *second);
62 IM_ERROR_CODE IMIsAPDEnabledBySysSettings (u32 *enabled);
63 
64 IM_ERROR_CODE IMSetDimEnableTV      (u32 enable);
65 IM_ERROR_CODE IMSetDimEnableDRC     (u32 enable);
66 IM_ERROR_CODE IMGetDimEnableTV      (u32 *enabled);
67 IM_ERROR_CODE IMGetDimEnableDRC     (u32 *enabled);
68 
69 //////////////////////////////////////////////////////////////////////////////
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif//__IM_H__
75 
76 
77