1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     hid_ExtraPad.h
4 
5   Copyright (C)2009-2012 Nintendo Co., Ltd.  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   $Rev:$
14  *---------------------------------------------------------------------------*/
15 
16 #ifndef NN_HID_CTR_HID_EXTRAPAD_H_
17 #define NN_HID_CTR_HID_EXTRAPAD_H_
18 
19 #include <nn/Handle.h>
20 #include <nn/Result.h>
21 #include <nn/types.h>
22 #include <nn/hid/CTR/hid_ExtraPadStatus.h>
23 #include <nn/hid/CTR/hid_HidBase.h>
24 #include <nn/os.h>
25 
26 /*
27  *
28  */
29 namespace nn {
30 namespace hid {
31 namespace CTR {
32 
33 const size_t EXTRA_PAD_WORKING_MEMORY_SIZE = 4096;
34 
35 /* Please see man pages for details
36 
37 
38 
39 
40 
41 */
42 
43 class ExtraPad
44 {
45 public:
46     /* Please see man pages for details
47 
48 
49     */
50     typedef enum{
51         /* Please see man pages for details */
52         CONNECTION_STATE_NO_CONNECTION,
53         /* Please see man pages for details */
54         CONNECTION_STATE_CONNECTED,
55         /* Please see man pages for details */
56         CONNECTION_STATE_STOPPED
57     }ConnectionState;
58 
59 public:
60     /* Please see man pages for details
61 
62 
63      */
64 
65     /* Please see man pages for details
66 
67 
68 
69 
70 
71 
72 
73 
74      */
75     static void Initialize(void* workingMemory);
76 
77     /* Please see man pages for details
78 
79 
80 
81      */
82     static void Finalize();
83 
84     /*
85 
86 */
87 
88 
89     /* Please see man pages for details
90 
91 
92      */
93 
94     /* Please see man pages for details
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113      */
114     static nn::Result StartSampling(s32 samplingThreadPriority,s32 period);
115 
116     /* Please see man pages for details
117 
118 
119 
120 
121 
122 
123 
124 
125      */
126     static nn::Result StopSampling();
127 
128     /*
129 
130 */
131 
132     /* Please see man pages for details
133 
134 
135      */
136 
137 
138     /* Please see man pages for details
139 
140 
141 
142 
143 
144 
145      */
146     static bool IsSampling();
147 
148 
149     /* Please see man pages for details
150 
151 
152 
153 
154 
155 
156 
157      */
158     static ConnectionState GetConnectionState();
159 
160     /* Please see man pages for details
161 
162 
163 
164 
165 
166      */
167     static void RegisterConnectionEvent(nn::os::LightEvent* pLightEvent);
168 
169 
170     /* Please see man pages for details
171 
172 
173 
174      */
175     static void UnregisterConnectionEvent();
176 
177     /* Please see man pages for details
178 
179 
180 
181 
182 
183 
184 
185      */
186     static void RegisterSamplingEvent(nn::os::LightEvent *pLightEvent);
187 
188     /* Please see man pages for details
189 
190 
191 
192      */
193     static void UnregisterSamplingEvent();
194 
195 
196 
197     /*
198 
199 */
200 
201     /* Please see man pages for details
202 
203 
204      */
205 
206 
207     /* Please see man pages for details
208 
209 
210      */
211     static uptr GetResource();
212 
213 
214     /*
215 
216 */
217 
218 private:
219     ExtraPad();
220     virtual ~ExtraPad();
221 
222 };
223 
224 }
225 
226 }
227 
228 }
229 
230 #endif /* NN_HID_CTR_HID_EXTRAPAD_H_ */
231