1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 /** @file |
|
19 @brief USB OTG SHAI header |
|
20 @version 0.2.0 |
|
21 |
|
22 This header specifies the USB OTG SHAI. |
|
23 |
|
24 @publishedDeviceAbstraction |
|
25 */ |
|
26 |
|
27 |
|
28 #ifndef USB_OTG_SHAI_H |
|
29 #define USB_OTG_SHAI_H |
|
30 |
|
31 // System includes |
|
32 #include <kern_priv.h> |
|
33 #include <usb/usb_common_shai.h> // Common types shared between the USB SHAIs |
|
34 |
|
35 /** |
|
36 * This macro specifies the version of the USB OTG SHAI header in |
|
37 * binary coded decimal format. This allows the PSL layer to confirm a |
|
38 * certain definition is available, if needed. This can for example |
|
39 * make it possible for a new PSL to support compilation in an older |
|
40 * environment with old USB SHAI version that is missing some new |
|
41 * definitions. |
|
42 */ |
|
43 #define USB_OTG_SHAI_VERSION 0x020 |
|
44 |
|
45 // The namespace is documented in file usb_common_shai.h, so it is not |
|
46 // repeated here |
|
47 namespace UsbShai |
|
48 { |
|
49 // Forward declarations |
|
50 |
|
51 class MOtgControllerIf; |
|
52 class MOtgObserverIf; |
|
53 class MPeripheralControllerIf; |
|
54 class TPeripheralControllerProperties; |
|
55 class MHostControllerIf; |
|
56 class THostControllerProperties; |
|
57 |
|
58 // Data types |
|
59 |
|
60 /** |
|
61 * Enumeration listing the possible states of the ID pin. Due to a |
|
62 * dependency between OTG and USB Battery Charging, this |
|
63 * enumeration lists also the special states introduced as part of |
|
64 * the Battery Charging Specification version 1.1. |
|
65 * |
|
66 * An OTG Controller PSL for a system that does not support |
|
67 * Accessory Charger Adapter (ACA) will always report only |
|
68 * EIdStateRidFloat or EIdStateRidGnd. An OTG Controller PSL that |
|
69 * supports ACA is required to report the ID pin state accurately |
|
70 * in order for the OTG State Machine to understand why VBUS |
|
71 * appears high even though we should default to the host role and |
|
72 * should normally drive VBUS ourselves (in case of RID_A). |
|
73 * |
|
74 * Reporting an ACA state via the ID pin notification mechanism is |
|
75 * not a substitute for reporting port type detection via the USB |
|
76 * Charger Detection SHAI that is documented separately in |
|
77 * usb_charger_detection_shai.h. When ACA is supported, it is |
|
78 * required that the Charger Detector PSL guarantees that the OTG |
|
79 * Observer gets notified of the ID pin state before reporting the |
|
80 * port type to the Charger Detector Observer. |
|
81 * |
|
82 * @see usb_charger_detection_shai.h |
|
83 */ |
|
84 enum TIdPinState |
|
85 { |
|
86 /** ID pin is grounded */ |
|
87 EIdStateRidGnd = 0, |
|
88 |
|
89 /** ID pin is floating */ |
|
90 EIdStateRidFloat, |
|
91 |
|
92 /** |
|
93 * ID pin is in the RID_A range, as specified in Battery |
|
94 * Charging 1.1 specification |
|
95 */ |
|
96 EIdStateRidA, |
|
97 |
|
98 /** |
|
99 * ID pin is in the RID_B range, as specified in Battery |
|
100 * Charging 1.1 specification |
|
101 */ |
|
102 EIdStateRidB, |
|
103 |
|
104 /** |
|
105 * ID pin is in the RID_C range, as specified in Battery |
|
106 * Charging 1.1 specification |
|
107 */ |
|
108 EIdStateRidC |
|
109 }; |
|
110 |
|
111 /** |
|
112 * Enumeration listing the reported states of VBUS on the OTG |
|
113 * port. |
|
114 * |
|
115 * The threshold for Session Valid comparison is VOTG_SESS_VLD as |
|
116 * defined in the "On-The-Go and Embedded Host Supplement to the |
|
117 * USB Revision 2.0 Specification", Table 4-1 Electrical |
|
118 * Characteristics. The voltage level for a compliant |
|
119 * implementation can be anywhere between 0.8 V and 4.0 V. |
|
120 */ |
|
121 enum TVbusState |
|
122 { |
|
123 /** VBUS is below the OTG Session Valid threshold */ |
|
124 EVbusStateNoSession = 0, |
|
125 |
|
126 /** |
|
127 * VBUS is above the OTG Session Valid threshold, but below |
|
128 * the requirements of AVbusValid. |
|
129 */ |
|
130 EVbusStateSessionValid, |
|
131 |
|
132 /** |
|
133 * When operating as the A-device and driving VBUS, indicates |
|
134 * that the VBUS is in regulation, as defined in "On-The-Go |
|
135 * and Embedded Host Supplement to the USB Revision 2.0 |
|
136 * Specification" Section 4.2.1, "VBUS Output Voltage and |
|
137 * Current". |
|
138 * |
|
139 * When a VBUS session has been started as the A-device, the |
|
140 * OTG Controller PSL is required to report a VBUS level of |
|
141 * EVbusStateAVbusValid when VBUS has successfully risen to |
|
142 * allow the OTG State Machine to transition out of the |
|
143 * a_wait_vrise state. |
|
144 * |
|
145 * After VBUS has been successfully raised when operating as |
|
146 * the A-device, the PSL reporting a VBUS level less than |
|
147 * EVbusStateAVbusValid is considered as a report of a VBUS |
|
148 * error (over-current) situation and will result in ending |
|
149 * the session immediately. |
|
150 */ |
|
151 EVbusStateAVbusValid |
|
152 }; |
|
153 |
|
154 /** |
|
155 * Enumeration listing the state of the OTG 2.0 state machine. |
|
156 * |
|
157 * The states match those defined in the "On-The-Go and Embedded |
|
158 * Host Supplement to the USB Revision 2.0 Specification" for the |
|
159 * OTG A-device and B-device states. |
|
160 */ |
|
161 enum TOtgState |
|
162 { |
|
163 /** The OTG state is b_idle */ |
|
164 EOtgStateBIdle = 0, |
|
165 |
|
166 /** The OTG state is b_peripheral */ |
|
167 EOtgStateBPeripheral, |
|
168 |
|
169 /** The OTG state is b_wait_acon */ |
|
170 EOtgStateBWaitAcon, |
|
171 |
|
172 /** The OTG state is b_host */ |
|
173 EOtgStateBHost, |
|
174 |
|
175 /** The OTG state is a_idle */ |
|
176 EOtgStateAIdle, |
|
177 |
|
178 /** The OTG state is a_wait_vrise */ |
|
179 EOtgStateAWaitVrise, |
|
180 |
|
181 /** The OTG state is a_wait_bcon */ |
|
182 EOtgStateAWaitBcon, |
|
183 |
|
184 /** The OTG state is a_host */ |
|
185 EOtgStateAHost, |
|
186 |
|
187 /** The OTG state is a_suspend */ |
|
188 EOtgStateASuspend, |
|
189 |
|
190 /** The OTG state is a_peripheral */ |
|
191 EOtgStateAPeripheral, |
|
192 |
|
193 /** The OTG state is a_wait_vfall */ |
|
194 EOtgStateAWaitVfall, |
|
195 |
|
196 /** The OTG state is a_vbus_err */ |
|
197 EOtgStateAVbusErr |
|
198 }; |
|
199 |
|
200 /** |
|
201 * Enumeration listing the roles that our device can be in. |
|
202 */ |
|
203 enum TOtgRole |
|
204 { |
|
205 /** |
|
206 * Our device is idle, i.e. we are not operating in either the |
|
207 * peripheral or the host role. This role indicates that |
|
208 * neither the host controller nor the peripheral controller |
|
209 * needs to be activated and the PSL is free to power down the |
|
210 * controllers. |
|
211 */ |
|
212 EOtgRoleIdle = 0, |
|
213 |
|
214 /** Our device is operating in the peripheral role */ |
|
215 EOtgRolePeripheral, |
|
216 |
|
217 /** Our device is operating in the host role */ |
|
218 EOtgRoleHost |
|
219 }; |
|
220 |
|
221 // Class declaration |
|
222 |
|
223 /** |
|
224 * An interface class that needs to be implemented by each OTG |
|
225 * Controller PSL that registers to the USB stack. |
|
226 * |
|
227 * The USB OTG Stack will call the functions of this interface |
|
228 * from a DFC queued on the DFC queue supplied by the OTG |
|
229 * Controller PSL in TOtgControllerProperties::iControllerDfcQueue |
|
230 * when the OTG Controller PSL registered. |
|
231 */ |
|
232 NONSHARABLE_CLASS( MOtgControllerIf ) |
|
233 { |
|
234 public: |
|
235 /** |
|
236 * Called by the OTG stack to set the observer callback |
|
237 * interface to be used by the OTG Controller PSL to report |
|
238 * events. |
|
239 * |
|
240 * When the observer pointer is set to non-NULL value, the OTG |
|
241 * Controller PSL is required to immediately report the |
|
242 * current VBUS and ID states to the observer to get the |
|
243 * status of the OTG stack up to date. |
|
244 * |
|
245 * @param aObserver Pointer to the observer interface to use, |
|
246 * or NULL when the OTG stack is being unloaded. |
|
247 */ |
|
248 virtual void SetOtgObserver( MOtgObserverIf* aObserver ) = 0; |
|
249 |
|
250 /** |
|
251 * When operating as the B-peripheral, the OTG stack calls |
|
252 * this function to indicate that the upper layers are |
|
253 * requesting our device to become the B-host. This means that |
|
254 * our OTG device will need start the HNP signalling by |
|
255 * disconnecting from the bus and allowing the A-device to |
|
256 * connect as the peripheral. The signalling shall be started |
|
257 * when the host has suspended the bus, which may already be |
|
258 * the case or happen later. |
|
259 * |
|
260 * This function call is only relevant for OTG controllers |
|
261 * that implement the HNP signalling in hardware and require |
|
262 * an explicit request from SW to start the HNP role switch. |
|
263 * If the OTG controller is under SW control by the Host and |
|
264 * Peripheral Controller PSLs, the OTG Controller PSL should |
|
265 * ignore this call. The HNP signalling in the SW-controlled |
|
266 * case will be handled as normal calls to disconnect as |
|
267 * peripheral and then start the host controller. |
|
268 * |
|
269 * For all controller types, the Host Controller PSL and the |
|
270 * Peripheral Controller PSL associated with the OTG port are |
|
271 * required to report events as they normally would when |
|
272 * operating as the default role. For the Host Controller PSL, |
|
273 * this includes notifying device connection, disconnection, |
|
274 * and other relevant events via MRootHubCallbackIf. For the |
|
275 * Peripheral Controller PSL, this includes notifying bus |
|
276 * state events such as reset, suspend, and resume via |
|
277 * MUsbPeripheralPilCallbackIf::DeviceEventNotification. |
|
278 * |
|
279 * The OTG Controller PSL is not required to perform any |
|
280 * monitoring of HNP success or failure, or report that to the |
|
281 * PIL layer. The PSL is only responsible for making the |
|
282 * normal host and peripheral notifications mentioned above, |
|
283 * and the PIL can see the HNP success or failure from those |
|
284 * notifications. |
|
285 */ |
|
286 virtual void SetBHnpRequest() = 0; |
|
287 |
|
288 /** |
|
289 * When operating as the B-device, the OTG stack calls this |
|
290 * function to request the PSL to drive SRP signalling on the |
|
291 * bus by pulsing the D+ dataline. The OTG Controller PSL may |
|
292 * synchronously drive the 5..10 millisecond pulse before |
|
293 * returning, but it may also do it asynchronously. |
|
294 * |
|
295 * The OTG PIL layer guarantees that the initial conditions |
|
296 * for driving SRP are satisfied before the PIL calls this |
|
297 * function. That is, the PIL guarantees that sufficient time |
|
298 * has elapsed since the end of the previous VBUS session (if |
|
299 * any) and the bus has been idle long enough. |
|
300 * |
|
301 * No special report from the OTG Controller PSL is required |
|
302 * in either success or fail case. In a success case, the |
|
303 * A-device will raise VBUS and the OTG state machine gets |
|
304 * this as a normal VBUS notifications from the OTG Controller |
|
305 * PSL. In a fail case, a timer in the upper layers will |
|
306 * expire, indicating to upper layers that the SRP was not |
|
307 * successful. |
|
308 */ |
|
309 virtual void SignalBSrp() = 0; |
|
310 |
|
311 /** |
|
312 * Called by the OTG state machine to indicate a change in the |
|
313 * required controller role. |
|
314 * |
|
315 * Whether the PSL needs to do any actions depends on the HW. |
|
316 * For controllers that require special configuration in |
|
317 * changing a role (other than just starting the peripheral |
|
318 * controller or the host controller normally), the OTG |
|
319 * Controller should do that special configuration when it |
|
320 * gets this call. |
|
321 * |
|
322 * When changing a role, the OTG state machine will first |
|
323 * disable the stack for the previous role, causing that stack |
|
324 * to issue a stop request to the respective controller |
|
325 * PSL. The OTG state machine will then call this function |
|
326 * SetControllerRole() to set the controller role to the |
|
327 * target role. Following this, the OTG state machine will |
|
328 * enable the stack for the target role, causing that stack to |
|
329 * issue a start request to the respective controller PSL. |
|
330 * |
|
331 * @param aControllerRole The OTG role to set our device to |
|
332 * |
|
333 * @return KErrNone if the OTG Controller successfully set the |
|
334 * role or required no actions. Otherwise a system-wide |
|
335 * error code. |
|
336 */ |
|
337 virtual TInt SetControllerRole( TOtgRole aControllerRole ) = 0; |
|
338 }; |
|
339 |
|
340 |
|
341 /** |
|
342 * An interface class implemented by the USB stack to allow the |
|
343 * OTG controller to report events to the USB stack. This includes |
|
344 * events like VBUS rising and falling, ID pin becoming grounded |
|
345 * or floating, and SRP being detected. |
|
346 * |
|
347 * It is required that the OTG Controller PSL calls these |
|
348 * functions in the context of the DFC queue supplied by the OTG |
|
349 * Controller PSL in TOtgControllerProperties::iControllerDfcQueue |
|
350 * when the OTG Controller PSL registered. |
|
351 */ |
|
352 NONSHARABLE_CLASS( MOtgObserverIf ) |
|
353 { |
|
354 public: |
|
355 /** |
|
356 * Notify the current ID-pin state to the OTG stack. This |
|
357 * needs to be called by the OTG Controller PSL everytime |
|
358 * there is a change in the ID pin level. Redundant |
|
359 * notifications that don't change the previously reported |
|
360 * state are silently ignored, so the function is safe to call |
|
361 * without worrying about extra calls. |
|
362 * |
|
363 * When USB Battery Charging is supported on the OTG-capable |
|
364 * port, there is a dependency between normal USB |
|
365 * functionality and USB Battery Charging (see |
|
366 * usb_charger_detection_shai.h and specifically the |
|
367 * description of class MChargerDetectorIf). In this case it |
|
368 * is the responsibility of the OTG Controller PSL to |
|
369 * communicate with the Charger Detector PSL (which it may |
|
370 * implement itself) with respect to VBUS and ID pin events. |
|
371 * |
|
372 * For ID pin events that indicate connection to an Accessory |
|
373 * Charger Adapter, it is required that the port type is first |
|
374 * notified to the Charger Detector PSL Observer, followed by |
|
375 * notifying the ID pin state to the OTG Observer (via this |
|
376 * function). |
|
377 * |
|
378 * @param aIdPinState The current ID-pin state |
|
379 */ |
|
380 virtual void NotifyIdPinState( TIdPinState aIdPinState ) = 0; |
|
381 |
|
382 /** |
|
383 * Notify the current VBUS state to the OTG stack. This needs |
|
384 * to be called by the OTG Controller PSL everytime there is a |
|
385 * change in the VBUS level. Redundant notifications that |
|
386 * don't change the previously reported state are silently |
|
387 * ignored, so the function is safe to call without worrying |
|
388 * about extra calls. |
|
389 * |
|
390 * When USB Battery Charging is supported on the OTG-capable |
|
391 * port, there is a dependency between normal USB |
|
392 * functionality and USB Battery Charging (see |
|
393 * usb_charger_detection_shai.h and specifically the |
|
394 * description of class MChargerDetectorIf). In this case it |
|
395 * is the responsibility of the OTG Controller PSL to |
|
396 * communicate with the Charger Detector PSL (which it may |
|
397 * implement itself) with respect to VBUS and ID pin events. |
|
398 * |
|
399 * When VBUS rises on the OTG-capable port that is currently |
|
400 * the B-device and fully supports Battery Charging |
|
401 * Specification Revision 1.1, the Charger Detector PSL and |
|
402 * the OTG Controller PSL need to together guarantee that Data |
|
403 * Contact Detect is completed and the port type detected |
|
404 * before reporting VBUS rising. When the port type is known, |
|
405 * the port type needs to be notified to the Charger Detector |
|
406 * PSL Observer, followed by notifying the VBUS state to the |
|
407 * OTG Observer (via this function). |
|
408 * |
|
409 * Where Data Contact Detect is not supported, the VBUS rise |
|
410 * event needs to be notified to the OTG Observer (via this |
|
411 * function) immediately and charger detection needs to |
|
412 * proceed in parallel with the upper layers preparing the USB |
|
413 * personality. This is necessary in order to ensure that we |
|
414 * can fulfill the requirement to connect to the bus within a |
|
415 * second, while still making as long as possible charger |
|
416 * detection cycle to minimize the changes of false detections |
|
417 * due to datalines not making contact yet. |
|
418 * |
|
419 * The OTG Controller PSL, the Peripheral Controller PSL and |
|
420 * the Charger Detector PSL need to together guarantee that |
|
421 * the peripheral controller does not attempt to connect to |
|
422 * the bus while charger detection is still on-going. When |
|
423 * detection has been completed and upper layers have |
|
424 * indicated readiness to connect to the bus (see |
|
425 * MPeripheralControllerIf::PeripheralConnect(), the |
|
426 * Peripheral Controller PSL must connect to the bus. |
|
427 * |
|
428 * @param aVbusState The current VBUS state |
|
429 */ |
|
430 virtual void NotifyVbusState( TVbusState aVbusState ) = 0; |
|
431 |
|
432 /** |
|
433 * When operating as the A-device with VBUS low, notify the |
|
434 * OTG stack that SRP signalling has been detected on the |
|
435 * bus. The OTG Controller must detect the SRP signalling from |
|
436 * dataline pulsing, as specified in the "On-The-Go and |
|
437 * Embedded Host Supplement to the USB Revision 2.0 |
|
438 * Specification". |
|
439 */ |
|
440 virtual void NotifySrpDetected() = 0; |
|
441 |
|
442 /** |
|
443 * This function is called by the OTG Controller PSL to report |
|
444 * that it has detected the attachment of a device (A or B) |
|
445 * that is malfunctioning in a low-level way that prevents |
|
446 * attempting communication with the connected device. Such |
|
447 * cases may include but are not necessarily limited to: |
|
448 * |
|
449 * 1. A B-device that drives its upstream VBUS. To prevent |
|
450 * damage to the VBUS charge pump in our A-device, it may be |
|
451 * necessary to prevent VBUS from being raised by our device. |
|
452 * |
|
453 * 2. A B-device that presents a single-ended one (both |
|
454 * datalines high) on the bus. |
|
455 * |
|
456 * The detection of such malfunctioning devices is left to the |
|
457 * OTG Controller PSL, as this type of malfunctions are |
|
458 * low-level problems not necessarily detectable with the |
|
459 * standard inputs available to the OTG state machine. |
|
460 * |
|
461 * To ensure that the OTG state machine stays in an idle |
|
462 * state, the OTG Controller PSL should report ID floating and |
|
463 * VBUS low prior to reporting the bad device attachment by |
|
464 * calling this function. When the bad device is detached, the |
|
465 * OTG Controller PSL can resume reporting ID and VBUS state |
|
466 * truthfully, and must call NotifyBadDeviceDetached() to |
|
467 * allow the upper layers to see the error condition has been |
|
468 * cleared. |
|
469 * |
|
470 * @see NotifyBadDeviceDetached() |
|
471 */ |
|
472 virtual void NotifyBadDeviceAttached() = 0; |
|
473 |
|
474 /** |
|
475 * This function is called by the OTG Controller PSL to report |
|
476 * that a previously detected bad device has been detached. |
|
477 * See NotifyBadDeviceAttached() for description of this |
|
478 * functionality. |
|
479 * |
|
480 * @see NotifyBadDeviceAttached() |
|
481 */ |
|
482 virtual void NotifyBadDeviceDetached() = 0; |
|
483 }; |
|
484 |
|
485 |
|
486 /** |
|
487 * This class specifies the information provided by an OTG |
|
488 * Controller PSL when registering to the USB OTG stack. |
|
489 * |
|
490 * The PSL should prepare for the possibility that members may be |
|
491 * added to the end of this class in later SHAI versions if new |
|
492 * information is needed to support new features. The PSL should |
|
493 * not use this class as a direct member in an object that is not |
|
494 * allowed to grow in size due to binary compatibility reasons. |
|
495 * |
|
496 * @see UsbOtgPil::RegisterOtgController() |
|
497 */ |
|
498 NONSHARABLE_CLASS( TOtgControllerProperties ) |
|
499 { |
|
500 public: // Types and constants |
|
501 /** |
|
502 * A bitmask type used to indicate the static capabilities of |
|
503 * the OTG Controller. |
|
504 */ |
|
505 typedef TUint32 TOtgCaps; |
|
506 |
|
507 public: |
|
508 /** |
|
509 * Inline constructor for the OTG Controller properties |
|
510 * object. This is inline rather than an exported function to |
|
511 * prevent a binary break in a case where an older PSL binary |
|
512 * might provide the constructor a smaller object due to the |
|
513 * PSL being compiled against an older version of the SHAI |
|
514 * header. When it's inline, the function is always in sync |
|
515 * with the object size. |
|
516 * |
|
517 * We slightly violate the coding conventions which say that |
|
518 * inline functions should be in their own file. We don't want |
|
519 * to double the number of USB SHAI headers just for sake of a |
|
520 * trivial constructor. |
|
521 */ |
|
522 inline TOtgControllerProperties() : |
|
523 iCapabilities(0), |
|
524 iControllerDfcQueue(NULL) |
|
525 { |
|
526 }; |
|
527 |
|
528 public: // Data |
|
529 /** |
|
530 * A bitmask specifying the static capabilities of this OTG |
|
531 * Controller. No capabilities are specified at the moment and |
|
532 * the PSL shall fill this field with a zero value. |
|
533 * |
|
534 * The field is added for sake of future proofing the binary |
|
535 * compatibility of the OTG SHAI. By having a field reserved |
|
536 * for capability bits, we can later specify bits to indicate |
|
537 * added virtual functions or extension to this controller |
|
538 * properties structure. The PIL layer can then at runtime |
|
539 * confirm the existence of the new functions or fields and |
|
540 * safely support an older binary, if we choose to. |
|
541 */ |
|
542 TOtgCaps iCapabilities; |
|
543 |
|
544 /** |
|
545 * Pointer to a DFC queue that will be used for DFCs of this |
|
546 * controller and the associated peripheral and host |
|
547 * controllers. |
|
548 * |
|
549 * The OTG Controller must supply a pointer to a dedicated DFC |
|
550 * queue that has been created for this OTG Controller PSL. |
|
551 * Both the OTG Controller PSL itself and the OTG stack must |
|
552 * queue their DFCs for this controller in this DFC queue to |
|
553 * ensure the code is running in the same context. |
|
554 * |
|
555 * Furthermore, it is the responsibility of the OTG Controller |
|
556 * PSL that registers to ensure that the Peripheral and Host |
|
557 * Controller PSLs that are registered at the same time use |
|
558 * the same DFC Queue in their respective properties object. |
|
559 */ |
|
560 TDfcQue* iControllerDfcQueue; |
|
561 }; |
|
562 |
|
563 |
|
564 /** |
|
565 * A static class implemented by the USB OTG PIL layer to allow |
|
566 * the OTG controller PSL to register to the PIL layer. |
|
567 */ |
|
568 NONSHARABLE_CLASS( UsbOtgPil ) |
|
569 { |
|
570 public: |
|
571 /** |
|
572 * Registration function to be used by the OTG Controller PSL |
|
573 * to register itself and the associated peripheral and host |
|
574 * controller PSLs to the PIL layer. |
|
575 * |
|
576 * The intended usage is that OTG Controller PSL (of which |
|
577 * only one can exists in a given system) is a kernel |
|
578 * extension that registers itself and the associated |
|
579 * peripheral and host controller PSLs to the USB PIL layer by |
|
580 * making this call from its kernel extension entry point |
|
581 * function (or an equivalent code that runs during bootup). |
|
582 * |
|
583 * @param aOtgControllerIf Reference to the OTG Controller |
|
584 * interface implemented by the registering PSL. |
|
585 * |
|
586 * @param aOtgProperties Reference to an object describing the |
|
587 * static properties of the OTG Controller. The PIL layer |
|
588 * requires that the supplied reference remains valid |
|
589 * indefinitely, as an OTG Controller cannot unregister. |
|
590 * |
|
591 * @param aPeripheralControllerIf Reference to the Peripheral |
|
592 * Controller interface implemented by the PSL controlling the |
|
593 * Peripheral Controller associated with the registering OTG |
|
594 * port. |
|
595 * |
|
596 * @param aPeripheralProperties Reference to an object |
|
597 * describing the static properties of the Peripheral |
|
598 * Controller. The PIL layer requires that the supplied |
|
599 * reference remains valid indefinitely, as the registering |
|
600 * OTG Controller cannot unregister. |
|
601 * |
|
602 * @param aHostControllerIf Reference to the Host Controller |
|
603 * interface implemented by the PSL controlling the Host |
|
604 * Controller associated with the registering OTG port. |
|
605 * |
|
606 * @param aHostProperties Reference to an object describing the |
|
607 * static properties of the Host Controller. The PIL layer |
|
608 * requires that the supplied reference remains valid |
|
609 * indefinitely, as the registering OTG Controller cannot |
|
610 * unregister. |
|
611 * |
|
612 * @lib usbotghostpil.lib |
|
613 */ |
|
614 IMPORT_C static void RegisterOtgController( |
|
615 MOtgControllerIf& aOtgControllerIf, |
|
616 const TOtgControllerProperties& aOtgProperties, |
|
617 MPeripheralControllerIf& aPeripheralControllerIf, |
|
618 const TPeripheralControllerProperties& aPeripheralProperties, |
|
619 MHostControllerIf& aHostControllerIf, |
|
620 const THostControllerProperties& aHostProperties ); |
|
621 }; |
|
622 }; |
|
623 |
|
624 #endif // USB_OTG_SHAI_H |
|
625 |
|
626 /* End of File */ |
|